← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1512563] [NEW] Add expected_task for instance.save() used by block_device mapping in compute.manager._build_resources

 

Public bug reported:

For large scale deployment, command can be sent concurrently, and for several times, when an instance was asked to be delete during it is launching, we observed that the vm_state and task_state of that instance has changed abnormally like this:
 
When we delete the instance while its' task state is networking:
scheduling->none->(networking)->deleting->block_device_mapping-->spawing-->none 
The expected task_state should be:
networking->deleting->deleted
and the vm_state changes like this:
BUILD-ACIVE-disappear , which is also very strange for user.

After we dive deeper, we found out that in the _build_resource code, the instance.save() for block_device_mapping doesn't contain expected_task_state:
https://git.openstack.org/cgit/openstack/nova/tree/nova/compute/manager.py#n2135 , so it also saved "deleting" and two process keep working which causes the above situation.

How about we add some expected_task_state also for block_device_mapping?
The expected task states can be NETWORKING, SCHEDULING, and none.

** Affects: nova
     Importance: Undecided
     Assignee: Zhenyu Zheng (zhengzhenyu)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Zhenyu Zheng (zhengzhenyu)

-- 
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/1512563

Title:
  Add expected_task for instance.save() used by block_device mapping in
  compute.manager._build_resources

Status in OpenStack Compute (nova):
  New

Bug description:
  For large scale deployment, command can be sent concurrently, and for several times, when an instance was asked to be delete during it is launching, we observed that the vm_state and task_state of that instance has changed abnormally like this:
   
  When we delete the instance while its' task state is networking:
  scheduling->none->(networking)->deleting->block_device_mapping-->spawing-->none 
  The expected task_state should be:
  networking->deleting->deleted
  and the vm_state changes like this:
  BUILD-ACIVE-disappear , which is also very strange for user.

  After we dive deeper, we found out that in the _build_resource code, the instance.save() for block_device_mapping doesn't contain expected_task_state:
  https://git.openstack.org/cgit/openstack/nova/tree/nova/compute/manager.py#n2135 , so it also saved "deleting" and two process keep working which causes the above situation.

  How about we add some expected_task_state also for block_device_mapping?
  The expected task states can be NETWORKING, SCHEDULING, and none.

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