TestProviderOperations.test_get_allocation_candidates randomly fails AssertionError because of hash seed

Bug #1747063 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
High
Matt Riedemann

Bug Description

Seen here:

http://logs.openstack.org/89/532689/6/gate/openstack-tox-py35/825fbb9/job-output.txt.gz#_2018-02-02_17_02_50_361819

2018-02-02 17:02:50.361819 | ubuntu-xenial | nova.tests.unit.scheduler.client.test_report.TestProviderOperations.test_get_allocation_candidates
2018-02-02 17:02:50.361939 | ubuntu-xenial | --------------------------------------------------------------------------------------------------
2018-02-02 17:02:50.361957 | ubuntu-xenial |
2018-02-02 17:02:50.361998 | ubuntu-xenial | Captured pythonlogging:
2018-02-02 17:02:50.362069 | ubuntu-xenial | ~~~~~~~~~~~~~~~~~~~~~~~
2018-02-02 17:02:50.362259 | ubuntu-xenial | b'2018-02-02 17:00:28,797 WARNING [oslo_config.cfg] Config option key_manager.api_class is deprecated. Use option key_manager.backend instead.'
2018-02-02 17:02:50.362423 | ubuntu-xenial | b"2018-02-02 17:00:28,811 WARNING [nova.scheduler.utils] Only (required) traits are supported. Received 'preferred' for key traitNone."
2018-02-02 17:02:50.362478 | ubuntu-xenial | b''
2018-02-02 17:02:50.362502 | ubuntu-xenial |
2018-02-02 17:02:50.362546 | ubuntu-xenial | Captured traceback:
2018-02-02 17:02:50.362584 | ubuntu-xenial | ~~~~~~~~~~~~~~~~~~~
2018-02-02 17:02:50.362643 | ubuntu-xenial | b'Traceback (most recent call last):'
2018-02-02 17:02:50.362821 | ubuntu-xenial | b' File "/home/zuul/src/git.openstack.org/openstack/nova/nova/tests/unit/scheduler/client/test_report.py", line 1512, in test_get_allocation_candidates'
2018-02-02 17:02:50.362919 | ubuntu-xenial | b" expected_url, raise_exc=False, microversion='1.17')"
2018-02-02 17:02:50.363092 | ubuntu-xenial | b' File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/py35/lib/python3.5/site-packages/mock/mock.py", line 948, in assert_called_once_with'
2018-02-02 17:02:50.363179 | ubuntu-xenial | b' return self.assert_called_with(*args, **kwargs)'
2018-02-02 17:02:50.363368 | ubuntu-xenial | b' File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/py35/lib/python3.5/site-packages/mock/mock.py", line 937, in assert_called_with'
2018-02-02 17:02:50.363461 | ubuntu-xenial | b' six.raise_from(AssertionError(_error_message(cause)), cause)'
2018-02-02 17:02:50.363536 | ubuntu-xenial | b' File "<string>", line 3, in raise_from'
2018-02-02 17:02:50.363742 | ubuntu-xenial | b"AssertionError: Expected call: get('/allocation_candidates?resources=MEMORY_MB%3A1024%2CVCPU%3A1&required=CUSTOM_TRAIT1&limit=1000', microversion='1.17', raise_exc=False)"
2018-02-02 17:02:50.363922 | ubuntu-xenial | b"Actual call: get('/allocation_candidates?resources=MEMORY_MB%3A1024%2CVCPU%3A1&limit=1000&required=CUSTOM_TRAIT1', microversion='1.17', raise_exc=False)"
2018-02-02 17:02:50.363947 | ubuntu-xenial | b''

It's failing because we're getting random results of the entries in the query string params.

Revision history for this message
Matt Riedemann (mriedem) wrote :
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/540513

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/540513
Reason: Chris already had a patch for this:

https://review.openstack.org/#/c/540420

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.