default access_ip_* race condition

Bug #1152328 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

When spawning a new instance, if a user doesn't specify access_ip_v[4|6], defaults are set according to CONF.default_access_ip_network_name.

The access_ip_* values should be set when an instance goes ACTIVE... However, the code does 2 DB calls. 1 to update to ACTIVE. Then 1 to set access_ips. These should be 1 update. If someone times a query just right, they'll see their instance is ACTIVE but with no access_ip_* data.

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

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

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

commit 6a080df6bd8817019d204e3142a236b7974f7656
Author: Chris Behrens <email address hidden>
Date: Thu Mar 7 21:03:19 2013 +0000

    Fix access_ip_* race

    The code currently sets access_ip_* in a 2nd DB call after an instance
    goes ACTIVE, which means there's a slight race when someone is querying
    the API for their instance. It's possible to see the instance ACTIVE but
    access_ip_* will be blank.

    To fix this, we should set access_ip_* at the same time the instance goes
    ACTIVE. This also removes an unnecessary extra DB call.

    Fixes bug 1152328

    Change-Id: I0fe542d49fbc95f27a24f57f674264f8789bc527

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