race condition when updating instance after it's deleted

Bug #948632 reported by Chris Behrens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Behrens

Bug Description

Because we allow deletes during build again... There's a race condition in compute manager's _run_instance() where an instance can be deleted in the middle of an rpc.call to the network manager to allocate networks. rpc.call will raise a RemoteError and we will try to set the instance to ERROR state. The setting of instance to ERROR state fails with InstanceNotFound... and eats the original exception.

We shouldn't blow up when we try to set an instance to ERROR that has been deleted out from under us.

Chris Behrens (cbehrens)
Changed in nova:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Chris Behrens (cbehrens)
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/5007

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/5007
Committed: http://github.com/openstack/nova/commit/d94f22dc7a24ec8f769a4fbbffeb1b34780bbf3d
Submitter: Jenkins
Branch: master

commit d94f22dc7a24ec8f769a4fbbffeb1b34780bbf3d
Author: Chris Behrens <email address hidden>
Date: Wed Mar 7 02:10:18 2012 +0000

    Ignore InstanceNotFound when trying to set instance to ERROR

    Fixes bug 948632

    There's a race condition where an instance can be deleted from an API
    call... immediately before some other error occurs during build.

    Also: compute tests should not test raising quantum exceptions, as
    those could never possibly make it back to us. rpc.call only raises
    RemoteError... so use that instead.

    Change-Id: Iacfe511a37e937eaec1d6213bf73153aa4d4e9bf

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