[xen] create/update metadata during boot can put instance into ERROR

Bug #1100866 reported by Andrew Laski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Brian Elliott

Bug Description

If an update for instance metadata is attempted during the boot process, before "VM.get_by_name_label" will return a vm_ref, then the metadata update will fail in the xenapi driver and the exception will pass up the stack and eventually revert the task state from "spawning" to None. Then after the instance has finished booting and the _instance_update is attempted in _spawn() in compute/manager.py the expected task state is not found and the instance is put into ERROR status.

One possible solution would be to not allow metadata updates for spawning instances but since this is xenapi specific that may not be the correct approach.

Brian Elliott (belliott)
Changed in nova:
assignee: nobody → Brian Elliott (belliott)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/20059

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/20059
Committed: http://github.com/openstack/nova/commit/6e3fcd5e3f166a9d0e61dcb2549ea1f331aec956
Submitter: Jenkins
Branch: master

commit 6e3fcd5e3f166a9d0e61dcb2549ea1f331aec956
Author: Brian Elliott <email address hidden>
Date: Fri Jan 18 21:11:00 2013 +0000

    Prevent metadata updates until instance is active.

    This avoids a race condition where setting metadata too early in the
    build process can cause a build failure due to the VM not existing
    in Xen.

    bug 1100866

    Change-Id: I702128799997d91d5f0c0ac189f619bfdf011988

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.