← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1715493] Related fix merged to nova (master)

 

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

commit bcd1f1d8c833c4c12399ba84934a9a72a2bde122
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Wed Sep 6 21:29:25 2017 -0400

    Make ConductorTaskTestCase run with 2 cells
    
    This lays the groundwork for ConductorTaskTestCase to run
    with two cells which is needed for an upcoming fix.
    
    As a result, some mocks needed to be removed for targeting
    a cell context, but we still assert a targeted context is
    used where necessary, just in a different way. Some other
    DB-hitting operations needed to be mocked out in the unshelve
    tests since the instance being worked on isn't actually in
    a database, and these should have probably been mocked out
    anyway.
    
    Change-Id: I6548548825c00a71f3d317ceb37be26da312be31
    Related-Bug: #1715493


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1715493

Title:
  Instances always get mapped into the last processed cell in conductor

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) pike series:
  Triaged

Bug description:
  This was a regression introduced in Pike here:
  https://review.openstack.org/#/c/416521/

  The schedule_and_build_instances method in conductor was split into
  two for loops, where the first loop creates the instance record in the
  cell database and the cell is looked up via the host mapping for the
  chosen host for that instance.

  The problem is the 2nd for loop doesn't do the same cell lookup based
  on the host:

  https://github.com/openstack/nova/blob/b79492f70257754f960eaf38ad6a3f56f647cb3d/nova/conductor/manager.py#L1023

  It just re-uses the last set cell variable from the first for loop, so
  we could have a case where an instance is created in cell1, and then
  another instance is created in cell2, and then when the 2nd loop maps
  the first instance, it maps it to cell2 but it really lives in cell1.

  Not to mention the BDMs and tags would be created in the wrong cell.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1715493/+subscriptions


References