os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.
Change-Id: Ic9c994dd044ac0c27194ba05634c826c6ca9e7ba
Closes-Bug: #1529836
The restrictions on PowerVM partition names are more stringent than
those on nova instance names. To avoid annoying API errors, if a name
is accepted by nova, we scrub it (using a provided pypowervm interface)
such that it becomes acceptable for PowerVM.
Related-Bug: #1535338
Change-Id: Ic494f4ec05d9f6b1b2c93843ad404c6bee0bfba8
This change set adds a new vif driver interface (as well as SEA
implementation) for the nova-powervm driver. This is important as the
platform looks to new VIF types (ex. qbg or ovs).
Change-Id: Ieb250d539e4adad8977d3a2716c2f1cf341c4137
The PowerVM REST API allows a handler to be registered for events
from PowerVM. From the events it can be determined if a VM has
had a state change. This change set registers for those events
and determines if the state change is one that should trigger
an instance life cycle event to the compute manager. The compute
manager then can sync the power state between OpenStack and
PowerVM. Normally, _sync_power_states is only called via a
periodic task which defaults to 10 minute intervals.
Change-Id: I33363d4b9dfef3fafc9125dd283660417dbf3186
Nova has a bash script that uses the ostestr package to format
the output from tox in a 'pretty' format. It makes it much more
readable. pretty_tox.sh is pulled from Nova as-is and enabled
in tox.ini.
Change-Id: Ib90791b1333044c98e20444953d7ccab21cd62ba
This change set adds some additional background information on the
local.conf files. This was feedback from the field that this will help
developers as they on board for the project.
Change-Id: I0e69bb01e497bfd29817559021cdafeaf0248cad
Follow up change set for multiattach, If the multiple mapping found
for the same hdisk, do not attempt to remove the hdisk.
Change-Id: I0175bb4827dc76dfb774907e1db93d92c39731f6
Partially-implements: blueprint multi-attach-volume
The nova evacuate operation causes the compute manager to
call the virt driver's spawn method with an empty image_meta object.
Handle that case and just hook up the existing disks and volumes.
Change-Id: I3cf904636c195b48bf5c0436b3e01a961405bf2a
The SSP disk driver cleverly avoids uploading a particular glance image
to the SSP more than once by naming it such that it can be recognized
subsequently. If the image LU thus named already exists in the SSP, we
reuse it (creating a linked clone for use by the instance being
deployed).
Previously, the naming convention for an image LU was
'image_%(sanitized_image_name)s', where the sanitized_image_name was
generated from the first 73 characters of the glance image name (79,
which is the default max filename size, minus the length of 'image_'),
scrubbed to replace any non-alphanumeric/period/underscore characters
with underscores.
This will cause problems whenever an image name is reused while the SSP
still contains the original image LU: the SSP disk driver will generate
the same name, find an image LU of that name in the SSP, and blithely
attach the deploying instance to a linked clone of that image, even
though it's not the same as the new one in glance.
To remedy this problem, with this change set we are now generating the
image LU name as 'image_%(sanitized_image_name)_%(image_checksum)s'.
The image_checksum is a 32-character hash that comes from ImageMeta.
The total length is still 79; so the 'sanitized_image_name' is now
limited to 40 characters.
Now, even when an image name is reused, the LU name will (with extremely
high probability, like reaching into your average star twice and getting
two different milligrams of matter) be different because the image's
checksum will be different; so we'll upload and use the new image
instead of the old one.
Change-Id: I465a90e7105d7d8a7ed1e0b30e96ee98a1d7dfdb
This change set brings our flake8 ignore rules in line with the core
nova team. nova-powervm should always be a minimal subset of flake8
ignore rules to the broader nova project. This change set removes some
old ignore rules that nova had, that they have removed in the past
couple of months.
Change-Id: I82cdcbc79dac7254f768e110d48c66d63274fc93
Create usable instance objects in the driver setup routine so
each test that needs one doesn't have to duplicate the effort.
Removed unused _inst_dict() method from the driver and unit
tests.
Change-Id: I2b79698584b0fd978d9cf044206350485d4f687a
At DEBUG, pypowervm produces way too much information, including the
payload of every REST request & response. Set the log level to the
more-reasonable INFO in our sample local.conf files for compute and
all-in-one nodes.
Change-Id: Ie8b1abed5106902046bb36c39fbc980a9e481f12
When the VNC console gets created, an 'access path' can be passed to
coordinate the connection. This helps ensure that the client is
correctly connecting to the appropriate VM.
This change set enables this additional check for the PowerVM driver.
It should not be confused with full authentication. It simply
validates the UUID.
It is also not encryption. Other patch sets to the VNC consoles have
been proposed for this.
Change-Id: I3c3bfde9513d9ad96fe5638469a2005ad57e91bb
The compute manager now passes image object to the virt driver
rather than dicts.
Change-Id: Ib8f52ecc9f4241636e79d9a7f8846c081c42b5f3
Blueprint: mitaka-objects
A sample nova_powervm configuration file can be generated with
the oslo tooling via:
oslo-config-generator --namespace nova_powervm > sample.conf
The output file will contain all the nova_powervm configuration
options. The file can be edited and then copy-n-pasted into the
full nova.conf file.
Change-Id: Iacc3a3ec9e7b00275ba192b5b9b07e346da6fbbf
Added bounds checking to integer options and choice values for
string options where certain keywords are expected. Also added
code to ignore case differences for expected keywords.
Change-Id: I7adb4ce8f1f1c2359b210296aaa52e1f0a80417e
The Nova blueprint centralize-config-options aims to gather the many
config options into a central location to make them more widely
known and to provide better documentation. This PowerVM change
implements the spirit of that blueprint and mimics the implementation.
blueprint centralize-config-options
Change-Id: Ia1e5901b27256754c807bb956b98ca2e66b1f312
The image task UpdateTaskState() was unconditionally sending the
expected_state to the update_task_state function. During a shelve
operation the compute manager uses the expected_state to index
into an array of states. Passing None causes an exception during
shelving for that reason. To fix it, we only pass the expected_state
when it's not None.
Change-Id: I00ab265533fe30ba4ffb86759588bba3b139e0a2
Currently an osshutdown is conducted during deleting an active VM. The
change set is to conduct a VSP hard shutdown instead of an osshutdown
when deleting an active VM.
Change-Id: I2908b72fdb46b74d8723964dc7d5f3ba7a52a49a
This change is to use the fixtures MockPatch method to setup
our fixtures. Previously, the mocks were manually started and
cleaned up.
Change-Id: I18161c660fba0c7431e4015fc8723b8a462502cf
Changed the power_off method to translate exceptions from
pypowervm to Nova exceptions. The InstancePowerOffFailure
exception is expected by the compute manager in some cases.
For instance, it will not deallocate the networks associated
with an instance if the power off exception is raised.
Change-Id: I39d4cab78a71077e293b2ab69191ca92676fd43b
JSON encoding for supported_instances in the virt
drivers was a temporary measure that is not needed.
The encoding has been removed for all in tree virt
drivers. This patch remove it for PowerVM.
blueprint mitaka-objects
Change-Id: I86391c80bf733b84c2d4ae6377437b130b7b9087
This change set adds support for cold migration and resize
to a different host.
Add methods to the local disk driver to retrieve and validate if
the drivers are compatible between the source and destination host.
These methods will only be called if the driver supports shared
storage. Currently only the SSP driver supports shared storage.
Add task flow implemention for migrate_disk_and_power_off.
There is a peculiar case when resizing a VM on the same host.
PowerVM doesn't allow two VMs to be defined with the same UUID,
therefore there is only one VM present on the host and care must
be taken during a resize revert not to delete the one and only VM
we have. To more easily detect that case and to easily see when
a VM is being resized or migrated, we rename the source VM during
the resize/migration processes. The renamed VM will either be
deleted or renamed back when the resize/migration operation is
confirmed or reverted.
Change-Id: Ie3afe7de9b6daca2396dbc9e2d1c1537cb85e8d9