17682 Commits

Author SHA1 Message Date
Jenkins
aaae75dc35 Merge "Add accounting for orphans to resource tracker." 2012-12-17 17:22:24 +00:00
Jenkins
84363a2e91 Merge "Add syslogging to nova-rootwrap" 2012-12-17 17:09:15 +00:00
Brian Elliott
07af4ceea7 Add accounting for orphans to resource tracker.
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
2012-12-17 16:53:58 +00:00
Clark Boylan
aef9802089 Replace fixtures.DetailStream with fixtures.StringStream.
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
2012-12-16 17:31:46 -08:00
Jenkins
f04722ee22 Merge "Ensure that sql_dbpool_enable is a boolean value" 2012-12-16 06:17:43 +00:00
Dan Smith
2f8ffcc46d Move agent_build_get_by_triple to conductor
This patch moves the final method in Compute's VirtAPI to using
the conductor.

Related to blueprint no-db-compute-manager

Change-Id: Icaf8990e117c8de7198de2f26f0d77e56c129430
2012-12-15 08:19:57 -08:00
Dan Smith
20f0c601fe Move provider_fw_rule_get_all to conductor
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
2012-12-15 08:08:33 -08:00
Dan Smith
20811e9298 Move security_group operations in VirtAPI to conductor
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
2012-12-15 08:07:51 -08:00
Jenkins
84472dd18d Merge "Retry NBD device allocation." 2012-12-15 02:02:36 +00:00
Jenkins
083714206b Merge "Use testr to run nova unittests." 2012-12-15 00:48:06 +00:00
Michael Still
6da1dbc849 Retry NBD device allocation.
Mitigates bug 726244.

Change-Id: I2f09f3a69c3eb61ca3af90355d5861373b7ae277
2012-12-15 10:22:03 +11:00
Clark Boylan
4abc8cc64f Use testr to run nova unittests.
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
2012-12-14 14:22:20 -08:00
Dan Smith
bd7fb1c30f Add a developer trap for api samples
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
2012-12-14 11:18:34 -08:00
Jenkins
8652d71ade Merge "Fixes KeyError: 'sr_uuid' when booting from volume on xenapi" 2012-12-14 18:34:00 +00:00
Jenkins
2e44437f2d Merge "Allow xenapi to work with empty image metadata" 2012-12-14 16:49:02 +00:00
Jenkins
b68bb0a2c5 Merge "Fix use of osapi_compute_extension option in api_samples." 2012-12-14 15:11:31 +00:00
Jenkins
0597c1ccd3 Merge "Fix errors in used_limits extension" 2012-12-14 14:02:52 +00:00
Jenkins
e56b2053f1 Merge "Add general mechanism for testing api coverage." 2012-12-14 04:01:10 +00:00
OpenStack Jenkins
e495276049 Merge "Imported Translations from Transifex" 2012-12-14 03:45:19 +00:00
Monty Taylor
9138e99c14 Add general mechanism for testing api coverage.
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
2012-12-13 18:32:42 -08:00
Armando Migliaccio
5019de6bed Allow xenapi to work with empty image metadata
Also, add a number of tests for unit coverage
of the boot from volume feature.

Fixes bug #1087869

Change-Id: I7160e8c3b3d0ecd55a0ee0a66c512595bc25fb43
2012-12-14 01:06:14 +00:00
OpenStack Jenkins
18817c7405 Imported Translations from Transifex
Change-Id: I56f5172f01600c9a8d8789ac0e811b4df3a257d7
2012-12-14 00:02:47 +00:00
Davanum Srinivas
76588ed039 Fix for broken switch for config_drive
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
2012-12-13 17:47:20 -05:00
Jenkins
d1e7f796bf Merge "Remove sleep in test_consoleauth." 2012-12-13 22:41:02 +00:00
Jenkins
b7b578ff8c Merge "Fix poll_rescued_instances periodic task" 2012-12-13 20:45:10 +00:00
Jenkins
76f9b4d499 Merge "Stop nbd leaks, remove pid race." 2012-12-13 20:35:09 +00:00
Matthew Treinish
98a7161f62 Fix use of osapi_compute_extension option in api_samples.
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
2012-12-13 15:33:34 -05:00
Jenkins
421a2094c4 Merge "Add VirtAPI tests" 2012-12-13 18:24:53 +00:00
Clark Boylan
2ce5fee0d6 Remove sleep in test_consoleauth.
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
2012-12-13 10:19:02 -08:00
Mark McLoughlin
6c9d9ab434 Fix errors in used_limits extension
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
2012-12-13 16:46:44 +00:00
Jenkins
be12f8b785 Merge "Move metadata_{host,port} to network.linux_net" 2012-12-13 15:23:37 +00:00
Jenkins
e1dea7cd63 Merge "Move API extension opts to api.openstack.compute" 2012-12-13 15:21:30 +00:00
Jenkins
78e54998b6 Merge "Move osapi_max_limit into api.openstack.common" 2012-12-13 15:21:11 +00:00
Jenkins
3c36a7b0ac Merge "Move link_prefix options into api.openstack.common" 2012-12-13 15:19:44 +00:00
Andrew Laski
c40fc8a4db Fix poll_rescued_instances periodic task
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
2012-12-13 09:13:48 -05:00
Jenkins
dc48ce7fb1 Merge "Fix for correctly parsing snapshot uuid in ec2api" 2012-12-13 11:12:10 +00:00
Jenkins
dd05b52bb3 Merge "Clean up run_tests.sh" 2012-12-13 09:39:41 +00:00
Thierry Carrez
a5b12b675c Add syslogging to nova-rootwrap
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
2012-12-13 10:09:46 +01:00
Hengqing Hu
7d89fdf544 Clean up run_tests.sh
Remove obsolete lines.

Change-Id: Id6c868c857733dc4cbeceacab4d3a817b43b77b1
2012-12-13 15:46:37 +08:00
Jenkins
62b38931c5 Merge "Add support for parsing the <uuid> from libvirt host capabilities" 2012-12-13 07:14:25 +00:00
Jenkins
5f575d8b9c Merge "Add support for libvirt domain <smbios> XML config" 2012-12-13 07:14:02 +00:00
Gary Kotton
a630ea4e0d Ensure that sql_dbpool_enable is a boolean value
Fixes bug 1089232

Change-Id: Ida46aaf6b41422590ce1c04a606cd24c70891ed9
2012-12-13 06:52:05 +00:00
Michael Still
e4377fdb0e Stop nbd leaks, remove pid race.
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
2012-12-13 17:08:21 +11:00
Jenkins
b963a93194 Merge "Use nova.test.TestCase as the base test class." 2012-12-13 02:55:18 +00:00
Jenkins
3af7ae8079 Merge "Add support for libvirt domain <sysinfo> XML config" 2012-12-13 00:11:33 +00:00
Jenkins
df143208b0 Merge "Add Jian Wen to .mailmap" 2012-12-13 00:08:14 +00:00
Jenkins
998c2649b7 Merge "Fixes string formatting error." 2012-12-13 00:07:01 +00:00
Jenkins
31f0eec568 Merge "Make update_service_capabilities() accept a list of capabilities" 2012-12-13 00:00:26 +00:00
Jenkins
e467a0a1fe Merge "Fix KeyError of log message in virt/libvirt/utils.py" 2012-12-12 23:59:56 +00:00
Jenkins
701a15ef1f Merge "Move remaining aggregate operations to conductor" 2012-12-12 23:33:39 +00:00