yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #78158
[Bug 1825535] Re: nova.tests.unit.test_rpc.TestRPC intermittently fails if run in isolation
Reviewed: https://review.opendev.org/653954
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3c5095d05fec1c6f512e78af70ff89c49e443f22
Submitter: Zuul
Branch: master
commit 3c5095d05fec1c6f512e78af70ff89c49e443f22
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Fri Apr 19 10:52:57 2019 -0400
Only set oslo_messaging_notifications.driver if using RPCFixture
nova.tests.unit.test_rpc.TestRPC does not use the RPCFixture which
means the base test class setup can fail to set the test notification
driver if the oslo.messaging options, configured via the RPCFixture,
are not set, which results in:
oslo_config.cfg.NoSuchGroupError: no such group [oslo_messaging_notifications]
This change fixes the issue by only setting that option if using
the RPCFixture.
Change-Id: I960638acd14b17ffbb8db3b1dd765b26de4e93f7
Closes-Bug: #1825535
** 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/1825535
Title:
nova.tests.unit.test_rpc.TestRPC intermittently fails if run in
isolation
Status in OpenStack Compute (nova):
Fix Released
Bug description:
By doing this:
tox -e py36 -- nova.tests.unit.test_rpc --until-failure
I'm able to trigger this setup failure:
nova.tests.unit.test_rpc.TestRPC.test_add_extra_exmods
------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "/home/osboxes/git/nova/nova/tests/unit/test_rpc.py", line 54, in setUp'
b' super(TestRPC, self).setUp()'
b' File "/home/osboxes/git/nova/nova/test.py", line 238, in setUp'
b" group='oslo_messaging_notifications')"
b' File "/home/osboxes/git/nova/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2041, in __inner'
b' result = f(self, *args, **kwargs)'
b' File "/home/osboxes/git/nova/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2445, in set_default'
b' opt_info = self._get_opt_info(name, group)'
b' File "/home/osboxes/git/nova/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2828, in _get_opt_info'
b' group = self._get_group(group)'
b' File "/home/osboxes/git/nova/.tox/py36/lib/python3.6/site-packages/oslo_config/cfg.py", line 2797, in _get_group'
b' raise NoSuchGroupError(group_name)'
b'oslo_config.cfg.NoSuchGroupError: no such group [oslo_messaging_notifications]'
b''
It looks like that's because the notification setup in the base test class isn't taking into account when the RPCFixture is being used:
https://github.com/openstack/nova/blob/b7a018f1265d9e0354e26822d32cbdc789819c35/nova/test.py#L237
That should probably be nested under the "if self.STUB_RPC:"
conditional.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1825535/+subscriptions
References