Commit Graph

43614 Commits

Author SHA1 Message Date
OpenStack Proposal Bot ad2ea369fe Updated from global requirements
Change-Id: I04217182c7d8216120e254de3bace8a639973f9c
2016-11-10 10:19:39 +00:00
Jenkins 327d81dcb8 Merge "Add a no-op wait method to NetworkInfo" 2016-11-10 09:36:59 +00:00
Jenkins 72d0c3a484 Merge "libvirt: remove py26 compat code in "get_console_output"" 2016-11-10 00:37:34 +00:00
Jenkins 8398c49b70 Merge "Update nova api.auth tests to work with newer oslo.context" 2016-11-09 22:53:22 +00:00
Jenkins e44bd8820e Merge "Add explicit dependency on testscenarios" 2016-11-09 22:52:33 +00:00
Jenkins 02f1383c5b Merge "Move driver_dict_from_config to libvirt driver" 2016-11-09 22:51:26 +00:00
Esha Seth 1b351ef535 Add a no-op wait method to NetworkInfo
The normal deploy flow uses a NetworkInfoAsyncWrapper for network
allocation, and because of that many places have to call that class's
wait method to make sure it has completed. During a reschedule where
the network was allocated by a previous build attempt, a NetworkInfo
instance is retrieved instead, which does not have a wait method. This
then results in an exception complaining the missing method when it is
called. This fix addresses that by adding a no-op wait method to the
NetworkInfo class. Alternatively could have used isinstance or hasattr
to avoid making wait calls on NetworkInfo, but that could be
problematic to maintain as more places need to make wait calls in the
future and may not know to make the isinstance/hasattr check.

This fixes a regression issue caused by
61fc1b9ee1 ,
which reverted the previous fix made under
24a04c405a

Change-Id: Id7a71b2eb46ea7df19e7da0afbc0eafa87cac965
Closes-Bug: 1636109
2016-11-09 14:21:02 -05:00
Jenkins bedd5abeca Merge "Updated from global requirements" 2016-11-09 19:17:57 +00:00
Matt Riedemann 03d8e51172 Move driver_dict_from_config to libvirt driver
The driver_dict_from_config helper method is only used by the
libvirt driver and is very specific to how the libvirt driver
parses the libvirt_volume_drivers list of values, so this change
moves it to the libvirt driver so that we can expand it in a
following change to add specific error handling for the libvirt
driver.

Change-Id: I2b41d9e4e72b120f70371fff1201600acaa53708
2016-11-09 11:48:20 -05:00
Jenkins 61b50feade Merge "Fix a TypeError in notification_sample_base.py" 2016-11-09 15:05:24 +00:00
OpenStack Proposal Bot cd15b70b34 Updated from global requirements
Change-Id: Id48bb947ae71b8ca9058cc1035b72f04e76ba127
2016-11-09 04:20:44 +00:00
Jenkins 02ca441aa9 Merge "[placement] Add support for a version_handler decorator" 2016-11-09 03:18:16 +00:00
Joshua Harlow a672176111 Update nova api.auth tests to work with newer oslo.context
Due to https://review.openstack.org/#/c/357537/ being
deprecated and removed certain tests in nova are now failing.

To make them pass again use the non-deprecated headers
instead.

Change-Id: I4e26c4517235f4320437904801c374d710655670
2016-11-08 15:59:59 -08:00
Markus Zoeller b05a32e7f6 libvirt: remove py26 compat code in "get_console_output"
The "get_console_output" interface had code for python2.6 compatibility.
As we need at least python2.7, we can drop that code, which makes the
method (a little) easier to read.
The unit tests don't need any change, as the expected result is the same.

Change-Id: Ic3c22b96937a836dbc50b7ce3b2ba1a864450180
2016-11-08 16:25:36 +01:00
Sahid Orentino Ferdjaoui a6053dd608 libvirt: add migration flag VIR_MIGRATE_PERSIST_DEST
This commit adds in the default migration flags
VIR_MIGRATE_PERSIST_DEST which ensures that the domain XML migrated is
going to be set in libvird on destination node.

Change-Id: I7878e3cd227ed2cf6eb7c001e57c5fc830c0ec18
2016-11-08 02:48:39 -05:00
OpenStack Proposal Bot 0dc1bc3eb9 Updated from global requirements
Change-Id: I5657f22c2e9db9d6ff1d9bef9ed6b9c3f4afde72
2016-11-07 18:56:32 +00:00
Jenkins 4986c2a65a Merge "placement: add ResourceClass and ResourceClassList" 2016-11-07 18:30:46 +00:00
Gábor Antal 569e463f02 Fix a TypeError in notification_sample_base.py
In notification_sample_base, a possible error is found and fixed, as

    extra_params['return_reservation_id'] = True

is a valid code only when extra_params is not None.
However, this is not checked. So when we try to boot a server
without extra parameters, a TypeError is raised:

    TypeError: 'NoneType' object does not support item assignment

In this patchset, the possible bug is fixed.

Change-Id: I80e2286b231da39b8c1e4225145422ac48daee68
2016-11-07 17:31:38 +01:00
Dirk Mueller dfa2b6221b Add explicit dependency on testscenarios
With the update to oslotest 2.11.0, we're missing testscenarios
now in the unit test environment[1], so depend on it.

1: https://review.openstack.org/#/c/385274/

Change-Id: I57da89ade9eb3fcf920ec6d333db7577ee3ef138
2016-11-06 16:03:07 +01:00
OpenStack Proposal Bot 0132cc8c26 Updated from global requirements
Change-Id: Id4ed29504256fbf879a51481c6e2a3b44d8fe62d
2016-11-06 02:03:47 +00:00
Jenkins cdaef22aea Merge "placement: raise exc when resource class not found" 2016-11-04 22:00:40 +00:00
Jenkins f9f16229de Merge "Don't parse PCI whitelist every time neutron ports are created" 2016-11-04 17:37:25 +00:00
Ludovic Beliveau 53ab6068a3 Don't parse PCI whitelist every time neutron ports are created
The neutronv2 API is calling the method get_pci_device_devspec()
everytime a neutron port is created in order to get a PciDeviceSpec for a given
PCI device.  This method creates a new Whitelist (based on the config
CONF.pci_passthrough_whitelist) and parses it every time it is called.  This
is not a huge overhead but this is obvioulsy not needed and a waste of cycles.

Since only neutronv2 API uses get_pci_device_devspec(), this commit removes
the method in favor of using the Whitelist object directly (like it is done
in the PciDevTracker).

Change-Id: Idee4e9edecff0672680f323a916201aee8eeeabd
Closes-Bug: #1598843
2016-11-04 14:23:40 +00:00
Jenkins f223f2ebdb Merge "fix connection context manager in rc cache" 2016-11-04 11:22:37 +00:00
Jenkins 5a81b00e6b Merge "Log warning when user set improper config option value" 2016-11-04 02:34:06 +00:00
Jenkins 425b01f10f Merge "Fix database poison warnings, part 24" 2016-11-04 01:33:07 +00:00
Jenkins ef55e4fd97 Merge "Fix database poison warnings, part 23" 2016-11-04 01:26:45 +00:00
Jenkins fe49e933b8 Merge "fix testcase test_check_can_live_migrate_dest_fills_listen_addrs" 2016-11-03 22:40:50 +00:00
Jenkins 23343c1b41 Merge "libvirt: add supported vif types for virtuozzo virt_type" 2016-11-03 22:40:12 +00:00
Jenkins 734fabf295 Merge "libvirt: sync time on resumed from suspend instances" 2016-11-03 22:34:22 +00:00
Jenkins 8715003129 Merge "PCI: Fix PCI with fully qualified address" 2016-11-03 17:30:34 +00:00
Jenkins 044e9f7ab0 Merge "pci: remove pci device from claims and allocations when freeing it" 2016-11-03 17:19:54 +00:00
Jenkins 47e0bd80ef Merge "Fix import statement order" 2016-11-03 17:19:17 +00:00
Jenkins e127c7eab1 Merge "libvirt: fix incorrect host cpus giving to emulator threads when RT" 2016-11-03 17:18:32 +00:00
Jenkins a8113eb067 Merge "Add related options to floating ip config options" 2016-11-03 16:56:50 +00:00
Jenkins 20591e1ed6 Merge "Transform instance.shutdown notifications" 2016-11-03 16:09:49 +00:00
Jenkins 0825f6fc0b Merge "Transform instance.power_off notifications" 2016-11-03 16:08:55 +00:00
Jenkins ad0789313f Merge "Transform instance.unpause notifications" 2016-11-03 16:08:19 +00:00
Jenkins 8da29bfbf0 Merge "Transform instance.unshelve notifications" 2016-11-03 16:07:43 +00:00
Jay Pipes 328c45bd59 placement: add ResourceClass and ResourceClassList
In preparation for the placement REST API getting CRUD operations on
resource classes, create ResourceClass and ResourceClassList objects.
In this patch, we only add a ResourceClassList.get_all() method that
merges the standardized resource classes with any custom resource
classes that might have been added to the resource_classes table.
Followup patches will add the create(), delete() and save() methods and
then finally the REST API changes.

Change-Id: Ia9462698fafe3c70a51bb3746a6c2a45175fadf3
blueprint: custom-resource-classes
2016-11-03 11:48:53 -04:00
Jay Pipes 69bac2f99c placement: raise exc when resource class not found
The ResourceProvider.set_inventory() method was not raising NotFound
when an Inventory object in the supplied InventoryList object was using
a resource class that did not exist in the resource class cache. This
patch fixes that by having the string_from_id() and id_from_string()
methods of the resource class cache raise ResourceClassNotFound instead
of returning None. We raise specific ResourceClassNotFound and
InventoryWithResourceClassNotFound exception subclasses to differentiate
in the inventory API handler between an unknown resource class and a
known resource class that doesn't exist in a given resource provider's
inventory.

We return a 400 Not Found when InventoryWithResourceClassNotFound is
raised on updating a single inventory, but return a 409 Conflict when
InventoryWithResourceClassNotFound is raised on updating a set of
inventory records since in the latter scenario, it represents a race
condition that frankly should not occur.

Change-Id: I350b02dcdbaa9d30d885cd085f60daa6b53a7745
2016-11-03 11:48:53 -04:00
Jay Pipes 419cd6a8bc fix connection context manager in rc cache
This patch changes the context manager call in the _refresh_from_db()
method from this:

with ctx.session.connection() as conn:

to this:

with db_api.api_context_manager.reader.connection.using(ctx):

This is necessary to prevent errors about using a closed connection that
surfaced when writing a functional test case that tested that deleting a
custom resource class when inventory is associated with that custom
resource class.

Change-Id: I844d00028281ccbbfa527cd77469592fe1d7c151
2016-11-03 11:48:52 -04:00
Jenkins 3c46a54858 Merge "Remove unreachable code" 2016-11-03 15:47:17 +00:00
Jenkins 56138aab2d Merge "config options: Improve help for SPICE" 2016-11-03 15:15:58 +00:00
Moshe Levi 6689c96cdf pci: remove pci device from claims and allocations when freeing it
In drop_move_claim we call free pci device when we need to drop a
specific device from the src/dest node. This is done by calling
pci manager free_device. The current code just update the device
status to available in database but doesn't remove it from the
pci manager claims and allocations lists. This patch adds the
removal as well.

Closes-Bug: #1622854

Change-Id: If1cd6f3a635759cd55d116a34ca164630c61e085
2016-11-03 14:20:27 +00:00
Ludovic Beliveau d38d5767d1 PCI: Fix PCI with fully qualified address
Specifying a PF passthrough device in the pci_passthrough_whitelist using its
fully qualified PCI address (no wildcard) causes the device to not be
properly loaded.  The PCI device is then not available to be assigned to any
guest.

In this case, the hypervisor reports the PF device without a 'parent_addr'.
But in the PciAddress, match() is using it when doing the comparison to its
own address.

This commit changes the logic of the address matching method in PciDevSpec to
only try to match the address with a physical function device when a
'parent_addr' is reported by the hypervisor.

Change-Id: I5255240871d8ad5c216500f39520339efe46e84b
Closes-Bug: #1613434
2016-11-03 10:12:37 -04:00
ChangBo Guo(gcb) 079396d6ed Log warning when user set improper config option value
User may set wrong values for live migration related config options,
log warning when setting with wrong values, will use parameter min
of IntOpt to enforce these config options' values in Pike.

Change-Id: I064958998939da3e05bd04631a36d2a507bf50c1
2016-11-03 11:41:45 +00:00
Sahid Orentino Ferdjaoui 6683bf9b7d libvirt: fix incorrect host cpus giving to emulator threads when RT
Realtime guarantees in certain operating systems require that the
thread that is running the QEMU emulator is pinned to a physical CPU
that is *not* the same as any physical CPU that the vCPUs for a
realtime guest are pinned to. This patch ensures that the value of the
hw:cpu_realtime_mask flavor extraspec property is respected when
creating the libvirt configuration XML and sets emulatorpin values to
a physical CPU matching the hw:cpu_realtime_mask value.

Change-Id: I7f50dde0753b059a690dc50172fee645c94b8e5b
Closes-Bug: #1614054
2016-11-03 06:42:19 -04:00
Jenkins 8ecef74b27 Merge "Remove conductor local api:s and 'use_local' config option" 2016-11-02 21:49:19 +00:00
Jenkins 012f822992 Merge "Cleanup before removal of conductor local apis" 2016-11-02 21:45:39 +00:00