This commit includes the V2 changes.
Making changes in v2 API to take an extra parameter rescue_image_ref
as part of the rescue action API.
If specified, this image_ref will be used to rescue the instance.
If the image is not specified, then the base image ref is used by
default.
Partially Implements: blueprint allow-image-to-be-specified-during-rescue
DocImpact
Change-Id: I985b21264841a6a18a66d19ccd41753f78576776
This commit includes the compute changes to accept a parameter
rescue_image_ref in the rescue_instance method.
If specified, this image_ref will be used to rescue the instance.
If the image is not specified, then the base image ref is used by default.
Partially Implements: blueprint allow-image-to-be-specified-during-rescue
DocImpact
Change-Id: I59311fcfcb8eb54701618e92e5cdada109235b38
This prevents us from failing to find the associated instance if
the lifecycle event happens after the instance has been deleted,
as in the case of a ... delete.
Change-Id: I819ddf8ff68edc407d7932bf43771c440f514f26
Closes-bug: #1304968
The revoke_security_group_ingress, revoke_security_group_ingress, and
delete_security_group calls in the ec2 API were not restricted by policy
checks. This prevented a deployer from restricting their usage via
roles or other checks. Checks have been added for these calls.
Closes-Bug: #1290537
Change-Id: I4bf681bedd68ed2216b429d34db735823e0a6189
Add OS_DEBUG as an environmental variable that will let you run
locally with debug logs when trying to debug a particular unit
test. Inspired by similar function in the neutron base tests.
History: I70790aa39c0774726de71e5fa5751c45e7e34ffd was enabled on
March 10th to address 2 issues, make it possible to see DEBUG logs
during test runs, and test that the LOG.debug functions that we happen
to execute as a side effect of unit tests did not have syntax errors
(it's important to note it was not guarunteed coverage for all debug
messages).
The net effect was largely a DDOS on the testing system. This
generated a 190MB subunit_log per test run. It meant on failures in
Nova unit tests now generated such an enormous dump that they became
non indexable in elastic recheck (it overloaded the indexers), so the
bug classification system was blinded to any nova unit test bugs.
It was thus reverted in: Ia1cfc3d874ddf4f8ee2037b487d22f968585854e
This patch solves the first concern, which is developer targetted
testing. It mirrors what is done in Neutron for cross project
consistency. There was a competing approach in requiring OS_LOG_LEVEL
to be set, however it had the same problem as the initial patch,
defaulting to DEBUG means that it's a DOS (at 15k unit tests, that
just can't be the default). Given that Neutron already established
some conventions here, using existing conventions also seems better.
This *does not* address concern #2. That is expected to be done in a
separate patch using an ephemeral string buffer logger. However
getting that correct has proved tricky enough that the approach to the
problem was:
1. revert - Ia1cfc3d874ddf4f8ee2037b487d22f968585854e
2. add targeted debug logging (this patch)
3. add back side effect debug testing - being worked by joe
Change-Id: I04ff2f0650f1e6035d8de5c5802b96ce4294891b
Modified volume['instance_uuid'] to volume.get('instance_uuid'),
to avoid "KeyError", when detach a volume with "attaching" status.
Change-Id: Ic1aacab212c2a2026d18ef57ad9d77fdc6d86b47
Closes-Bug: #1280532
There were a few remaining calls directly to the database module
left in nova-network. These would fail because of the wedge we
put in place specifically to catch this case. However, we don't
test VlanManager in the gate, which means we didn't catch them
until now.
This required adding two more methods, one each to Network and
NetworkList, but they are both extremely simple.
Change-Id: Iecc382074f060da1bd6f740d7bde0b20a0be2fcf
Closes-bug: #1304724
Boot from volume on Xen wants to resize the volume
when the image size doesn't jive with the volume size.
This patch doesn't attempt the resize.
Closes-Bug: #1296839
Change-Id: Ic03b7997f61f1a22362dafd86664db681e54087e
As of commit 07ee9639 three years ago nova-manage.conf is no longer
used, so let's clean up the man page.
Closes-Bug: #1304580
Change-Id: Ie061733da4bd0337f510e17b6dd7ca5bae14b7de
This change adds a context field to the xenapi session
call_plugin_serialized_with_retry method to provide better
logging information. This is then used by the glance image
downloading to provide the host IP we are contacting. This
saves having to dig through other logs to get this information.
I added a mock unit test to test_glance to verify the download
retry mechanism works since this wasn't verified before.
It is the first mock test in test_glance.py
Change-Id: I4de2b9e61ce25fb8ab693eac2f67559d0eb01a77
If a compute manager is stopped / fails during POWERING-ON or
POWERING-OFF operations then the instance will be left stuck in
a transitional task_state.
This change handles both these states by simply either retriggering
the power on or power off request on start-up of the compute manager.
If the operation had previously completed then retrying will
essentially be a no-op so it is safe to handle instances in this
state in this way.
Closes bug: #1304333
Change-Id: I262be6b13a764bc1355be34cdc0180e8e87f260b
The V3 API multinic extension is missing the expected errors
decorators which means that unexpected internal Nova exceptions
are not caught correctly. This patch adds the expected error
decorators.
Change-Id: I99311275197bb5123079c8910855386252028dec
Closes-Bug: 1303781
The test_get_domain_info_with_more_return() unit test was causing
failure on some systems where lxml was not capable of handling None for
the xml to parse. However, our unit tests should not be testing libvirt;
the unit tests in libvirt already do that. Our unit tests should simply
test the code boundaries of the unit of code that they wish to stress,
and not anything further.
This patch changes the unit test in question to only test the code
within the libvirt_driver.LibvirtDriver.get_info() method, and nothing
more, and in doing so, we remove any calls at all to libvirt and mock
out where the code passes the boundaries of the get_info() method.
Change-Id: I022cc331a980c2a4d98f16d2d77b24839b528464
Closes-bug: #1301602
Server group scheduler filters were added to the default set of
scheduler filters. Update the docs to reflect the updated defaults.
Change-Id: I614cf83e419c93038fc4ed7287ec743cedb4860e
Related-bug: #1303983
The Icehouse release includes a server group REST API. For these
groups to actually function properly, the server group scheduler
filters must be enabled. So, these filters should be enabled by
default since the API is also enabled by default. If the API is not
used, the scheduler filters will be a no-op.
DocImpact
Change-Id: Ia52d7fcfff52377d8beae2acd9b7eba9c6c74e09
Closes-bug: #1303983
This change made the subunit_log 190 MB on every run (14MB
in the gz version). It also dramatically increases the
memory needed to run unit tests. We need to revert and
come at this problem with fresh eyes to address the problem
at hand without effectively overrunning people's environments.
This reverts commit f9090b0bd7.
Change-Id: Ia1cfc3d874ddf4f8ee2037b487d22f968585854e
The fix includes separating out methods for
associating/disassociating a vsphere vm from the
openstack instance. Modifying the resize workflow
to use the above mentioned methods.
Closes-Bug: #1295381
Change-Id: I92acdd5cd00f739d504738413d3b63a2e17f2866