Race condition in Ironic unittests

Bug #1442081 reported by Viktor Serhieiev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Viktor Serhieiev

Bug Description

Unittest test_set_none_dhcp() in TestDHCPFactory test class creates DHCPFactory object with DHCP provider 'none'. Ironic instantiate a stevedore.driver.DriverManager only once, the first time DHCPFactory.__init__ called, so when we try to create an another instance of DHCPFactory, it will already initialized provider 'none', but test_prepare_cleaning() test required 'neutron' provider, to pass correctly.

See failure on gates [1] and local reproduce [2].

[1] http://logs.openstack.org/06/169606/4/gate/gate-ironic-python27/bfe6c3d/console.html
[2] http://paste.openstack.org/show/201179/

Tags: tests
Changed in ironic:
assignee: nobody → Victor Sergeyev (vsergeyev)
Changed in ironic:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/172036

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/172036
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=d0a5e0af1571e060951538b6274da4a294144d69
Submitter: Jenkins
Branch: master

commit d0a5e0af1571e060951538b6274da4a294144d69
Author: Victor Sergeyev <email address hidden>
Date: Thu Apr 9 15:41:10 2015 +0300

    Cleanup DHCPFactory._dhcp_provider after tests

    Set DHCPFactory._dhcp_provider to None after test to allow instantiate
    a new stevedore.driver.DriverManage for the new DHCPFactory instance.

    Closes-Bug: #1442081
    Change-Id: I19cf6ca009d5c57d3d59a7a128bc8948f3f12b71

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