Commit Graph

23002 Commits

Author SHA1 Message Date
Matt Riedemann c8ec991483 Add mock to test-requirements
There are several changes which depend on using mock rather than mox for
unit tests:

https://review.openstack.org/#/c/42474/
https://review.openstack.org/#/c/43161/

And the general trend seems to be to move from using mock over mox for
new tests (see blueprint mox-to-mock-conversion).

And given mock is listed in the global-requirements.txt file in the
openstack/requirements project, we should require mock for nova so we
can start using it.

Change-Id: Iaa0f233c28de2f92a237ee6d089858ee10bc6d2f
2013-08-28 19:30:49 -07:00
Jenkins 1b96b77211 Merge "Removes fixed ips extension from V3 API" 2013-08-29 13:38:56 +00:00
Jenkins 5d120f5481 Merge "Avoid swallowing exceptions in network manager" 2013-08-29 12:31:08 +00:00
Jenkins ff5bd654ce Merge "Fix HTTP response for PortInUse during boot (v3 API)" 2013-08-29 10:47:46 +00:00
Jenkins 5774bf464a Merge "Introduce Invalid* EC2 error codes" 2013-08-29 08:55:15 +00:00
Jenkins 432fa7f621 Merge "Add db.block_device_mapping_get_by_id" 2013-08-29 08:50:13 +00:00
Jenkins 0838f36b8e Merge "Add volume snapshot APIs to driver interface" 2013-08-29 08:49:41 +00:00
Mark McLoughlin 141a1eb805 Avoid swallowing exceptions in network manager
In _allocate_fixed_ips() and setup_networks_on_host(), we spawn off
green threads to call _rpc_allocate_fixed_ip() and
rpc_setup_network_on_host() on remote network managers, but if there is
an exception in the thread it just gets swallowed.

We don't really need a GreenPool here. It's not like its limit of 1000
threads is relevant here. Just use eventlet.spawn(), collect the list of
threads spawned and call wait() on each of them. This will ensure the
exception gets raised by wait().

Also, fix a case in the v3 integrated servers test where we are setting
up fake networks which are associated with a non-existent 'fake-mini'
host. See also I9854863bbec8834c638c55832411f63da570f82d.

blueprint: oslo-messaging
Change-Id: I7af1c4c1869edf3601809fe02fb82b12c8b70811
2013-08-29 09:11:20 +01:00
Chris Behrens 45f1c598b7 Change prep_resize paths to use objects
Converts calls to compute's prep_resize to pass a new-world instance
object.

This does not convert the scheduler prep_resize method which is still
called on reschedules.  It will soon be deprecated anyway.

Related to blueprint unified-object-model

Change-Id: I7a150f119547595aec962d5e5a8d2ab815d0b6c5
2013-08-29 06:53:11 +01:00
Chris Behrens a20dc40ca6 Deprecate conductor migration_create()
Converts the 1 use of conductor migration_create() to use the object
model, instead.

Related to blueprint unified-object-model

Change-Id: I5d8cf38d10d1092f2890b4f381337d188f4a7cf2
2013-08-29 06:53:11 +01:00
Chris Behrens 2be50f0f3f Make backup and snapshot use objects
This makes the backup and snapshot paths use objects.  To make things
cleaner for syncing compute rpcapi and cells rpcapi, the
single snapshot_instance rpc method that was used for both snapshot and
backup has been split into backup_instance and snapshot_instance.  The
appropriate cells versions have been added.

The backup and snapshot tests have also been converted into unit tests and
moved into test_compute_api.py.

Related to blueprint compute-api-objects

Change-Id: Ibdaee07290cf8d61c106702aa7068dd308bc9aac
2013-08-29 06:53:11 +01:00
Chris Behrens ca989cdddc Make inject_network_info use objects
Makes the inject_network_info path use instance object.

Related to blueprint compute-api-objects

Change-Id: I8d6b90cac0c1f638b623def319f676e95b416e09
2013-08-29 06:53:11 +01:00
Chris Behrens 052e5fdba8 Convert reset_network to use instance object
Converts all calls to reset_network to use objects.  Also adds the
cells rpcapi methods to match compute rpcapi and ditches the special
cells code in compute/cells_api.py

Related to blueprint compute-api-objects

Change-Id: If4da142864cbe993a7cc852358e3b27bd8c02629
2013-08-29 06:53:11 +01:00
Chris Behrens dfd4a5562b Make compute_api use objects for lock/unlock
Converts compute_api.lock and unlock to require objects and modifies the
callers to pass them.

Related to blueprint compute-api-objects

Change-Id: Ice8361328cdfeb92207c778beb07b55a9d4eda8d
2013-08-29 06:53:11 +01:00
Jenkins 18f46fee80 Merge "Pass objects for revert and confirm resizes" 2013-08-29 04:23:49 +00:00
Jenkins d58e22c229 Merge "Use implicit nullable=True in sqlalchemy model" 2013-08-29 03:38:54 +00:00
Jenkins d5beb707e3 Merge "Adds Flavor ID validations" 2013-08-29 03:18:27 +00:00
Jenkins 49bd707789 Merge "Implement front end rate-limiting for Cinder volume" 2013-08-29 01:48:31 +00:00
Jenkins be79e90af7 Merge "Fix the message of coverage directory error" 2013-08-29 01:48:00 +00:00
Jenkins c9aef3734a Merge "Correct the status code to 201 for create v3" 2013-08-29 01:17:15 +00:00
Jenkins 32054a690b Merge "Added test case in test_migrations for migration 208" 2013-08-29 00:40:34 +00:00
Jenkins ca5af57ac0 Merge "Fix error messages in v3 aggregate API" 2013-08-29 00:39:45 +00:00
Jenkins e05f557bcc Merge "Fix aggregate creation/update with null or too long name" 2013-08-29 00:38:54 +00:00
Jenkins 23b14f2a42 Merge "Convert _poll_unconfirmed_resizes to use Migration object" 2013-08-28 23:29:44 +00:00
Jenkins 52293a6b45 Merge "Filter network by project id" 2013-08-28 23:29:13 +00:00
Jenkins 4b4d4bbac8 Merge "Raise timeout in fake RPC if no consumers found" 2013-08-28 23:28:41 +00:00
Jenkins e590c60a6f Merge "Stub out instance_update() in build instance tests" 2013-08-28 23:28:09 +00:00
Jenkins 01aaccfbd4 Merge "Mock out action event calls in build instance test" 2013-08-28 23:27:38 +00:00
Jenkins 1bb2d61f6b Merge "Make compute_api confirm/revert resize use objects" 2013-08-28 23:27:07 +00:00
Jenkins 3fe63b6803 Merge "Make compute_api migrate/resize paths use instance objects" 2013-08-28 23:25:00 +00:00
Jenkins acfabb646a Merge "Store CONF.baremetal.instance_type_extra_specs in DB" 2013-08-28 23:22:16 +00:00
Jenkins 983d1e9f03 Merge "Fix typo in baremetal docs" 2013-08-28 23:10:15 +00:00
Jenkins 7c28937ce7 Merge "Fix race when running initialize_gateway_device()" 2013-08-28 23:09:35 +00:00
Jenkins 7fe5d41dd6 Merge "Added qemu guest agent support for qemu/kvm" 2013-08-28 20:59:28 +00:00
Jenkins 14d74fcd53 Merge "Don't need to init testr in run_tests.sh" 2013-08-28 20:29:07 +00:00
Chris Behrens f6efce746d Pass objects for revert and confirm resizes
The revert_resize and confirm_resize compute API methods were previously
converted to accept and use objects.  This actually passes them over RPC
instead of their primitive forms.

Implements blueprint unified-object-model

Change-Id: I6dbd5fc0ddcaa37013e885b71aabede92eedf120
2013-08-28 20:24:41 +00:00
Chris Behrens 0cf4ca72f6 Convert _poll_unconfirmed_resizes to use Migration object
We can now call the compute api directly for confirm_resize, so the
conductor method 'compute_confirm_resize' has been deprecated.

This was also the last call to conductor's:
'migration_get_unconfirmed_by_dest_compute'

so it, too, has been deprecated.

Related to blueprint unified-object-model

Change-Id: I57a4898f14d35e97d3a9ed8fd2a99f157c4111a7
2013-08-28 20:24:41 +00:00
Dan Smith 5d0ccceb20 Make compute_api confirm/revert resize use objects
This makes the compute_api confirm and revert_resize calls use
and return Migration objects for its work.  This also adds the
cells RPC methods needed to support child cells re-calling the
compute API with objects.

Related to blueprint compute-api-objects

Change-Id: I26adc8d2fadc4a31cd0de94887e163040691ede1
2013-08-28 20:24:41 +00:00
Dan Smith a2ba455e2d Make compute_api migrate/resize paths use instance objects
This converts the migrate/resize/live_migrate paths to use instance
objects.  This also syncs up cells rpcapi and compute task rpcapi so
we can ditch the special cells code in compute/cells_api.py.

Related to blueprint compute-api-objects

Change-Id: I977a5edb8a5313b2a8827796ff8c2bc081f9d63f
2013-08-28 20:24:41 +00:00
Jenkins d40ffa8b2c Merge "Improve parameter related EC2 error codes" 2013-08-28 19:49:14 +00:00
Jenkins ee1c51d332 Merge "Port multiple_create extension to V3 API" 2013-08-28 19:48:06 +00:00
Jenkins 41cc51ef93 Merge "Raises masked AssertionError in _test_network_api" 2013-08-28 19:18:15 +00:00
Matthew Treinish 7baa5265e3 Fix race when running initialize_gateway_device()
If multiple calls that result in initialize_gateway_device() being
run occur at roughly the same time then there is a race between the
ip route commands being run at the same time. This will cause
instances to go into an error state. This commit adds a global lock
to the initialize_gateway_device() method to prevent it from being
run at the same time to avoid this issue.

The race condition is not directly testable in unit tests because it
requires a multithreaded environment to run
initialize_gateway_device() at the same time. It was uncovered
with tempest in parallel.

Fixes bug 1217163

Change-Id: Ib750381636d1341062928d0abc8d3518e327935e
2013-08-28 14:38:16 -04:00
Jenkins 693872ee00 Merge "Fix untranslated log messages in libvirt driver" 2013-08-28 18:36:40 +00:00
Jenkins a97fa92fe9 Merge "Object support for instance groups" 2013-08-28 18:36:09 +00:00
Jenkins 4abd1ca96c Merge "Add DocStrings for function allocate_for_instance" 2013-08-28 17:20:49 +00:00
Joe Gordon ce187b60e7 Use implicit nullable=True in sqlalchemy model
In sqlalchemy nullable defaults to True, so we don't need to explicitly
set the value to the default.  By removing all nullable=True everywhere
it makes it easier to spot the nullable=False and also should lead to
less confusion when adding a new column (do I need to add nullable or
not, only some other columns do it)

Change-Id: I22fe2d0caca77005553a6a6f0c7cc2d3e8ea5512
2013-08-28 12:03:13 -04:00
Jenkins 810f87ff4a Merge "fix volume swap exception cases" 2013-08-28 15:41:22 +00:00
Jakub Ruzicka 026ba19aac Introduce Invalid* EC2 error codes
ec2_code attribute with valid EC2 error code was added to several
Nova exceptions to allow simple error code mapping in EC2 API.

Implements: blueprint ec2-error-codes

Change-Id: Ica5cdf4a9662b4b569ded1f1b1931b9a3cdaa9f3
2013-08-28 11:08:08 -04:00
Jakub Ruzicka 4f702880d5 Improve parameter related EC2 error codes
This patch replaces parameter/attribute related raises of EC2APIError
with specific exceptions.

 * Introduce new MissingParameter exception with 'MissingParameter'
   ec2_code.
 * Introduce new InvalidAttribute exception which isn't a valid EC2
   error code but it's needed nonetheless as the nova EC2 API isn't
   fully compatible.
 * Add 'InvalidParameterValue' ec2_code to existing
   InvalidParameterValue exception and use it where appropriate. Also
   add it to existing InvalidPortRange exception.

Implements: blueprint ec2-error-codes

Change-Id: I7820edfd9045fdc817a8538a754c9add20b68cf4
2013-08-28 11:08:08 -04:00