Commit Graph

22654 Commits

Author SHA1 Message Date
Yassine Lamgarchal 35925e5d28 Add flag to make IsolatedHostsFilter less restrictive
This patch allows to run 'isolated' and 'non isolated'
images on isolated hosts by adding a flag
'restrict_isolated_hosts_to_isolated_images'.

If the flag is set to True then 'non isolated' images
can't be run on isolated hosts (same behaviour as the
current filter) otherwise they can be run on isolated
hosts.

DocImpact

blueprint improve-isolatedhostsfilter

Change-Id: I8c092caf32c05be88a547a7e8cb0530cc4925080
2013-08-21 10:36:33 +02:00
Jenkins c6d5325ef6 Merge "Search filters for get_all_system_metadata should use lists" 2013-08-21 06:11:56 +00:00
Jenkins cfeb697c71 Merge "Adding support for iSER transport protocol" 2013-08-21 05:56:00 +00:00
Jenkins 92a143456e Merge "Enforce flavor access during instance boot" 2013-08-21 05:55:37 +00:00
Jenkins 3f4eeb8885 Merge "VMware: Ensure Neutron networking works with VMware drivers" 2013-08-20 23:14:14 +00:00
Jenkins 1b5c0e8173 Merge "Support networks without gateway" 2013-08-20 23:11:26 +00:00
Burt Holzman 0a0d5f426e Search filters for get_all_system_metadata should use lists
The search filter should have the form:
[{'foo'}: ['bar'], {'baz'}: ['quux']]

The underlying code accidentally and unfortunately allows filters that look like
[{'foo'}: 'bar', {'baz'}: 'quux'], but that is not guaranteed to work in the future.

Change-Id: Ic28612c8c843194e2f4f6918166177813fd5dee3
2013-08-20 13:16:42 -05:00
Jenkins fbc2fbe278 Merge "Change RPC to use new BDM format for instance boot" 2013-08-20 17:29:10 +00:00
Jenkins c84dff0495 Merge "Make API part of instance boot use new BDM format" 2013-08-20 17:28:44 +00:00
Russell Bryant 4054cc4a22 Enforce flavor access during instance boot
The code in the servers API did not pass the context when retrieving
flavor details.  That means it would use an admin context instead,
bypassing all flavor access control checks.

This patch includes the fix, and the corresponding unit test, for both
the v2 and v3 APIs.

Closes-bug: #1212179

Change-Id: I681ae9965e19767df22fa74c3315e4e03a459d3b
2013-08-20 11:38:16 -04:00
Jenkins bcb236d341 Merge "fix libguestfs mount order when inspecting" 2013-08-20 15:19:17 +00:00
Jenkins 2ca2088958 Merge "Demote personalities from core of API v3 as extensions os-personality" 2013-08-20 14:15:25 +00:00
Shlomi Sasson a97badb317 Adding support for iSER transport protocol
Implements: blueprint add-iser-support-to-nova
Change-Id: I3f88b376c6d5b2682d421d3093e1f8decd263f5e
2013-08-20 15:43:42 +03:00
Jenkins 381bb0c7df Merge "Port disk_config API to v3 Part 2" 2013-08-20 12:39:10 +00:00
Jenkins e0e88ee6f8 Merge "Offer a paginated version of flavor_get_all" 2013-08-20 12:38:48 +00:00
Jenkins 6725c9c94e Merge "Set the image_meta for the instance booted from a volume" 2013-08-20 06:06:40 +00:00
Jenkins e562dd1072 Merge "Don't pass RPC connection to pre_start_hook" 2013-08-20 05:12:26 +00:00
Jenkins 13b48f62b4 Merge "Add Migration object" 2013-08-20 05:06:34 +00:00
Jenkins f11c9d7bcc Merge "Personality files can be injected during server rebuild" 2013-08-20 00:18:35 +00:00
Jenkins 6875dee3fb Merge "Handle NeutronClientException in secgroup create" 2013-08-19 22:48:40 +00:00
Nikola Dipanov 552693e4ad Change RPC to use new BDM format for instance boot
This patch makes rpc calls that are the result of booting an instance
propagate the new block device mapping format.

The way this is done is by adding a 'legacy_bdm' flag to the conductor
(task) API. Since both the scheduler and the compute service propagate
the block device mapping as part of the request_spec field, a flag named
legacy_bdm_in_spec to indicate that was introduced in their respective
APIs.

Currently block_device_mapping is not used by any of the in-tree filters
in the scheduler, so it is assumed that scheduler's boot functionality
has now transitioned to the new format.

This patch also bumps RPC versions of the task, scheduler and compute
manager classes.

Finally this patch propagates the legacy_bdm_in_spec through the
run_instance callback of the compute manager so that, in case of error -
the instance is re-scheduled with the proper flag set.

blueprint: improve-block-device-handling

Change-Id: I5f25ddd4d586dda91061f065c1796be726b0ede3
2013-08-19 18:54:17 +02:00
Nikola Dipanov 0ef7e15e22 Make API part of instance boot use new BDM format
This patch makes the API part of the instance boot process rely on the
new BDM format. It adds additional validations that are enabled due to
using the new format.

Since the new format will allow to specify devices that will be created
as images on the hypervisor (if the hypervisor enables it), in order
to prevent a DOS, a new config option 'max_local_block_devices' was
added. This option allows the operator to set a limit on the number of
destination_type='local' block devices a user can specify per VM.

This patch also refactors and simplifies how block devices are handled
during boot, and makes sure that validation errors are caught and
transformed to expected HTTP errors.

Change-Id: I62e0807fcff0a284ff72555d107cac1c9864e46d
blueprint: improve-block-device-handling
2013-08-19 18:54:17 +02:00
Jenkins dc0be664a1 Merge "Add passing a logging level to processutils.execute" 2013-08-19 16:18:58 +00:00
Dan Smith 3d88d08b5e Add Migration object
This adds a migration object implementation and tests.

Related to blueprint compute-api-objects

Change-Id: Iec0e45f4768cf3fc2f31c1c23c1aadfdefefa797
2013-08-19 15:15:15 +00:00
Mark McLoughlin 57e5a1f88d Don't pass RPC connection to pre_start_hook
In review I5bf7795fca21627566ef4f688d45dc83bb953d1b (commit 3349417) we
passed an rpc_connection argument to pre_start_hook() so that we could
create additional queues.

See review Idf12c418a8ce1bc873e7ad6f702351e95d31aca3 for how this was
intended to be used. With oslo.messaging, we'd support doing something
like this by adding support for multiple targets to RPCServer since the
concept of a messaging connection isn't really exposed by the API in
quite the same way.

In any case, this rpc_connection parameter has never been used since it
was introduced, so let's remove it. Let's also move the invocation of
this hook back to where it originally was.

blueprint: oslo-messaging
Change-Id: I9181a3567a1b5a8a6077e78c85f4d28660f275a6
2013-08-19 11:49:34 +01:00
Gary Kotton 2d7520264a VMware: Ensure Neutron networking works with VMware drivers
Fixes bug 1202042

A new utility method, is_neutron, is added. This returns True
if Neutron/Quantum is used by the network_api_class.

Change-Id: Id1d1f29a02e906b98853670ea2ad589f04eba595
2013-08-19 01:10:18 -07:00
Jenkins d0d0c521c5 Merge "Fix project_user_quotas_user_id_deleted_idx index" 2013-08-19 06:53:01 +00:00
Jenkins ac3a7f0894 Merge "Refactor integrated tests to support V2 and V3 API testing" 2013-08-19 03:36:48 +00:00
liyingjun 9455a80c93 Fix project_user_quotas_user_id_deleted_idx index
The project_user_quotas_user_id_deleted_idx index in the 203 migration
for the project_user_quotas table was using the wrong column, it should
be using user_id instead of project_id since there is already an index
for the project_id column (defined directly above it).

Fixes bug 1205693

Change-Id: I6899afe5b57432345f69b4ee91ef947a4b9ef5c9
2013-08-19 10:56:46 +08:00
Svetlana Shturm 91eacf7cf9 Add migration with missing fkeys
There are few ForeignKeys that had been skipped in migrations
and declared in models.
This patch adds these relationships into db by new migration.

bp: db-sync-models-with-migrations

Change-Id: I63e6a853ec16b80ea52b1c0e8a94f8f60819312c
2013-08-19 09:34:10 +10:00
Jenkins a1fe3d7fe9 Merge "Improve performance of driver's get_available_nodes" 2013-08-17 01:57:14 +00:00
Chris Behrens 1094a1cdba Fixup some non-unity-ness to conductor tests
This moves some conductor compute task tests into the test class that
only tests the manager side.  It also removes testing of
scheduler_utils's set_vm_state_and_notify method as that is already
tested separately.

Change-Id: I30bd3897311870b10c8ec65182c81d341a904485
2013-08-16 23:31:47 +00:00
Chris Behrens 3e5a909305 Add scheduler utils unit tests
They were missing... although there is some testing via some conductor
tests that are not completely unit-y.  Those will be adjusted next.

Change-Id: I696dd8ff264fffb3ae015c3ae653c0799c60cecf
2013-08-16 23:31:46 +00:00
Chris Behrens b4ab277145 Convert admin_actions ext tests to unit tests
The tests for the admin_actions API extension (or v3 plugin) are
stubbing out conductor methods, which creates a lot of pain when
compute_api internals are changed.  Convert these tests to unit tests,
checking only that the appropriate compute_api methods are called with
the correct arguments.

Change-Id: I16634efa2397b36afa15b90712bfd678325bc049
2013-08-16 23:31:46 +00:00
Chris Behrens 9ab69dbdec Unit-ify the compute API resize tests
Move resize related compute API tests to test_compute_api and make them
unit tests.  This makes test changes easier when converting to objects.

This also caught a couple things where the cells compute api class was
not in sync that don't really end up being bugs, but need to match for
tests to pass.

Change-Id: I194310beb5e821e4a8262310d1bb80e0747e1c43
2013-08-16 23:31:46 +00:00
Jenkins 871107b12e Merge "Enforce compute:update policy in API" 2013-08-16 23:23:12 +00:00
Jenkins 03355f3bad Merge "Sync gettextutils from oslo-incubator" 2013-08-16 22:17:33 +00:00
Jenkins e72313b337 Merge "Fix cells manager RPC version" 2013-08-16 20:56:38 +00:00
Jenkins 02a3a25bcb Merge "Set launch_index to right value" 2013-08-16 18:40:37 +00:00
Jenkins 1f6c4f5c0f Merge "Remove deprecated CONF.fixed_range" 2013-08-16 16:48:38 +00:00
Jay Lau c8f0a545bf Set launch_index to right value
Fix bug 1212648

When boot multiple instances in one request, the launch_index
was not increased.

The fix was increase the launch_index one by one for each instances
in one request.

Change-Id: I27dde8cfae52853d33277c3d8e0e65c91bc6280b
2013-08-17 00:07:14 +08:00
David Ripton 599af3570a Add passing a logging level to processutils.execute
Previously, processutils.execute always logged what commands were
run at DEBUG level.  This is usually fine, but sometimes the caller
wants to log particularly important commands at INFO level instead,
and oslo should allow that.

This is oslo-incubator aa5b65882.  No other significant changes had
been made to processutils in oslo since the last sync.

Change-Id: I09dad3759bf2f759b297ee19205cf0460b9a6baa
2013-08-16 10:25:47 -04:00
Joe Gordon f95bc9ba1c Remove deprecated CONF.fixed_range
This was deprecated in Grizzly, and the TODO said remove for Havana.
fixed_range was deprecated in I4ec111079f7a1d253190e6a6008048f992a53f68

DocImpact: Remove deprecated config option

Change-Id: I1f429de7a7091adbd3a178d287b3a90e02664450
2013-08-15 22:42:27 -04:00
Joshua Hesketh 08b2433ddd Offer a paginated version of flavor_get_all
Implements nova.compute.flavors.get_all_flavors_sorted_list to
optimise get_all_flavors.

Fixes: bug #1028494
Change-Id: Ie0406c1d4b47a51473979910c0908b153497d503
2013-08-16 11:51:38 +10:00
Chris Yeoh 2b376cbe24 Refactor integrated tests to support V2 and V3 API testing
Refactors the integrated test classes so they can be used
for both V2 and V3 API testing. No actual V3 testing is
added in this changeset.

Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification

Change-Id: Ic7d7b513c3bc19ac1962c0a8489b55e9685fb7c0
2013-08-16 10:36:32 +09:30
Chris Behrens 33fa3fa07b Fix cells manager RPC version
A previous patchset forgot to bump the version to 1.19.

Change-Id: Iecadcdcc4d75b9e9295f216b3375bfbf852a77e3
2013-08-16 00:19:47 +00:00
Jenkins fa575b51ff Merge "Clean up unimplemented methods in the powervm driver" 2013-08-15 22:05:55 +00:00
Jenkins a5b1cb9300 Merge "Remove old legacy network info model in libvirt driver" 2013-08-15 21:37:45 +00:00
Jenkins 2124d1dd32 Merge "Fix typo in exception message" 2013-08-15 20:35:28 +00:00
Jenkins a4a7144c9e Merge "Make compute_capabilities_filter use information from DB not RPC" 2013-08-15 19:25:41 +00:00