Instance should return to its initial state instead of ACTIVE when resize fails

Bug #1475112 reported by Zhenyu Zheng
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Medium
Maciej Szankin

Bug Description

When instance resize fails, instead of return to its inital vm_state, it is set to ACTIVE:

Creating an instance with flavor 2:

root@kevin-dev:/opt/stack# nova boot --flavor 2 --nic net-id=13854918-10d5-466e-b576-1c4c9689f357 --image 5e992b08-d772-44d7-90bf-0b0d9eaa2fcd test1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | instance-0000003a |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | wFUucx56wSEZ |
| config_drive | |
| created | 2015-07-16T03:19:45Z |
| flavor | m1.small (2) |
| hostId | |
| id | 0e74eff9-7a25-4a9d-b894-cf4db80dc1c4 |
| image | cirros-0.3.4-x86_64-uec (5e992b08-d772-44d7-90bf-0b0d9eaa2fcd) |
| key_name | - |
| metadata | {} |
| name | test1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | 939300520ec34fea975ef197c8fd61b8 |
| updated | 2015-07-16T03:19:45Z |
| user_id | 44c538801d8f46fa9b9b15d7d7986bef |
+--------------------------------------+----------------------------------------------------------------+
root@kevin-dev:/opt/stack# nova list
+--------------------------------------+-------+--------+------------+-------------+---------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+---------------------------------------------------------+
| 0e74eff9-7a25-4a9d-b894-cf4db80dc1c4 | test1 | BUILD | spawning | NOSTATE | private=10.0.0.40, fd89:f61e:48ad:0:f816:3eff:fe9b:6a35 |
+--------------------------------------+-------+--------+------------+-------------+---------------------------------------------------------+

stop the instance:

root@kevin-dev:/opt/stack# nova stop 0e74eff9-7a25-4a9d-b894-cf4db80dc1c4
Request to stop server 0e74eff9-7a25-4a9d-b894-cf4db80dc1c4 has been accepted.

root@kevin-dev:/opt/stack# nova list
+--------------------------------------+-------+---------+------------+-------------+---------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+---------+------------+-------------+---------------------------------------------------------+
| 0e74eff9-7a25-4a9d-b894-cf4db80dc1c4 | test1 | SHUTOFF | - | Shutdown | private=10.0.0.40, fd89:f61e:48ad:0:f816:3eff:fe9b:6a35 |
+--------------------------------------+-------+---------+------------+-------------+---------------------------------------------------------+

resize the instance to a smaller flavor 1

root@kevin-dev:/opt/stack# nova resize 0e74eff9-7a25-4a9d-b894-cf4db80dc1c4 1
root@kevin-dev:/opt/stack# nova list
+--------------------------------------+-------+--------+------------+-------------+---------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+---------------------------------------------------------+
| 0e74eff9-7a25-4a9d-b894-cf4db80dc1c4 | test1 | ACTIVE | - | Shutdown | private=10.0.0.40, fd89:f61e:48ad:0:f816:3eff:fe9b:6a35 |
+--------------------------------------+-------+--------+------------+-------------+---------------------------------------------------------+

The action fails, but the VM state is set to ACTIVE

ERROR LOG:

2015-07-16 11:22:00.706 25351 ERROR oslo_messaging.rpc.dispatcher [req-367cb854-9703-47c2-a410-f42ebf5a693b 44c538801d8f46fa9b9b15d7d7986bef 939300520ec34fea975ef197c8fd61b8 - - -] Exception during message handling: Resize error: Unable to resize disk down.
2015-07-16 11:22:00.706 25351 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):

Tags: compute resize
Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
summary: Instacne should return to its initial state instead of ACTIVE when
- migrate fails
+ resize fails
Changed in nova:
status: New → In Progress
Changed in nova:
importance: Undecided → Medium
status: In Progress → Triaged
status: Triaged → In Progress
summary: - Instacne should return to its initial state instead of ACTIVE when
+ Instance should return to its initial state instead of ACTIVE when
resize fails
Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → wangxiyuan (wangxiyuan)
Changed in nova:
assignee: wangxiyuan (wangxiyuan) → Zhenyu Zheng (zhengzhenyu)
Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → wangxiyuan (wangxiyuan)
Changed in nova:
assignee: wangxiyuan (wangxiyuan) → Zhenyu Zheng (zhengzhenyu)
Matt Riedemann (mriedem)
tags: added: compute resize
Revision history for this message
melanie witt (melwitt) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/202379
Reason: This has been WIP for three months. I am going to abandon this change for now, please restore it when its ready to go.

Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → nobody
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Joshua Trivette (joshuatrivette)
Changed in nova:
assignee: Joshua Trivette (joshuatrivette) → nobody
Monika (970954-monika)
Changed in nova:
assignee: nobody → Monika (970954-monika)
Monika (970954-monika)
Changed in nova:
assignee: Monika (970954-monika) → nobody
Changed in nova:
assignee: nobody → Maciej Szankin (mszankin)
Changed in nova:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.