SHUTOFF instance resize status does not match ACTIVE instance resize status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
ChangBo Guo(gcb) |
Bug Description
OpenStack allows an instance to be resized in either a SHUTOFF or ACTIVE state. However, the resize behavior between the states is not consistent. In particular, resize of an ACTIVE instance will result in the instance's status to be mapped to RESIZE while a resize task is in progress. The same is not true of SHUTOFF
Before resize request:
| f13dd4a2-
| 813e5a44-
During resize request:
| f13dd4a2-
| 813e5a44-
After resize and confirmation:
| f13dd4a2-
| 813e5a44-
Changed in nova: | |
milestone: | none → icehouse-1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-1 → 2014.1 |
in https:/ /github. com/openstack/ nova/blob/ master/ nova/api/ openstack/ common. py#L78
_STATE_MAP = { states. ACTIVE: {
task_states. REBOOTING: 'REBOOT',
task_states. REBOOTING_ HARD: 'HARD_REBOOT',
task_states. UPDATING_ PASSWORD: 'PASSWORD',
task_states. REBUILDING: 'REBUILD',
task_states. REBUILD_ BLOCK_DEVICE_ MAPPING: 'REBUILD',
task_states. REBUILD_ SPAWNING: 'REBUILD',
task_states. MIGRATING: 'MIGRATING',
task_states. RESIZE_ PREP: 'RESIZE',
task_states. RESIZE_ MIGRATING: 'RESIZE',
task_states. RESIZE_ MIGRATED: 'RESIZE',
task_states. RESIZE_ FINISH: 'RESIZE', states. BUILDING: { states. STOPPED: {
vm_
'default': 'ACTIVE',
},
vm_
'default': 'BUILD',
},
vm_
'default': 'SHUTOFF',
},
when resize a instance , when execute "instance. task_state = task_states. RESIZE_ PREP" in https:/ /github. com/openstack/ nova/blob/ master/ nova/compute/ api.py# L2338 RESIZE_ PREP", if the instance is ACTIVE, it can find the value is 'RESIZE', if the instance is SHUTOFF, it can not find the value and will use default value.
will search value for key "task_states.