Matt Riedemann [Tue, 1 Nov 2016 21:39:17 +0000 (17:39 -0400)]
api-ref: document the power_state enum values
The OS-EXT-STS:power_state attribute in a server GET response
is enum values which are meaningless unless you look at the
nova/compute/power_states.py code. This change adds a mapping
to the description on that field in the api-ref.
Note there are gaps in the sequence, those are for unused values
as seen in the nova.objects.fields.InstancePowerState class.
Matthew Booth [Tue, 1 Nov 2016 16:25:01 +0000 (16:25 +0000)]
libvirt: Pass Host instead of Driver to volume drivers
We were initialising libvirt volume drivers by passing the
LibvirtDriver object. However, this is only ever used to fetch the
Host. We update the interface to pass the Host instead. This is
cleaner, but also better represents the intent of the interface. They
should not be able to access arbitrary attributes of the LibvirtDriver
object.
Matt Riedemann [Wed, 26 Oct 2016 10:23:42 +0000 (06:23 -0400)]
Make build_requests.instance MediumText
The build_requests.instance column is a serialized
instance object, and the instances.user_data column
is MediumText, so the build_requests.instance column
itself needs to be at least MediumText in size for MySQL.
The instance.resume.start and instance.resume.end notifications
are transformed to the versioned framework using the generic
InstanceActionNotification and InstanceActionPayload class.
Implements: bp versioned-notification-transformation-ocata
Diana Clarke [Mon, 24 Oct 2016 17:23:14 +0000 (13:23 -0400)]
Fix exception raised in exception wrapper
In some cases the exception wrapper can't find the module name for a
traceback (like lxml c extensions), resulting in an exception from
inspect.getmodule(). Just set the module name to 'unknown' in these
cases.
Dan Smith [Sun, 23 Oct 2016 06:20:49 +0000 (23:20 -0700)]
Add missing compat routine for Usage object
We added a v1.1 to Usage without a compat routine to go with it. It's not really
a big deal as we're not sending this over RPC anywhere yet that I know of, but
we should have this for the sake of completeness.
Balazs Gibizer [Fri, 14 Oct 2016 14:52:17 +0000 (16:52 +0200)]
Pre-add instance actions to avoid merge conflicts
NotificationAction enum values for instance actions are added in a
single commit to avoid merge conflicts when it is added one by one
during the notification transformation.
Also the notification samples added as comments for the same reason.
Change-Id: Idfe41af8718bf5e81ea1608f4c6d00d7cf60cd13
Implements: bp versioned-notification-transformation-ocata
tests: Adding functional tests to cover VM creation with sriov
Adding HostPciSRIOVDevicesInfo class to fakelibvirt module
in order to dynamically generate host's SR-IOV devices info.
Adding functional tests to cover the creation of instances with
attached sriov devices (virtual and physical).
Verifying that VFs cannot be allocated when it's parent PF is allocated
and vice-versa, when a child VF is allocated, the parent PF should not
be available.
Moshe Levi [Tue, 26 Jul 2016 21:07:44 +0000 (00:07 +0300)]
pci: in free_device(), compare by device id and not reference
The resource tracker might have a reference to a PCI device and fails
to free it because some of its attributes doesn't match any devices in the
PciDevTracker (for example the status of the device changed).
For this reason only match on device id when freeing a PCI device.
Matt Riedemann [Tue, 18 Oct 2016 12:47:20 +0000 (08:47 -0400)]
Update docs for serial console support
There are two changes here:
1. The serial_console config option group help text is
updated to point out that hyper-v also supports serial
console access. This is based on virt drivers that
implement the 'get_serial_console' method.
2. The hypervisor feature matrix is updated to point out
that the vmware driver does not support getting serial
console output. This is based on virt drivers that
implement the 'get_console_output' method.
Fixes volume related unit tests.
Fixes non-sortable None items.
Fixes __getattr__ infinite recursion.
Fixes is_dict_like method. Dicts in python 3.4 do not
have the 'has_key' method.
Huan Xie [Wed, 24 Aug 2016 02:25:10 +0000 (02:25 +0000)]
XenAPI: Fix VM live-migrate with iSCSI SR volume
With XenServer 7.0 (XCP 2.1.0), VM live migration with iSCSI volume
will fail due to no relax_xsm_sr_check in /etc/xapi.conf in Dom0.
But since XS7.0, the default value of relax_xsm_sr_check is true if
not configured in /etc/xapi.conf in Dom0.
This fix is to add checks on XCP version, if it's equal or greater
than 2.1.0, will treat relax_xsm_sr_check=true if not found in
/etc/xapi.conf
Joshua Harlow [Mon, 17 Oct 2016 20:53:10 +0000 (13:53 -0700)]
Explicitly name commands target environments
Naming envs like this is breaking the current
oslo periodic day job; a simple way to unbreak this
is to name them explicitly (which appears to be
more common).
So this changes the command listing to do just that
as well as lists py35 in the envlist (because its
a valid target).
In os-snapshots APIs, the display name is the snapshot name,
not the volume name.
The display description is the snapshot description,
not the volume description.
So fix them.
Artom Lifshitz [Wed, 5 Oct 2016 18:37:03 +0000 (14:37 -0400)]
Send events to all relevant hosts if migrating
Previously, external events were sent to the instance object's host
field. This patch fixes the external event dispatching to check for
migration. If an instance is being migrated, the source and
destination compute are added to the set of hosts to which the event
is sent.
Catch error and log warning when not able to update mtimes
When we launch an instance, nova updates the mtime for the _base image
to let the image cache manager know the image is actively used. This
can lead to unexpected I/O errors when launching a large amount of
instances at once coming from the same _base image.
This commit puts the execute call in a try, except block to catch
possible errors. It also logs a warning with the path and error message.
With this, at least once the update will succeed.
Jay Pipes [Tue, 11 Oct 2016 03:08:30 +0000 (23:08 -0400)]
Correct bug in microversion headers in placement
Found a small bug in the handling of a 406 error by the placement API's
microversion handling code that only appeared when more than one
microversion was used.