OpenStack Compute (Nova)

race condition when updating instance after it's deleted

Reported by Chris Behrens on 2012-03-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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) on 2012-03-07
Changed in nova:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Chris Behrens (cbehrens)

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) on 2012-03-20
Changed in nova:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers