Fix test failure to due to set_override with enforce_type=True

Bug #1681334 reported by ChangBo Guo(gcb)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
ChangBo Guo(gcb)

Bug Description

We made a change for oslo.config recently - set_override/set_default with enforce_type=True by default in https://review.openstack.org/328692. This breaks cinder periodic test job in
http://status.openstack.org/openstack-health/#/g/build_name/periodic-cinder-py27-with-oslo-master

Need fix it from cinder side in order not to break Cinder's CI jobs.

Logs from http://logs.openstack.org/periodic/periodic-cinder-py27-with-oslo-master/815ace6/testr_results.html.gz

Traceback (most recent call last):
  File "/home/jenkins/workspace/periodic-cinder-py27-with-oslo-master/.tox/py27-oslo-master/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "cinder/tests/unit/windows/test_windows.py", line 422, in test_update_volume_stats
    self._driver._stats)
  File "/home/jenkins/workspace/periodic-cinder-py27-with-oslo-master/.tox/py27-oslo-master/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/jenkins/workspace/periodic-cinder-py27-with-oslo-master/.tox/py27-oslo-master/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = {'QoS_support': False,
 'driver_version': '1.0.0',
 'free_capacity_gb': sentinel.free_space_gb,
 'reserved_percentage': 10,
 'storage_protocol': 'iSCSI',
 'total_capacity_gb': sentinel.size_gb,
 'vendor_name': 'Microsoft',
 'volume_backend_name': sentinel.backend_name}
actual = {'QoS_support': False,
 'driver_version': '1.0.0',
 'free_capacity_gb': sentinel.free_space_gb,
 'reserved_percentage': 10,
 'storage_protocol': 'iSCSI',
 'total_capacity_gb': sentinel.size_gb,
 'vendor_name': 'Microsoft',
 'volume_backend_name': 'sentinel.backend_name'}

Changed in cinder:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
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/455152

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

Reviewed: https://review.openstack.org/455152
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=2c938e9d9e2b689184cd30709190cf8c38e8a91e
Submitter: Jenkins
Branch: master

commit 2c938e9d9e2b689184cd30709190cf8c38e8a91e
Author: ChangBo Guo(gcb) <email address hidden>
Date: Mon Apr 10 16:01:28 2017 +0800

    Fix config option volume_backend_name's invalid overridden value

    oslo.config made method set_override with enforce_type=True
    by default[1], will try to convert override value according to config
    option's type. Config option volume_backend_name is StrOpt[2], need
    be overridden with string value.

    Closes-Bug: #1681334

    [1] https://review.openstack.org/#/c/328692/
    [2] http://git.openstack.org/cgit/openstack/cinder/tree/cinder/volume/driver.py#n66

    Change-Id: If246b5fd91c7fc2c381acc56ef499ada7f411741

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 11.0.0.0b2

This issue was fixed in the openstack/cinder 11.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/501347

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (driverfixes/ocata)

Fix proposed to branch: driverfixes/ocata
Review: https://review.openstack.org/501348

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

Reviewed: https://review.openstack.org/501347
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=cef207a4005ad412fdee83be525b7221fde950df
Submitter: Zuul
Branch: stable/ocata

commit cef207a4005ad412fdee83be525b7221fde950df
Author: ChangBo Guo(gcb) <email address hidden>
Date: Mon Apr 10 16:01:28 2017 +0800

    Fix config option volume_backend_name's invalid overridden value

    oslo.config made method set_override with enforce_type=True
    by default[1], will try to convert override value according to config
    option's type. Config option volume_backend_name is StrOpt[2], need
    be overridden with string value.

    Closes-Bug: #1681334

    [1] https://review.openstack.org/#/c/328692/
    [2] http://git.openstack.org/cgit/openstack/cinder/tree/cinder/volume/driver.py#n66

    Change-Id: If246b5fd91c7fc2c381acc56ef499ada7f411741
    (cherry picked from commit 2c938e9d9e2b689184cd30709190cf8c38e8a91e)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (driverfixes/ocata)

Reviewed: https://review.openstack.org/501348
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=925876daab92848e580ab2fa728402a8fe5558cc
Submitter: Zuul
Branch: driverfixes/ocata

commit 925876daab92848e580ab2fa728402a8fe5558cc
Author: ChangBo Guo(gcb) <email address hidden>
Date: Mon Apr 10 16:01:28 2017 +0800

    Fix config option volume_backend_name's invalid overridden value

    oslo.config made method set_override with enforce_type=True
    by default[1], will try to convert override value according to config
    option's type. Config option volume_backend_name is StrOpt[2], need
    be overridden with string value.

    Closes-Bug: #1681334

    [1] https://review.openstack.org/#/c/328692/
    [2] http://git.openstack.org/cgit/openstack/cinder/tree/cinder/volume/driver.py#n66

    Change-Id: If246b5fd91c7fc2c381acc56ef499ada7f411741
    (cherry picked from commit 2c938e9d9e2b689184cd30709190cf8c38e8a91e)
    (cherry picked from commit cef207a4005ad412fdee83be525b7221fde950df)

tags: added: in-driverfixes-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 10.0.7

This issue was fixed in the openstack/cinder 10.0.7 release.

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.