← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1759863] Re: placement functional tests can collide when synchronising the traits table

 

Reviewed:  https://review.openstack.org/557722
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bdf06d18aa4ad81e43bf0d1a22c851b43c4cd1c5
Submitter: Zuul
Branch:    master

commit bdf06d18aa4ad81e43bf0d1a22c851b43c4cd1c5
Author: Chris Dent <cdent@xxxxxxxxxxxxx>
Date:   Thu Mar 29 15:10:19 2018 +0100

    [placement] Fix bad management of _TRAITS_SYNCED flag
    
    Placement functional tests could, depending on run order, be unable
    to synchronise the os-traits because a previous test or this test
    has failed to reset the _TRAITS_SYNCED flag.
    
    This change fixes it so the tests will always reset the flag at
    both setUp and tearDown.
    
    In the process a nearby misleading comment which says a database is
    not being used is corrected.
    
    Change-Id: I595be7bca2c1bde86651b126ce501286b301d272
    Closes-Bug: #1759863


** 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/1759863

Title:
  placement functional tests can collide when synchronising the traits
  table

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The placement functional tests make use of the traits table. At the
  start of most requests to the objects in resource_provider.py some
  code is run to make sure that traits in the os-traits library are
  synchronised to the table.

  A global flag is present which says "I've already synchronised".
  Functional tests are responsible for making sure this is in the right
  state.

  It turns out that this management was not complete, and after a recent
  move of db/test_resource_provider.py and
  db/test_allocation_candidates.py within the placement hierarchy the
  delicate balance of how tests are split among processes by stestr was
  upset. This leads to test failures where no traits are in the traits
  table.

  The fix is to ensure that functional tests manage the related db flags
  both during setup and teardown and not rely solely on one or the other
  (as people can easily get it wrong).

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


References