unit tests fail on removed oslo.messaging option

Bug #1796759 reported by iain MacDonnell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
iain MacDonnell
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Goutham Pacha Ravi

Bug Description

cinder unit tests are failing with oslo.messaging 9.0.0 due to use of the "rpc_backend" option, which was previous deprecated, and is now removed.

Traceback (most recent call last):
  File "/home/zuul/src/git.openstack.org/openstack/cinder/cinder/tests/unit/api/contrib/test_admin_actions.py", line 934, in setUp
    super(AdminActionsAttachDetachTest, self).setUp()
  File "/home/zuul/src/git.openstack.org/openstack/cinder/cinder/tests/unit/api/contrib/test_admin_actions.py", line 64, in setUp
    super(BaseAdminTest, self).setUp()
  File "/home/zuul/src/git.openstack.org/openstack/cinder/cinder/test.py", line 224, in setUp
    conf_fixture.set_defaults(CONF)
  File "/home/zuul/src/git.openstack.org/openstack/cinder/cinder/tests/unit/conf_fixture.py", line 41, in set_defaults
    conf.set_default('rpc_backend', 'cinder.openstack.common.rpc.impl_fake')
  File "/home/zuul/src/git.openstack.org/openstack/cinder/.tox/py35/lib/python3.5/site-packages/oslo_config/cfg.py", line 2497, in __inner
    result = f(self, *args, **kwargs)
  File "/home/zuul/src/git.openstack.org/openstack/cinder/.tox/py35/lib/python3.5/site-packages/oslo_config/cfg.py", line 2897, in set_default
    opt_info = self._get_opt_info(name, group)
  File "/home/zuul/src/git.openstack.org/openstack/cinder/.tox/py35/lib/python3.5/site-packages/oslo_config/cfg.py", line 3263, in _get_opt_info
    raise NoSuchOptError(opt_name, group)
oslo_config.cfg.NoSuchOptError: no such option rpc_backend in group [DEFAULT]

Changed in cinder:
assignee: nobody → iain MacDonnell (imacdonn)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/608768
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=978f02d2194f879c6a2f1f1e4b3efefc6464526c
Submitter: Zuul
Branch: master

commit 978f02d2194f879c6a2f1f1e4b3efefc6464526c
Author: imacdonn <email address hidden>
Date: Mon Oct 8 20:47:20 2018 +0000

    Stop using deprecated rpc_backend option

    oslo.messaging deprecated the rpc_backend option long ago, but it was
    still being used in cinder unit test configuration fixtures. oslo.messaging
    9.0.0 finally removed that option, so now the tests are failing.

    This change replaces use of rpc_backend with the corresponding
    transport_url option that as recommended at:

    https://docs.openstack.org/oslo.messaging/latest/configuration/conffixture.html

    It also removes a redundant setUp() override.

    Change-Id: I7cc823e96da1fd38ba28650b72a358e792d7c892
    Closes-Bug: #1796759

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Adding manila to this bug report, we're seeing the same failures on the gate, ex:

ft1.1: manila.tests.api.v1.test_share_snapshots.ShareSnapshotAdminActionsAPITest.test_snapshot_reset_status_with_different_roles_2_StringException: Traceback (most recent call last):
  File "manila/tests/api/v1/test_share_snapshots.py", line 357, in setUp
    self.flags(rpc_backend='manila.openstack.common.rpc.impl_fake')
  File "manila/test.py", line 190, in flags
    CONF.set_override(k, v)
  File "/home/zuul/src/git.openstack.org/openstack/manila/.tox/py27/local/lib/python2.7/site-packages/oslo_messaging/conffixture.py", line 80, in _wrapper
    return wrapped_function(*args, **kwargs)
  File "/home/zuul/src/git.openstack.org/openstack/manila/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2029, in __inner
    result = f(self, *args, **kwargs)
  File "/home/zuul/src/git.openstack.org/openstack/manila/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2409, in set_override
    opt_info = self._get_opt_info(name, group)
  File "/home/zuul/src/git.openstack.org/openstack/manila/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2796, in _get_opt_info
    raise NoSuchOptError(opt_name, group)
oslo_config.cfg.NoSuchOptError: no such option rpc_backend in group [DEFAULT]

(from: http://logs.openstack.org/61/608761/2/check/openstack-tox-py27/ddd005b/testr_results.html.gz)

summary: - cinder unit tests fail on removed oslo.messaging option
+ unit tests fail on removed oslo.messaging option
Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
importance: Undecided → High
Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/609832
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=a07c51e8b01074d8ee8bb936a31ad4c1654c4e73
Submitter: Zuul
Branch: master

commit a07c51e8b01074d8ee8bb936a31ad4c1654c4e73
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Oct 11 15:00:07 2018 -0700

    Make coverage non-voting and fix use of rpc_backend

    rpc_backend was an old oslo_messaging option
    that was deprecated in stable/newton and removed
    in master/stein [2], so stop using it in our
    unit tests.

    The coverage job in manila was always non-voting,
    however, a773e31420bfd141682c43d0823d2009078c2fec
    added a common coverage job-template from the
    openstack-zuul-jobs repository. This change
    inadvertently made the non-voting cover job a
    voting job.

    Our coverage script isn't perfect, it is known
    to fail erroneously on non-code changes, and
    some genuine failures are just an indication
    to developers and reviewers to make the best
    effort to adhere to the script's strict
    checks [3].

    These changes are unrelated, but must be fixed
    together to pass the gate, since we have a
    chicken-and-egg problem with both failures
    preventing separate fixes from merging
    separately.

    [1] https://review.openstack.org/#/c/317285/
    [2] https://review.openstack.org/#/c/580910/
    [3] http://git.openstack.org/cgit/openstack/manila/tree/tools/cover.sh

    Closes-Bug: #1796759
    Related-Bug: #1797512
    Change-Id: Ie349c3866d51ea4e706369ad67bc1155f62f2651

Changed in manila:
status: In Progress → Fix Released
Ivan Kolodyazhny (e0ne)
Changed in cinder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/620384

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/rocky)

Change abandoned by Jay Bryant (<email address hidden>) on branch: stable/rocky
Review: https://review.openstack.org/620384
Reason: This patch isn't necessary. The upper constraints for Rocky prevent the new oslo.messaging from being used.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 14.0.0.0rc1

This issue was fixed in the openstack/cinder 14.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 8.0.0.0rc1

This issue was fixed in the openstack/manila 8.0.0.0rc1 release candidate.

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.