← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1551703] Re: Resize a vm that vm_state is "stopped" failure, vm's task_state rollback to "active"

 

Reviewed:  https://review.opendev.org/691908
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5a20996405c5788855a2457283bbbe7d78140a9c
Submitter: Zuul
Branch:    master

commit 5a20996405c5788855a2457283bbbe7d78140a9c
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Tue Oct 29 12:10:08 2019 -0400

    Reset instance to current vm_state if rolling back in resize_instance
    
    You can resize a stopped instance and if the compute driver raises
    InstanceFaultRollback from migrate_disk_and_power_off, the
    _error_out_instance_on_exception decorator, used in the _resize_instance
    method, will by default reset the instance vm_state to ACTIVE even though
    the guest is stopped. The driver could raise InstanceFaultRollback if you
    try resizing the root disk down on a non-volume-backed instance.
    
    This builds on [1] and does the same thing as prep_resize [2] for
    making sure the original vm_state is reset on InstanceFaultRollback.
    
    [1] Ie4f9177f4d54cbc7dbcf58bd107fd5f24c60d8bb
    [2] I17543ecb572934ecc7d0bbc7a4ad2f537fa499bc
    
    Change-Id: Iff1f9f28a1e4ecf00368cbcac27b7687a5eb0dcf
    Closes-Bug: #1551703


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1551703

Title:
  Resize a vm that vm_state is "stopped"  failure, vm's task_state
  rollback to "active"

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  1. version
  kilo 2015.1.0

  2. Reproduce steps
  2.1 create a instance, then stop it.

  [root@SBCJNailSlot3 ~(keystone_admin)]# nova list
  +--------------------------------------+--------+---------+--------------+-------------+-------------------+
  | ID                                   | Name   | Status  | Task State   | Power State | Networks          |
  +--------------------------------------+--------+---------+--------------+-------------+-------------------+
  | 6fe59445-fb89-47ab-9ead-2476c4522a61 | njq    | SHUTOFF | -            | Shutdown    | test=192.168.1.52 |
  +--------------------------------------+--------+---------+--------------+-------------+-------------------+

  2.2 resize the instance use a new flavor which it's disk less than current flavor's disk
  [root@SBCJNailSlot3 ~(keystone_admin)]# nova resize 6fe59445-fb89-47ab-9ead-2476c4522a61 45

  disk value in the current flavor of  instance “njq” is 20
  disk value in the  flavor which id equal 45 is 18.
  So this resize action will  trigger ResizeError that msg is unable to resize disk down.
  Then enter the rollback process

  2.3 rollback result:
  [root@SBCJNailSlot3 ~(keystone_admin)]# nova list
  +--------------------------------------+--------+---------+--------------+-------------+-------------------+
  | ID                                   | Name   | Status  | Task State   | Power State | Networks          |
  +--------------------------------------+--------+---------+--------------+-------------+-------------------+
  | 6fe59445-fb89-47ab-9ead-2476c4522a61 | njq    | ACTIVE  | -            | Shutdown    | test=192.168.1.52 |
  +--------------------------------------+--------+---------+--------------+-------------+-------------------+

  Although the finally vm_state of instance will be set to stoped by  heal_instance_state.
  But the process often takes some time.

  IMO, This process is not reasonable, and need fix.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1551703/+subscriptions


References