Network cache should not be refreshed for instances that are still building

Bug #1254320 reported by Phil Day
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Phil Day
Havana
Fix Released
Medium
Alan Pevec

Bug Description

heal_instance_info_cache is a periodic task which refreshes the network cache for instances on a host. Currently it processes instances which are still in the building state, which is both unnecessary (the build itself will update the cache when it completes) and can lead to a race condition; If the periodic task gets Null network information (likely as the instance is still being built) but then gets pre-empted by the build thread and updates the cache after the instance has finished build has finished then the cache is in effect cleared.

Simply skipping instances in the building state avoids this situation.

Phil Day (philip-day)
Changed in nova:
assignee: nobody → Phil Day (philip-day)
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/58109

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

Reviewed: https://review.openstack.org/58109
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=713e538237c7fea0b93ade343b1d9368bdbf2698
Submitter: Jenkins
Branch: master

commit 713e538237c7fea0b93ade343b1d9368bdbf2698
Author: Phil Day <email address hidden>
Date: Sat Nov 23 22:51:12 2013 +0000

    Don't refresh network cache for instances building or deleting

    Refreshing the network cache for an instance which is still building
    is both unnecessary (the build itself will update the cache when it
    completes) and can lead to a race condition if the periodic task gets
    incomplete network information, then gets pre-empted by the build
    thread, and then updates the cache after the build has finished.

    Likewise there is no value in updating the network cache for an
    instance which is in the process of being deleted.

    Change-Id: I7dd1d0a005662b979eaea3476af2506cbc51f17a
    Closes-Bug: 1254320

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/82413

Changed in nova:
milestone: none → icehouse-rc1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc1 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/82413
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2afe82ea73069befb281508361f16462e71d6fc0
Submitter: Jenkins
Branch: stable/havana

commit 2afe82ea73069befb281508361f16462e71d6fc0
Author: Phil Day <email address hidden>
Date: Sat Nov 23 22:51:12 2013 +0000

    Don't refresh network cache for instances building or deleting

    Refreshing the network cache for an instance which is still building
    is both unnecessary (the build itself will update the cache when it
    completes) and can lead to a race condition if the periodic task gets
    incomplete network information, then gets pre-empted by the build
    thread, and then updates the cache after the build has finished.

    Likewise there is no value in updating the network cache for an
    instance which is in the process of being deleted.

    Closes-Bug: 1254320
    (cherry picked from commit 713e538237c7fea0b93ade343b1d9368bdbf2698)

    Conflicts:
     nova/compute/manager.py

    Change-Id: I7dd1d0a005662b979eaea3476af2506cbc51f17a

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.