CI failed: test_get_volume_filter_options_using_config

Bug #1809647 reported by Yikun Jiang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
wanghao

Bug Description

http://logs.openstack.org/42/617542/11/check/openstack-tox-py27/9566336/testr_results.html.gz

ft1.13: cinder.tests.unit.api.v2.test_volumes.VolumeApiTest.test_get_volume_filter_options_using_config_StringException: pythonlogging:'': {{{
2018-12-24 07:31:21,421 INFO [keystonemiddleware.auth_token] Starting Keystone auth_token middleware
2018-12-24 07:31:21,426 WARNING [keystonemiddleware._common.config] The option "auth_url" in conf is not known to auth_token
2018-12-24 07:31:21,426 WARNING [keystonemiddleware.auth_token] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
2018-12-24 07:31:21,429 WARNING [keystonemiddleware.auth_token] Configuring www_authenticate_uri to point to the public identity endpoint is required; clients may not be able to authenticate against an admin endpoint
2018-12-24 07:31:21,452 INFO [cinder.rpc] Automatically selected cinder-scheduler objects version 1.37 as minimum service version.
2018-12-24 07:31:21,454 INFO [cinder.rpc] Automatically selected cinder-scheduler RPC version 3.11 as minimum service version.
2018-12-24 07:31:21,458 INFO [cinder.rpc] Automatically selected cinder-volume objects version 1.37 as minimum service version.
2018-12-24 07:31:21,461 INFO [cinder.rpc] Automatically selected cinder-volume RPC version 3.16 as minimum service version.
}}}

Traceback (most recent call last):
  File "cinder/tests/unit/api/v2/test_volumes.py", line 1683, in test_get_volume_filter_options_using_config
    self.controller._get_volume_filter_options())
  File "cinder/api/v2/volumes.py", line 277, in _get_volume_filter_options
    return common.get_enabled_resource_filters('volume')['volume']
KeyError: 'volume'

Recently, CI failed(py27, py35 and other unit tests) due to by this case.
In patch[1], we remove deprecated query_volume_filters config option, but the test case is fixed by a wrong way.

The resource_query_filters_file is a **json path**, but NOT a **json str**, if we want to overwrite it, we should overwrite the _FILTERS_COLLECTION.[2]

Unfortunately, if we have already called the _initialize_filters in other case (before this case), this error will not exposed. So, we didn't found this error happened in first-CI.

[1] https://review.openstack.org/#/c/620632/
[2] https://review.openstack.org/#/c/620632/2/cinder/api/common.py@356

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/627169

Changed in cinder:
assignee: nobody → Yikun Jiang (yikunkero)
status: New → In Progress
Changed in cinder:
assignee: Yikun Jiang (yikunkero) → wanghao (wanghao749)
Changed in cinder:
assignee: wanghao (wanghao749) → Yikun Jiang (yikunkero)
Changed in cinder:
assignee: Yikun Jiang (yikunkero) → wanghao (wanghao749)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/627169
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=785435a18f65fe85561d3ad39a2dfaf19b44bb41
Submitter: Zuul
Branch: master

commit 785435a18f65fe85561d3ad39a2dfaf19b44bb41
Author: Yikun Jiang <email address hidden>
Date: Mon Dec 24 17:41:04 2018 +0800

    Fix CI failed: test_get_volume_filter_options_using_config

    Recently, CI failed(py27, py35 and other unit tests) due to
    test_get_volume_filter_options_using_config case.

    In patch[1], we remove deprecated query_volume_filters config option,
    but the test case is fixed by a wrong way. The
    ``CONF.resource_query_filters_file`` is a **json path**, but NOT a
    **json str**, if we want to overwrite it, we should overwrite the
    _FILTERS_COLLECTION.[2]

    Unfortunately, if we have already called the _initialize_filters in
    other case (before this case), this error will not be exposed. So, we
    didn't find this error occurring in first-CI.

    This patch try to fix this issue.

    Co-Authored-By: wanghao <email address hidden>

    Closes-bug: #1809647

    [1] https://review.openstack.org/#/c/620632/
    [2] https://review.openstack.org/#/c/620632/2/cinder/api/common.py@356

    Change-Id: I190cc67a001ffce2a533480e6e39e26cd3f981df

Changed in cinder:
status: In Progress → Fix Released
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.

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.