summaryrefslogtreecommitdiff
path: root/nova/virt/powervm
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Remove junk file when ftp transfer failure" into stable/grizzlyJenkins2013-07-281-3/+8
|\
| * Remove junk file when ftp transfer failureChang Bo Guo2013-07-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | During spawn with powervm driver, the image transfer to the IVM host may fail in some conditions, eg. IVM host doesn't have enough disk space. It leaves the junk file in IVM host, and this will disturb next spawn after resolving environment issue, need clean it. Fixes bug #1188884 Change-Id: I6347dec4cfda61bed0960159e8a3402fcffa296b
* | Refresh volume connections when starting instancesBrent Eagles2013-06-261-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | This patches adds network and block device information to the signature of the power_on method on the virtualization driver. The relevant call sites are also modified to provide the required information. The libvirt implementation of power_on has been altered to re-establish network and volume related connections. Fixes bug: 1188326 (cherry picked from commit db3989586a8d5bbbcf857b9294a124ecc5fc57e8) Conflicts: nova/tests/test_vmwareapi.py nova/virt/baremetal/driver.py nova/virt/libvirt/driver.py nova/virt/vmwareapi/driver.py nova/virt/vmwareapi/vmops.py (Includes some collateral additions for console tests in the vmware tests.) Change-Id: If617b570e082e3aa321414a2680a3aa0754f6153
* Merge "Clean up failed image transfers in instance spawn" into stable/grizzlyJenkins2013-06-211-19/+30
|\
| * Clean up failed image transfers in instance spawnChang Bo Guo2013-05-291-19/+30
| | | | | | | | | | | | | | | | | | | | | | Boot one instance with powervm driver, will transfer the image file to host. Need clean up failed image transfers that may occur during instance spawn. Fixes bug #1173017 (cherry picked from commit 68cc1cd511298208dde59878bfbef474a3625c9f) Change-Id: Id06fa84bee63adc4af96a339526d75540978263f
* | Fix powervm driver resize instance errorguohliu2013-05-141-11/+13
|/ | | | | | | | | | | | | During a resize operation in powervm, the logical volume of the instance will be copied and compressed to a file. Current logic decompresses it twice before copying this file to a new volume which will cause the new instance to not boot properly. Fixes bug #1169848 Change-Id: I91f536919511aafbf7dbe14abbee48dbceb189b2 (cherry picked from commit 5643bd5d9bf17335e109d4b2d93e161f4d12c6f9)
* Fix key error when create lpar instance failedPhong Ly2013-05-031-1/+2
| | | | | | | | | | | | | | | With existing code, when create lpar instance failed, it throws a key error because the parameter is not being passed to PowerVMLPARCreationFailed function in exception module. The fix for this is that in module operator, passing the 'instance_name' to the called function in exception module. Fixes bug 1173303 Change-Id: I688eecf7b649b67ca62f72d6d33fd7cd774047c3 (cherry picked from commit cccca7a4531cdad88655c27533f63c590a5ddfa1)
* set timeout for paramiko ssh connectionPhong Ly2013-04-232-1/+4
| | | | | | | | | set powervm connection timeout to 60 seconds to eliminate crashing if ssh server is slow in responding. (cherry-picked from a62e6233ea6efa1a596678ad302022a646234fcf) Change-Id: Ic7f4d092de73e73c6edb909713bf3a2347a50334
* Resolve conflicting mac address in resizeLance Bragstad2013-04-052-0/+32
| | | | | | | | | | | This patch fixes bug 1161226 and mac address conflicts when migrating or resizing an instance using the PowerVM driver. This will ensure that if a migration or resize is taking place on the same host, a temporary mac address will be assigned to the original LPAR so there is no conflict on the VIOS when a second LPAR is started with the same address. Change-Id: I59db484defb789f3a7c0eddbd5ef9e92efc22419 (cherry picked from commit 2a43c4020927c936ed3b3f07416413f5171d62f8)
* Fixes PowerVM spawn failed as missing attr supported_instancesFei Long Wang2013-03-192-0/+2
| | | | | | | | | | | | During test in a cross-hypervisor environment (KVM+PowerVM), user will run into an issue during deploying an instance for Power host by PowerVM driver, though the property "hypervisor_type" for the PowerVM image have been configured. Since the _update_host_stats of PowerVM driver missing the attribute "supported_instances". Fixes bug: 1155498 Change-Id: I81259d153a7b5ae35747e57c53b14e0075d28d78
* rstrip() strips characters, not stringsJohannes Erdfelt2013-03-151-1/+4
| | | | | | | | | | Fixes bug 1155761 This use of rstrip() could end stripping off more than just the ".gz" suffix if the filename contains any of the ".gz" characters at the end of the string. Change-Id: Id75388453f286ca7b05bab51c9826c43c10ef516
* Resize/Migrate refactoring fixes and test casesLance Bragstad2013-03-142-2/+2
| | | | | | | | | | | This patch will fix the construction of an scp command to be joined on spaces. Also adds a parameter in driver.finish_migration to _create_lpar_instance(), some refactoring that needed to be done in order to launch the instance on the destination host. This patch fixes Bug #1153599. This patch also address the tests cases for resize/migrate functionality for PowerVM. Bug #1133058 is for tracking these test cases Change-Id: I86c1b697fe5c7d6e4a6c689f75fd5cf737cef5d4
* xenapi: Fix reboot with hung volumesRick Harris2013-03-111-1/+4
| | | | | | | | | | | | | | | | | | If a volume becomes inoperable (e.g. the ISCSI connection is severed) and the user goes to reboot, the instance may enter a permanently halted state. The root cause is that a VBD that points to 'bad' volume prevents VM operations ('reboot', 'start') from completing under XenServer. The work around is to detect which volumes are bad, detach in the virt-layer, retry the operation (or in the case of reboot, just 'start' the halted instance), and then notify the compute manager via a callback so it can detach the volume in Cinder. Fixes bug 1148614 Change-Id: Id4e8e84bb5748cfa267c2a418f9405fd86829e8f
* Remove uses of instance['instance_type'] from powervm driver.Dan Smith2013-03-062-3/+6
| | | | | | | | This is one change in a series aimed at removing the use of instance-linked instance_type objects, in favor of the decoupled type data in system_metadata. See bug 1140119 for more details. Change-Id: I885a807d00f7f909665da6e7a3382295a43258c9
* Updating powervm driver snapshot with update_task_state flowDavid Peraza2013-03-043-6/+24
| | | | | | | | | | | | Fixes bug 1136359 Without this change snapshot still works but instance task state does not get updated correctly and nova logs will show expected task state erros from compute manager. Also added a snapshot test. Change-Id: I0f4ed24aa82a66fafc4b6813d017618ae07b4751
* Merge "Add ssh port and key based auth to VPD."Jenkins2013-03-031-2/+4
|\
| * Add ssh port and key based auth to VPD.Chris Krelle2013-03-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ablity to set ssh port, and use key based authentication for VPD. This patch adds config options: virtual_power_ssh_port: port to ssh to on virtual power host virtual_power_host_key: private key file for ssh auth Note: Key file must be able to be read by user nova is running as. This patch switches the default virtual_power_type from 'vbox' to 'virsh' to match the most common usage. Fix Bug 1136010 Change-Id: Id89878d63d26602bb3eacc2a2ce7902d9bd33d61 Authored-by: Chris Krelle <nobodycam@gmail.com>
* | Merge "Make compute manager revert crashed migrations on init_host()"Jenkins2013-03-021-2/+8
|\ \
| * | Make compute manager revert crashed migrations on init_host()Dan Smith2013-02-281-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should provide a path to cleanup partial migrations by reverting them back to the original state instead of leaving them in limbo. Note that libvirt needs a change to make this work, in the case where the unconfirmed instance's directory is still present and needs to be removed before the rollback. The libvirt, xenapi and powervm drivers are modified here, and tests are added to confirm their compliance with the proper behavior. Addresses bug 1131588 Change-Id: I85bc0f6e9cda10aa85328199d107a3ff6e240b96
* | | Fix IBM copyright stringsKurt Taylor2013-03-019-9/+9
|/ / | | | | | | | | | | Update IBM copyright strings to one consistant format Change-Id: If4aef948bac27fe337991f36ea1bf02d4078e8bf
* | Makes sure required powervm config options are setDavid Peraza2013-02-271-4/+6
|/ | | | | | | | | Fixes bug 1132931 Defaulting values of powervm_img_local_path and powervm_img_remote_path configuration options. Change-Id: I310422bccb84fc0ae12e43b06b4d85e683a91daf
* Removes unnecessary qemu-img dependency on powervm driverDavid Peraza2013-02-221-3/+3
| | | | | | | | | | | Fixes bug 1131033 Power VM driver is using qemu-img through the fetch_to_raw call No need to attempt a conversion since power images can only be represented with the raw format, removing thus the need for any conversions by calling fetch instead of fetch_to_raw. Change-Id: I94b46e184cb87924a4754a0a48d9c2013a3eb756
* Removed duplicate spawn code in PowerVM driverLance Bragstad2013-02-201-78/+24
| | | | | | | | | | | | After introducing resize/migrate in PowerVM there was some code that was duplicated after a rebase. The commit removes the duplicate code. The functionality of resize/migrate remains the same as introducted in Change I72345626 Bug #1130680 Change-Id: I1fe3d8e1f2a19fd40a03c8c38d90c01711356b38
* Merge "Use oslo-config-2013.1b4"Jenkins2013-02-203-8/+7
|\
| * Use oslo-config-2013.1b4Mark McLoughlin2013-02-193-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* | PowerVMDiskAdapter detach/cleanup refactoringDavid Peraza2013-02-202-8/+82
|/ | | | | | | | Define PowerVMDiskAdapter interface as contract for implementation Change order lpar, disk devices and volumes are cleaned up Change-Id: I0004b0d71cb8a8dd9c4d502dd1278c10bdc7c8e2
* Merge "Resize/Migrate functions for PowerVM driver"Jenkins2013-02-146-10/+418
|\
| * Resize/Migrate functions for PowerVM driverLance Bragstad2013-02-136-10/+418
| | | | | | | | | | | | | | | | | | | | Added resize and migrate functionality to PowerVM driver. Allows resizing of instance and cold migration of an instance to different host. bp powervm-compute-resize-migration Change-Id: I723456266d3ceb4bd4a7ce4273008201b450f533
* | Correct misspelling in PowerVM commentMichael J Fork2013-02-131-1/+1
|/ | | | | | Correct a misspelling in a PowerVM comment Change-Id: I12ab59826e8448a120ff3ef2b26034ea4aa2f1a0
* Refine PowerVM MAC address generation algorithmMichael J Fork2013-02-111-8/+19
| | | | | | | Change MAC address generation algorithm on PowerVM to generate an additional 4 bits of data and improve comments around it. Change-Id: Icdfba54161bcb043c17127c26c57503af497d001
* Merge "Recache or rebuild missing images on hard_reboot"Jenkins2013-02-081-1/+1
|\
| * Recache or rebuild missing images on hard_rebootRafi Khardalian2013-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary purpose of this change is to provide the ability to re-cache missing backing files on hard_reboot. The old pre_block_migration function was already performing a very similar operation. That function has been refactored to be idempotent and renamed to _create_images_and_backing. The pre_block_migration function is a wrapper, with some additional checking, around the renamed function. Image backend was also adjusted to look for either a missing backing file or disk image, recaching or creating accordingly. It should also be idempotent, never clobbering existing images. Change-Id: Icf4c488d6db59e732b463d08d0606b428ee1e7b9
* | hypervisor-supplied-nics support in PowerVMMichael J Fork2013-02-062-3/+58
|/ | | | | | | | | | PowerVM does not allow MAC addresses to be directly set on LPARs. Instead, use the hypervisor-supplied-nics feature to generate MAC addresses we can ensure are provisioned correctly. blueprint powervm-compute-resize-migration Change-Id: Idad7f03d9fd61970912ec1a6978fc0af56309df4
* Mark password config options with secretMichael J Fork2013-02-011-1/+2
| | | | | | | | Config object supports masking values when writing out if the secret flag is set on the option definition. This change flags all nova options containing a password. Change-Id: I538c93bac736c317822b5d78b53c4181b2009b49
* Make sure there are no unused importJoe Gordon2013-01-282-14/+1
| | | | | | | Remove all currently unused imports Prevent future unused imports Change-Id: I6ac26d5c71b79952a7732db300355a00310c712e
* Merge "Enable N302: Import modules only"Jenkins2013-01-251-1/+3
|\
| * Enable N302: Import modules onlyJoe Gordon2013-01-251-1/+3
| | | | | | | | | | | | Fix all N302 issues, and re-enable. Change-Id: Ic94d144c915b228b7ff2fd9c5951875e159ffcdd
* | Refactored run_command for better namingLance Bragstad2013-01-241-18/+20
|/ | | | | | | | | | This distinguishes this difference between running commands on the local compute node and the remote system, the VIOS. bp powervm-compute-resize-migration Change-Id: I57967e291f52d2745cd7d6d53553e37d9de07a6b
* fix misspellings in logs, comments and testsPádraig Brady2013-01-211-1/+1
| | | | | | | | Flagged with: https://github.com/lyda/misspell-check Run with: git ls-files | misspellings -f - Fixes bug: 1100083 Change-Id: Icf1f844fea8ad0a1101d1dc64b9a126608e9536e
* Fix N402 for nova/virtSean Dague2013-01-082-6/+6
| | | | | | | | Fix N402 errors (single line docstring should end in a period) for nova/virt, part of a larger attempt to stop ignoring our own hacking.py tests. Change-Id: I523ce41bd2b38c73cf3fdb031101ccc0695f2488
* add to driver option to keep disks when instance destroyedKravchenko Pavel2013-01-082-6/+7
| | | | | | | | | | | Adding delete_disks flag to destroy instance method. In case it's false the driver keeps disks. *required for blueprint rebuild-for-ha DocImpact Change-Id: I38c7833114d8414dff831c9cc0c04c4610dbd33a Co-authored-by: Oshrit Feder <oshritf@il.ibm.com>
* powervm: Implement snapshot for local volumesLance Bragstad2013-01-075-14/+267
| | | | | | | | | | | | Snapshot local volumes by copying the logical volume on VIOS, gzip the file, transfer to compute service node, and finally upload to glance. PEP8 and string concatenation fixes. Added utility to powervm.common for constructing UNIX file paths. Added unit tests for new utility. bp powervm-compute-enhancements Change-Id: Ie6bafbeef75a9464457d78d2997be78346d3ab24
* Removed unused imports.Chuck Short2012-12-212-6/+0
| | | | | | | Removed a bunch of unused imports based on pyflakes. Change-Id: I00952371200cb4531ddf163447433da756582a21 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* powervm: Refactored run_command for better namingLance Bragstad2012-12-051-14/+15
| | | | | | | | | | | | This change refactors two methods of blockdev.py in the interest of better naming. run_command() and run_command_as_root() have been refactored as run_vios_command() and run_vios_command_as_root() respectively to better indicate that these run commands on a remote system, the VIOS. bp powervm-compute-enhancements Change-Id: If65b4ff08e058443c7d10fcdf98e13c7aa207c56
* Merge "powervm: add DiskAdapter for local volumes"Jenkins2012-12-043-174/+338
|\
| * powervm: add DiskAdapter for local volumesMatt Odden2012-12-013-174/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change begins moving all block device related functionality to an abstract DiskAdapter class The original local logical volume implementation has been moved into PowerVMLocalVolumeAdapter Also, this patch opts for on the fly decompression of the image during the dd copy to the Logical Volume, instead of running a separate decompress before hand bp powervm-compute-enhancements Change-Id: I9ecb81e4351fd3a5c34ab8bce544b8daec353c5a
* | Add POWERVM_STARTING state to powervm driverLance Bragstad2012-11-292-1/+4
|/ | | | | | | | | | | | | In current implementation in powervm driver, the 'Starting' state of an instance is not supported. This patch adds this to the powervm driver and allows execution to continue until the instance is in a 'Running' state instead of failing out. This patch fixes Bug #1084641 blueprint powervm-compute-enhancements Change-Id: Ieb17b215547e77ee8d13b18496ba4090fc45757b
* Allow VMs to be resumed after a hypervisor rebootRafi Khardalian2012-11-201-1/+1
| | | | | | | | | | | | | | | | | Fixes bug 1052696. Update the compute manager to pass network_info and block_device_info to the driver.resume() and update all virtualization drivers to accept the new arguments. For libvirt, change resume() to use _create_domain_and_network() rather than _create_domain(). This eliminates the assumption that the network and block device connections remained in place from the period between the VM being suspended and resumed. Instead, all the networking and block connections will be rebuilt on resume (in case they are missing) as is the case after a hypervisor reboot. Change-Id: I6e19ec42f7e929678abce8f276c0a6e91f1fa8af
* Remove nova.config.CONFMark McLoughlin2012-11-202-4/+3
| | | | | | | | | | | | | | | Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
* Remove nova.flagsMark McLoughlin2012-11-172-2/+0
| | | | | | | | Now that options have all moved from nova.flags to nova.config, we can safely remove the nova.flags imports and replace them with nova.config imports. Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8