Add accounting for orphaned instances to resource tracker. Orphans
are instances that, for whatever reason, exist on the hypervisor
but are not accounted for in the Nova DB.
Such instances would cause resource tracker to under-report usage
numbers and result in out of memory errors during build.
Change-Id: Icc970e34e01ff8c7dfb000889e5ea6e2d0421c77
Fixtures 0.3.12 adds StringStream as a successor to DetailStream (this
change was made for compatibility with python 3). Update Nova's tests to
use StringStream instead of DetailStream.
Change-Id: If697859a52f3a7db9dab38bd080b779bb3270287
This patch moves the final method in Compute's VirtAPI to using
the conductor.
Related to blueprint no-db-compute-manager
Change-Id: Icaf8990e117c8de7198de2f26f0d77e56c129430
This patch moves the compute/manager's use of the
provider_fw_rule_get_all() method to the conductor.
Related to blueprint no-db-compute-manager
Change-Id: I963fc65046d29b6eb92b82d559593a64ff775632
This patch adds the following methods to conductor's API and
redirects the use of them in nova-compute to conductor:
security_group_get_by_instance()
security_group_rule_get_by_security_group()
This involved changing the corresponding VirtAPI methods to
accept actual objects instead of IDs, to avoid introducing
additional DB messaging behavior.
Related to blueprint no-db-compute-manager
Change-Id: I14c2bcd181d0e0a1ec17130917c1a7eb0a091cf2
Convert nova from using nosetests to testr for its test runner. Some
tests had to be modified to get them to run properly under testr.
run_tests.sh has been updated to run testr instead of nosetests.
Coverage is collected by running subunit.run under coverage.py when the
coverage environment is selected.
Note that you will need to rebuild your virtualenvs as nose is being
removed from the dependency lists and is being replaced by testr. Tests
will run in different processes once this test is merged so you cannot
use test classes to pass information between tests. Each test should be
a proper independent unit. Additionally the -x and -d flags to
run_tests.sh have been removed as there are currently no decent
approximations for those functions.
Change-Id: I019ca098972ca749b195f59968cf21edd5ba9109
This adds a test in test_api_samples to verify that no new extensions
get added to the tree without matching api_samples. Since not all the
extensions currently in the tree have samples, there is an exclusion
list so that this passes now. Extensions should never be added to that
exclusion list, and the list should eventually go away when we get
all of the extensions tested.
Change-Id: I506450d2f3f5a32ff5c653b5940bae6c47790d01
Refactor the VirtAPI test that ensures all api methods have a test
method to work with parallel test runs. In the process, ensure that it's
dead simple to add a similar check for any test covering an API.
Change-Id: Ie5849a28aa4bfb8f5882ef57344e4131317d2e96
There's a wrong check in api.py, we should check if config_drive
is not a boolean string before we try to treat it as an image id
Fixes LP #1090148
Change-Id: I2e0bc49922781138e569471b0dd360fb3918b687
Change: I682fa491dd1435814b73404d91df3387504c3e39 changed the
scope of the osapi_compute_extension but didn't update it's use
in test_api_samples.py. This prevents the tests from being run
individually because the option is no longer in nova.config.
The CONF.import() for osapi_compute_extension now refers to the
proper location: nova.api.openstack.compute.contrib
Change-Id: I5d0f15c41e2d6e118a075872e706e91d6555dd39
test_consoleauth:ConsoleauthTestCase.test_tokens_expire called
time.sleep(1.1) in order to test that tokens with a TTL of 1 second
expire after one second. Problem is time.sleep() may return before the
entire sleep period is complete. Remove the sleep and instead use Oslo's
timeutils to override the time and advance it by one second to check
that expired tokens do expire.
Part of blueprint grizzly-testtools
Change-Id: Iae0e678fb12a76757523dc7dbccb4da98cef85e6
Fixes bug #1062049
There was a typo mapping the security groups resource to floating IPs.
Volumes usage isn't tracked by Nova any more since delete-nova-volume.
Key pairs don't work with the extension because of bug #1089877.
Change-Id: Ifd694b21fef1dc95e67c07dcef0cd6ea3daa8d53
The poll_rescued_instances periodic task now checks the amount of time
that an instance has been in the RESCUED stated before timing out the
rescue. It also now performs the unrescue through the compute api in
order to make sure the database is left in a consistent state.
The poll_rescued_instances method is no longer necessary in the virt
driver interface and has been removed. And also removed from the
different virt drivers, since it was just doing a 'pass' in each of
them.
bug 1088625
bug 1088627
Change-Id: I75f7dc188cc49e5f6e5c8a3cb256d1c42ff7d882
Add syslogging capabilities to nova-rootwrap, if you set parameter
use_syslog to True. You can specify a facility (syslog_log_facility)
and level (syslog_log_level) to use. Finalizes bp nova-rootwrap-options.
In doing so, it moves rootwrap config parsing to a nova.rootwrap.wrapper
object (and adds unit testing for it). It also improves log messages
content (including the name of the matching filter and the escalation
path used). Incidentally fixes bug 1084766.
Change-Id: Idb8cd9c9febd6263dafab4bc2bff817f00c53dc0
With the previous implementation, if a nbd device was found to be in
use by something other than nova it was removed from the class scoped
list of devices, but never re-added. This meant we "leaked" devices
away over time if we were competing with other nbd users on the
machine.
Instead of tracking our use at all, we should rely on the presence of
a user pid in /sys.
Resolves bug 1088083.
Change-Id: If777e270a0dda12034ea7ef1bc7fd688cadde8a9