diff options
author | Lance Bragstad <ldbragst@us.ibm.com> | 2012-11-29 19:00:37 +0000 |
---|---|---|
committer | Lance Bragstad <ldbragst@us.ibm.com> | 2012-11-29 21:14:02 +0000 |
commit | 924084b4ddde31b07ceb8b789bebc31db8903d08 (patch) | |
tree | 03e05f114ba8f807662526fe5e392827806b6efc /nova/virt/powervm | |
parent | 0a8491fba3e5904f0ba21cf75493cce35da9743e (diff) | |
download | nova-924084b4ddde31b07ceb8b789bebc31db8903d08.tar.gz |
Add POWERVM_STARTING state to powervm driver
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
Diffstat (limited to 'nova/virt/powervm')
-rw-r--r-- | nova/virt/powervm/constants.py | 2 | ||||
-rw-r--r-- | nova/virt/powervm/operator.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/powervm/constants.py b/nova/virt/powervm/constants.py index 1990ec5a50..f1d0915860 100644 --- a/nova/virt/powervm/constants.py +++ b/nova/virt/powervm/constants.py @@ -18,11 +18,13 @@ from nova.compute import power_state POWERVM_NOSTATE = '' POWERVM_RUNNING = 'Running' +POWERVM_STARTING = 'Starting' POWERVM_SHUTDOWN = 'Not Activated' POWERVM_POWER_STATE = { POWERVM_NOSTATE: power_state.NOSTATE, POWERVM_RUNNING: power_state.RUNNING, POWERVM_SHUTDOWN: power_state.SHUTDOWN, + POWERVM_STARTING: power_state.RUNNING } POWERVM_CPU_INFO = ('ppc64', 'powervm', '3940') diff --git a/nova/virt/powervm/operator.py b/nova/virt/powervm/operator.py index adc7bf7d02..c977f7687a 100644 --- a/nova/virt/powervm/operator.py +++ b/nova/virt/powervm/operator.py @@ -74,7 +74,8 @@ class PowerVMOperator(object): """ lpar_instance = self._get_instance(instance_name) - state = constants.POWERVM_POWER_STATE[lpar_instance['state']] + state = constants.POWERVM_POWER_STATE.get( + lpar_instance['state'], power_state.NOSTATE) return {'state': state, 'max_mem': lpar_instance['max_mem'], 'mem': lpar_instance['desired_mem'], |