Reschedules sometimes do not allocate networks

Bug #1460176 reported by Jim Rollenhagen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Jim Rollenhagen
Kilo
Fix Released
Undecided
Unassigned
Changed in nova:
status: New → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in nova:
milestone: none → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/kilo)

Reviewed: https://review.openstack.org/186873
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c42b47ef1aefcd84be8867ea63d5ff25c7d2a734
Submitter: Jenkins
Branch: stable/kilo

commit c42b47ef1aefcd84be8867ea63d5ff25c7d2a734
Author: Josh Gachnang <email address hidden>
Date: Fri Apr 24 14:31:26 2015 -0700

    Reschedules sometimes do not allocate networks

    Changes to instance.system_metadata weren't properly being saved
    to the DB. The change to 'network_allocated' would be written to
    the DB but not updated on the instance object. When the network
    was cleaned up before a reschedule, the object would not notice
    network_allocated' getting set to False, and not write the change
    to the DB. After the reschedule, the instance would still have
    'network_allocated' set to True, and skip allocating a network.
    The node would go active with no network.

    Since this is happening in the _allocate_network_async greenthread,
    the solution is not to save in the async thread. The main thread
    and the async thread share a reference to the same object and the
    main thread waits for the async thread to finish before the final
    save, so saving is unnecessary. I added comments on the
    instance.save() calls that were part of the race so they don't get
    removed or changed and reintroduce this bug.

    Also, update the relevant test from mox to mock.

    Closes-Bug: #1460176

    Change-Id: I937ec020b46703392bd603008d03af0f422bc0d1
    (cherry picked from commit 717aa88f14e549d9e5d8b252ba7128e3dac991b6)

Revision history for this message
John Garbutt (johngarbutt) wrote :

its not really released yet, move back to fix committed.

Changed in nova:
status: Fix Released → Fix Committed
importance: Undecided → Medium
assignee: nobody → Jim Rollenhagen (jim-rollenhagen)
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-1 → 12.0.0
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.