Commit Graph

203 Commits (f68cd4fa2f3a75a2377a9e84f489580ac723b615)

Author SHA1 Message Date
Kyle L. Henderson f68cd4fa2f Fixes for Python 3
Nova is working on support for Python 3.4. via

This changeset moves from py33 to py34 in the tox.ini file to be
inline with Nova. It also incorporates changes produced from the
'sixer' tool run with 'all'.

sixer can be found at:

At the present time, the py34 environment does not run
successfully because it pulls in portions of Nova that have not
yet been fully converted to Python 3.

Change-Id: If84df3017a722d0ad3546e81f97e67f1a07a763f
8 years ago
Eric Fried 797755c029 Create module for management LPAR utilities
Create new module nova_powervm.virt.powervm.mgmt containing utilities
around the PowerVM management partition.

Moved vm.get_mgmt_partition into the new module.

Change-Id: I67d88148c78a5c966e16ddb4b490a398250b2120
8 years ago
Eric Fried d0bf3dbd2b Fix xag param in read call from instance_disk_iter
Live testing revealed a bug in
whereby's xag parameter was a single xag rather than a
list.  Fixed the bug and added UTs.

Change-Id: I9f0d78129fca97dacbea3bcbbdda25763850804e
8 years ago
Eric Fried 15e604a8a5 (Un)map instance boot disk to Management Partition
In the disk drivers, provide the ability to map and unmap an instance's
boot disk to/from the management partition.

Change-Id: I992100da5618bb804da547e62308b83114819b0d
8 years ago
Drew Thorstensen 85f1e763a3 Support mgmt network creation
PowerVM systems use a technology called Resource Monitoring and Control
(RMC).  This allows the hypervisor to perform dynamic operations to the
virtual machine (resize, migration, etc...).

This technology requires an Ethernet connection between the VM and the
PowerVM API.  This change set enables this via two means.

 - Refactoring the existing 'mgmt' nic connection into tasks.  This
   enables further tasks to determine if a mgmt VIF was created.
 - Send an additional network info element into the config drive to
   bring up the VIF on IPv6 link local.

Change-Id: I11881203d753061d7a2127fd2a939462f69d39e7
8 years ago
Jenkins 12f363bf38 Merge "Disk Driver: instance_disk_iter" 8 years ago
Jenkins ff1f27d0b3 Merge "Update LPAR feed to exclude mgmt partition" 8 years ago
Eric Fried dda2bb9fb6 Disk Driver: instance_disk_iter
Add a method to the disk.driver API which can find the backing (usually
boot) disk associated with an instance.

This is in anticipation of the snapshot functionality, which will need
to find an instance's disk in order to map it to the management

Change-Id: I7b200fb20481c69c3cb2d5eb96a6ab1596b8ef2b
8 years ago
Eric Fried 8ee482c82a SSP: Only consider this host's VIOSes
Previously, the SSP disk driver was gleaning the list of VIOS UUIDs from
the list of Nodes in the Cluster, and optionally restricting that list
to VIOSes from a specified host.

It will almost never be useful to know about VIOSes residing on a
different host.  Any attempt to talk to those VIOSes through the PowerVM
API will fail, as we don't have a pypowervm connection to that host.

Therefore this change set simplifies the retrieval of VIOS UUIDs,
eliminating the host_uuid option and restricting the result to VIOSes on
the current host.

Change-Id: I2fe1e93b7039383889e56b809d5348ee2d5222a9
8 years ago
Eric Fried 1b649cc221 Get management partition (vm.get_mgmt_partition)
Implement a helper method to return the LPAR wrapper representing the
host's management partition.

This is needed for such operations as snapshot, which will need to map
a (normal) instance's storage to the management partition.

Change-Id: I0fb3f8e9191289b4778d4d7171547475dc6bcca5
8 years ago
Eric Fried f249ef3fef Support short names for vdisks
There is a 15-character limit on virtual disk names, imposed by VIOS
(but not by the PowerVM REST API).  There is no such limit for SSP LUs.
The recently-changed disk name generation algorithm allowed vdisk names
to exceed 15 characters, causing errors like:

Failed to perform operation on Volume Group on VIOS with ID 2 in CEC
8247-22L*1234A0A - RMC command for Virtual Disk failed with error -

Backing device names can not exceed "15" characters in length.

This change set adds an optional 'short' parameter to the private
_get_disk_name helper which causes it to limit the generated name to 15
characters.  The localdisk driver is changed to use this new parameter.
Unit tests are improved such that they no longer mock _get_disk_name,
and such that they verify both of its variants.

Change-Id: I9efbb9d904e52f2a74bba7d8e631cd45862aa504
8 years ago
Eric Fried f8ef71301a Conform to OpenStack log/exception I18N guidelines
Corrections to conform to guidelines here:

Change-Id: I808c9547115dfa7b85e3a0915c9fcc56771cb577
8 years ago
Drew Thorstensen ce50a7019a Update LPAR feed to exclude mgmt partition
The PowerVM API introduced a new parameter to determine the management
partition.  This should be excluded from the operations for VMs.  This
change set updates the nova code such that it excludes that partition
from VM feeds.

Change-Id: I800e0df774403ebc62ad8a5c5df0e77bb0017b25
8 years ago
Jenkins d9d511120a Merge "Sanitize config ISO name" 8 years ago
Eric Fried a0ed70408c Sanitize config ISO name
Previously, we were using the instance's name verbatim to generate the
name of its config ISO.  Since the format of the instance name is very
permissive, this can lead to rejection of the name by the PowerVM REST

Value 'Linux Test_0ce757b1_thorst_config.iso' is not facet-valid with
respect to pattern '([A-Za-z0-9_\.]{1,79})' for type 'FileName.Pattern'.

This change set exploits a new pypowervm utility to sanitize the
instance name and combine it with the desired prefix and suffix to
generate a valid config ISO name.

The same is being done for an instance's boot/rescue disks and image LUs
(for SSP).

Change-Id: Id8a77e20ede3ec3339ef5e5910e05943683a2b6c
8 years ago
Drew Thorstensen 6a56fe8146 Update vscsi mapping to not include adapter
This change updates the to not send the adapter down when
requesting that the scsi adapter be connected.  This was due to a recent
change in pypowervm, and the refactor was missed in the nova-powervm

An additional unit test was added to cover this.

Change-Id: Ic8555f49f213e3e7e46a59e1518984ef5e0f431b
8 years ago
Eric Fried 2f99f2f4fe Expect a single host; remove CONF.pvm_host_mtms
The nova-powervm driver will operate on a native management partition
which manages only the host on which it resides.  There is therefore no
need to specify that host's MTMS in the configuration; and it is an
error if the PowerVM REST API does not return exactly one host.

Change-Id: I0f77add7c09760a54c8d7662bfe3c6810095620b
8 years ago
Jenkins 6149fe1611 Merge "Add support for PowerVM Console" 8 years ago
Drew Thorstensen 0cf9f6c2dc Add support for PowerVM Console
This change set adds support for the PowerVM VNC console.

Changes the remove vterm to always be invoked.  This shouldn't have a
performance impact if the console is not running.  Ensures proper clean
up on the system running the PowerVM API.

Change-Id: Ia6a5dd445410fcd5351c3528003a83ba659805bb
8 years ago
Kyle L. Henderson d07779963a Add check for vios from another cluster node
When retrieving the vios uuids of the cluster we have to throw
out any vios that is on another node, since we won't have
their uuid or url.

Change-Id: I1235d935b8e6c75e470fdb0495d6d9d955d11b4b
8 years ago
Jenkins 27a4b6b6e3 Merge "Switch to pypowervm standard auth model" 8 years ago
Eric Fried 5396a62853 Adopt EntryWrapper.create()
Recently pypowervm added the ability to invoke Adapter.create() directly
from an EntryWrapper.  This change set takes advantage of this addition.

Change-Id: Ic4e7c1f44e4952af0874354715acce20e9651a99
8 years ago
Drew Thorstensen 18b9b079a1 Support media repo creation
This change set supports the media repository creation against the
Virtual I/O Server if it has not already been created.

This fixes a long standing TODO in the nova-powervm code for initial
standup.  This was enabled due to changes made back in pypowervm to
support unordered elements.

Change-Id: I84a8f80a8fdb16ba2d48a70862d2cd0058ebaaa1
8 years ago
Eric Fried 1b171744be Remove adapter params from pypowervm calls
Recent changes in pypowervm removed now-redundant adapter parameters
from several methods.  Rebase on that change.

Change-Id: I88b5061150216359bcaab65a3c3587b622f61e14
8 years ago
Drew Thorstensen c3b5895f76 Switch to pypowervm standard auth model
This change set switches nova-powervm to utilize a base Session as the
authentication model for log in to the API.  This assumes that the
nova-powervm process has the right user permissions to use the API, and
that it is running on the server hosting the PowerVM API.

Change-Id: I07be4249d5ab06d95fcda85c8c6c48c67f85bcf6
8 years ago
Jenkins 2b5d62069f Merge "Add xags argument to get_active_vioses" 8 years ago
Drew Thorstensen 89568132d2 Add xags argument to get_active_vioses
The get_active_vioses operation was added to the recently.
However, all calls down to it were with xags=None.  Most of the
invocations want the active VIOS with the appropriate XAGs.

This change set allows for an optional parameter to get the XAGs.

Change-Id: Ied9b264b8062aa7d3594101ee5d91c9fcff98c68
8 years ago
Eric Fried f4864f23cd Remove traits from Response, add adapter to bld()s
Recently pypowervm removed the traits parameter from the Response
constructor, and added an adapter parameter to the various wrapper bld

Change-Id: I80fa269112ed305225d80f2cad84f80f937f44d3
8 years ago
Jenkins 53cf30c8bf Merge "Always call hdisk removal from vscsi volume driver" 8 years ago
Jenkins 98df25ee67 Merge "Use the active WWPNs for connections" 8 years ago
Drew Thorstensen e7090a7169 Always call hdisk removal from vscsi volume driver
This change updates the vscsi volume driver to ensure that the hdisk
removal is always invoked.  The hdisk removal significantly speeds up
subsequent discoveries.  The changes to pypowervm should remove risks
from running the API.

The change is done so that an error from the hdisk job does not block
volume disconnect.  The volume will have already been disconnected from
the VM by the time the command is run.  If the hdisk remove fails for
some reason, a subsequent attach should clean it up (but can be slower
when it does so).

Change-Id: Ib823f793ec4b951111301286743c6bd243b863fe
8 years ago
Drew Thorstensen d5a85dfc60 Use the active WWPNs for connections
The initial code was gathering all of the FC ports for certain
operations.  This could lead to very long delays as the inactive ports
would run operations, and would eventually time out.

This change will only return the active ports for the VIOSes, resulting
in faster operations when dealing with storage.

Change-Id: I5c10e8e91ef6936f6c6c44644de54db3b18a41d5
8 years ago
Drew Thorstensen 9916adf375 Optimize the VIOS specification in driver
This change optimizes the use of the VIOSes in the driver.  It does so
 - Removing an excess call to capture the VIOSes in the driver start up.
 - Querying only for the active VIOSes within the vscsi volume driver.

This not only makes the code run quicker, it is also more correct
functionally.  It no longer tries to connect to VIOSes that may be down
for maintenance purposes.

Change-Id: I718752385837c021c8d0f429ab71f4f7e27c0dd6
8 years ago
Kyle L. Henderson d263057d32 Fix destroy of a LPAR that is missing on the host
Added exception logic to handle the case where the LPAR
that is the target of a destroy operation may not be on
the host.

Change-Id: Ic7ec4934a85aa91f7f433dbad359229a41093ca2
8 years ago
Kyle L. Henderson 0a67e33f62 Add the 'traits' parameter to pypowervm Response
A recent commit in pypowervm now requires a 'traits' parameter
to be specified on a Response object. Updated the unit tests
to supply 'None' since traits are not used in the testing.

Change-Id: I2272bb55b4575374ba93c77222531a9ce71afb3e
8 years ago
Jenkins f49393106e Merge "Fix vm delete when vterm is open" 8 years ago
Jenkins be366a266f Merge "Move vif plug forward in spawn" 8 years ago
Drew Thorstensen 35d7cde1b3 Move vif plug forward in spawn
This change set moves the vif plugging to the start of the spawn
operation.  This is so that the corresponding neutron agent sees the VIF
right after the LPAR create (rather than at the tail end of the deploy).
This allows the neutron agent to run more efficiently.

Change-Id: Ib5e5a6294131616f374778712c051da42ab2a233
8 years ago
Kyle L. Henderson 0cbfab18c0 Fix vm delete when vterm is open
Fixed up the logic to find the HSCL151B error code in the
REST response message and updated the unit test.

Change-Id: I04505a0b88d4c44746eaf3417f099e66a9fdf08a
8 years ago
Drew Thorstensen 1438ce90a1 Add uptime to driver
Provides an uptime algorithm.

Change-Id: I730cd120f380b02e62023aee8182fe9f813951f4
8 years ago
Eric Fried 300c3d3a83 Provide PowerVMDriver.reboot
Implement nova_powervm.virt.powervm.driver.PowerVMDriver.reboot.

This implementation heeds the reboot_type (HARD or SOFT) parameter.

Change-Id: Ieaba2b676343a488ead9e06d3710c6c934b4e727
8 years ago
dwarcher 2712f79a0c Update vscsi to support hdisk removal
The disconnect volume code path requires some updated to support
hdisk removal.

Change-Id: Icff111ce1de8eaef2fc67caca38fe5a407645b1a
8 years ago
Jenkins 0fc5feea73 Merge "Add xags=STORAGE to physical wwpn query" 8 years ago
Eric Fried ceca475b21 LPAR-specific SSP ops target VIOSes on same host
When nova is managing an SSP Cluster whose VIOSes span multiple
accessible hosts (e.g. nova is running against a single HMC managing
multiple hosts), it is important that operations specific to a
particular instance - such as creating and removing disk connections -
be invoked only on the VIOS(es) residing on the same host as that
instance.  This change set fixes the SSP Disk Driver to ensure this is
the case.

Ancillary to this change is an expansion and refactoring of the vm
utility to retrieve quick properties for an LPAR.  Invoking the new
vm.get_vm_qp method without the qprop parameter will return a dictionary
of all the quick properties available for the LPAR.

Change-Id: Ib1d02743baf041c9abc69b25201d33e516fa6cb3
8 years ago
dwarcher 562990a0fa Add xags=STORAGE to physical wwpn query
Because of recent pypowervm changes to default group = None the method get_physical_wwpns must be updated to provide

Change-Id: I37bdc14b57536eeedb606b5b4fe6c1051ee5a888
8 years ago
Eric Fried 1f7b1c0544 Rebase on pypowervm Enums
Recent pypowervm changes moved pypowervm.tasks.hdisk.LUA_STATUS_* and
LUA_TYPE_* into enums LUAStatus and LUAType and renamed all existing
enumerations.  This change set accomodates those shifts.

Change-Id: I06507d26aba138336d2e8a7480bf03501e773ec7
8 years ago
Jenkins cd3255a45a Merge "Add storage XAG to npiv" 8 years ago
Drew Thorstensen 42f7c09bd6 Add storage XAG to npiv
The NPIV flow needs both the FC mapping data as well as the backing
storage devices.  Since pypowervm switched to a default of group=None,
that exposed an issue in the query in the file where it was not
retrieving the Fibre Ports.

This update extends the XAG request to include Storage, as well as the
original FC_Mappings.

Change-Id: Iaf08b15183383fc1df8d9b294d2a18140e7b3e31
8 years ago
Eric Fried 6fa1d2421d Remove POWERVM_ATTRS from
For maintainability, use ATTRS_MAP.keys() instead of the redundant

Change-Id: I16fe0d910e9046c05f2658fc54888c77abaaae1c
8 years ago
Eric Fried 513712e362 Rebase on pypowervm.base_partition
Recently, pypowervm refactored the common parts of logical_partition and
virtual_io_server into a base_partition module.  This change set
accomodates that refactor.

Change-Id: Icc67697972f633bfb007df0b2328f3f2448e8062
8 years ago