Make CONF.set_override with parameter enforce_type=True by default

Bug #1517839 reported by ChangBo Guo(gcb) on 2015-11-19
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Undecided
ChangBo Guo(gcb)
Designate
Medium
Unassigned
Glance
Undecided
Unassigned
Ironic
Low
Javier Peña
Karbor
Undecided
Ji.Wei
Magnum
Undecided
Ji.Wei
Manila
Low
NidhiMittalHada
Murano
Low
LiuNanke
OpenStack Backup/Restore and DR (Freezer)
Undecided
Ji.Wei
OpenStack Compute (nova)
Low
Pallavi
OpenStack Identity (keystone)
Undecided
LiuNanke
Quark: Money Reinvented
Undecided
Ji.Wei
Rally
Low
LiuNanke
cloudkitty
Undecided
Chaozhe Chen
heat
Low
Angus Salkeld
kolla
Low
Ji.Wei
neutron
Undecided
Unassigned
octavia
Low
Ji.Wei
oslo.config
Undecided
ChangBo Guo(gcb)
oslo.messaging
Undecided
javeme
senlin
Undecided
Ji.Wei
tacker
Undecided
Ji.Wei
tempest
Undecided
ChangBo Guo(gcb)
watcher
Medium
ting.wang

Bug Description

1. Problems :
   oslo_config provides method CONF.set_override[1] , developers usually use it to change config option's value in tests. That's convenient .
   By default parameter enforce_type=False, it doesn't check any type or value of override. If set enforce_type=True , will check parameter
   override's type and value. In production code(running time code), oslo_config always checks config option's value.
   In short, we test and run code in different ways. so there's gap: config option with wrong type or invalid value can pass tests when
   parameter enforce_type = False in consuming projects. that means some invalid or wrong tests are in our code base.

   [1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L2173

2. Proposal
   1) Fix violations when enforce_type=True in each project.

  2) Make method CONF.set_override with enforce_type=True by default in oslo_config

 You can find more details and comments in https://etherpad.openstack.org/p/enforce_type_true_by_default

3. How to find violations in your projects.

   1. Run tox -e py27

   2. then modify oslo.config with enforce_type=True
      cd .tox/py27/lib64/python2.7/site-packages/oslo_config
      edit cfg.py with enforce_type=True

- def set_override(self, name, override, group=None, enforce_type=False):
+ def set_override(self, name, override, group=None, enforce_type=True):

  3. Run tox -e py27 again, you will find violations.

The current state is that oslo.config make enforce_type as True by default and deprecate this parameter, will remove it in the future, the current work
is that remove usage of enforce_type in consuming projects. We can list the
usage of it in http://codesearch.openstack.org/?q=enforce_type&i=nope&files=&repos=

Changed in oslo.config:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
LiuNanke (nanke-liu) on 2016-01-01
Changed in rally:
assignee: nobody → LiuNanke (nanke-liu)

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

Changed in rally:
status: New → In Progress
LiuNanke (nanke-liu) on 2016-01-03
Changed in keystone:
assignee: nobody → LiuNanke (nanke-liu)
Changed in keystone:
status: New → In Progress

Change abandoned by LiuNanke (<email address hidden>) on branch: master
Review: https://review.openstack.org/261563

LiuNanke (nanke-liu) on 2016-01-04
Changed in rally:
status: In Progress → New
Changed in keystone:
status: In Progress → New
Changed in rally:
status: New → Triaged
importance: Undecided → Low

Reviewed: https://review.openstack.org/263031
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=9ec0f3317bfb92f4f2244752f66dc1a5bb91e40b
Submitter: Jenkins
Branch: master

commit 9ec0f3317bfb92f4f2244752f66dc1a5bb91e40b
Author: LiuNanke <email address hidden>
Date: Sun Jan 3 20:35:00 2016 +0800

    Test: make enforce_type=True in CONF.set_override

    each config option has limitation for type and value.
    In production code, oslo.conf can ensure user's input
    is valid, but in unit test, test methods can pass if
    we use method CONF.set_override without parameter
    enforce_type=True even we pass wrong type or wrong
    value to config option. This commit makes sure calling
    method CONF.set_override with enforce_type=True.

    Change-Id: I52fdc7ed9f74f80814fbafd00625dcdd5597ba0e
    Closes-bug: #1517839

Changed in keystone:
status: New → Fix Released

Reviewed: https://review.openstack.org/262879
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=dfd736309208d6d8bd15c235eb7b2cc528c33760
Submitter: Jenkins
Branch: master

commit dfd736309208d6d8bd15c235eb7b2cc528c33760
Author: LiuNanke <email address hidden>
Date: Sat Jan 2 03:05:13 2016 +0800

    test: make enforce_type=True in CONF.set_override

    Each config option has limitation for type and value.
    In production code, oslo.conf can ensure user's input
    is valid, but in unit test, test methods can pass if
    we use method CONF.set_override without parameter
    enforce_type=True even we pass wrong type or wrong
    value to config option. This commit makes sure calling
    method CONF.set_override with enforce_type=True,

    Change-Id: Ib22685902103d2a2b9f032a25de19e92b40e8154
    Closes-Bug: #1517839

Changed in rally:
status: Triaged → Fix Released
LiuNanke (nanke-liu) on 2016-01-05
Changed in gnocchi:
status: New → In Progress
assignee: nobody → LiuNanke (nanke-liu)
Changed in oslo.messaging:
assignee: nobody → javeme (javaloveme)
status: New → In Progress

Reviewed: https://review.openstack.org/264616
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=ca6c34ac71a506026d3754584de7616ad2a7d8da
Submitter: Jenkins
Branch: master

commit ca6c34ac71a506026d3754584de7616ad2a7d8da
Author: Javeme <email address hidden>
Date: Thu Jan 7 14:59:45 2016 +0800

    make enforce_type=True in CONF.set_override

    Each config option has limitation for type and value. If we use
    method CONF.set_override without parameter enforce_type=True, we
    may pass wrong type to config option.

    This commit makes sure calling method CONF.set_override with
    enforce_type=True.

    Change-Id: I1430c93777d6e5d98086a8700663ab9f58c1e5ab
    Closes-Bug: #1517839

Changed in oslo.messaging:
status: In Progress → Fix Released
Changed in cloudkitty:
assignee: nobody → Chaozhe Chen (chaozhe-chen)
Changed in ceilometer:
assignee: nobody → Chaozhe Chen (chaozhe-chen)

Reviewed: https://review.openstack.org/265737
Committed: https://git.openstack.org/cgit/openstack/cloudkitty/commit/?id=f9b52a93bb8070ba93dd79ff2aa3e41a5057b710
Submitter: Jenkins
Branch: master

commit f9b52a93bb8070ba93dd79ff2aa3e41a5057b710
Author: Chaozhe.Chen <email address hidden>
Date: Mon Jan 11 17:48:39 2016 +0800

    Test: make enforce_type=True in CONF.set_override

    Method CONF.set_override to change config option's
    value with designated value in unit test, but never check if the
    designated vaule is valid. Each config option has a type like StrOpt,
    BoolOpt, etc. StrOpt with parameter choices only allows values in set
    of choices. In short, each config option has limitation for type
    and value. In production code, oslo.conf can ensure user's input is
    valid, but in unit test, test methods can pass if we use method
    CONF.set_override without parameter enforce_type=True even we pass wrong
    type or wrong value to config option. This commit makes sure calling
    method CONF.set_override with enforce_type=True and fixes violations.

    Change-Id: Ibf5570b74947b071b96aa7ca4a682affb137d065
    Related-Bug: #1517839

caoyue (yue-cao) on 2016-01-12
Changed in neutron:
assignee: nobody → caoyue (yue-cao)
ting.wang (bx-wang) on 2016-01-12
Changed in heat:
assignee: nobody → tingwang (bx-wang)
ting.wang (bx-wang) on 2016-01-12
Changed in manila:
assignee: nobody → tingwang (bx-wang)
Changed in glance:
assignee: nobody → tingwang (bx-wang)
ting.wang (bx-wang) on 2016-01-12
no longer affects: sahara
ting.wang (bx-wang) on 2016-01-12
Changed in designate:
assignee: nobody → tingwang (bx-wang)
ting.wang (bx-wang) on 2016-01-12
no longer affects: glance
ting.wang (bx-wang) on 2016-01-12
Changed in watcher:
assignee: nobody → tingwang (bx-wang)
caoyue (yue-cao) on 2016-01-13
Changed in neutron:
status: New → In Progress
Tim Simmons (timsim) on 2016-01-13
Changed in designate:
importance: Undecided → Medium
milestone: none → mitaka-3
status: New → Confirmed
Changed in murano:
importance: Undecided → Low
milestone: none → mitaka-2
assignee: nobody → LiuNanke (nanke-liu)
status: New → In Progress

Change abandoned by ting wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/266929
Reason: Now that there's no bug here, It's OK to wait oslo.config set enforce_type to be default action.

Change abandoned by ting wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/266927
Reason: Now that there's no bug here, It's OK to wait oslo.config set enforce_type to be default action.

Change abandoned by ting wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/266829
Reason: Now that there's no bug here, It's OK to wait oslo.config set enforce_type to be default action.

Reviewed: https://review.openstack.org/266661
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=473cee8ad3685dc809cb1af401e261f32ebac95a
Submitter: Jenkins
Branch: master

commit 473cee8ad3685dc809cb1af401e261f32ebac95a
Author: ting.wang <email address hidden>
Date: Wed Jan 13 11:35:15 2016 +0800

    Test: make enforce_type=True in CONF.set_override and fix error

    Each config option has limitation for type and value.
    We make enforce_type=True to check whether we pass wrong type.

    Also fixes a type error issue in test_db_manager.py.

    Change-Id: I6e111e21588525d32b05eeba75b06583d4e605ed
    Related-Bug: #1517839

Change abandoned by caoyue (<email address hidden>) on branch: master
Review: https://review.openstack.org/265078

Reviewed: https://review.openstack.org/266345
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=e0c1653fa83c0e3b232fd217aaee6124b9089779
Submitter: Jenkins
Branch: master

commit e0c1653fa83c0e3b232fd217aaee6124b9089779
Author: LiuNanke <email address hidden>
Date: Tue Jan 12 20:45:28 2016 +0800

    make enforce_type=True in CONF.set_override

    Method CONF.set_override to change config option's
    value with designated value in unit test, but never check if the
    designated vaule is valid. Each config option has a type like StrOpt,
    BoolOpt, etc. StrOpt with parameter choices only allows values in set
    of choices. In short, each config option has limitation for type
    and value. In production code, oslo.conf can ensure user's input is
    valid, but in unit test, test methods can pass if we use method
    CONF.set_override without parameter enforce_type=True even we pass wrong
    type or wrong value to config option. This commit makes sure calling
    method CONF.set_override with enforce_type=True and fixes violations.

    Note: We can't set enforce_type=True by default in oslo.config now, it
    may break all project's unit test. We can switch enforce_type=True by
    default when all project fix violations like this commit.
    Related-Bug: #1517839

    Change-Id: Ia9f6b8a04290f93699fc1f613ce0e841f040d4ae

summary: - Make CONF.set_override with paramter enforce_type=True by default
+ Make CONF.set_override with parameter enforce_type=True by default
Changed in watcher:
importance: Undecided → Medium
milestone: none → mitaka-3

Change abandoned by caoyue (<email address hidden>) on branch: master
Review: https://review.openstack.org/268618
Reason: thx

ting.wang (bx-wang) on 2016-01-21
Changed in manila:
assignee: tingwang (bx-wang) → nobody
Changed in murano:
milestone: mitaka-2 → mitaka-3
Changed in manila:
assignee: nobody → NidhiMittalHada (nidhimittal19)
caoyue (yue-cao) on 2016-01-25
Changed in neutron:
assignee: caoyue (yue-cao) → nobody

Reviewed: https://review.openstack.org/268615
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=709c842502875e3408c9fd2f8c1506af32ca9db2
Submitter: Jenkins
Branch: master

commit 709c842502875e3408c9fd2f8c1506af32ca9db2
Author: caoyue <email address hidden>
Date: Sat Jan 16 15:43:11 2016 +0800

    test: make enforce_type=True in CONF.set_override

    each config option has limitation for type and value. In production
    code, oslo.conf can ensure user's input is valid, but in unit test,
    test methods can pass if we use method CONF.set_override without
    parameter enforce_type=True even we pass wrong type or wrong value
    to config option. This commit makes sure calling method
    CONF.set_override with enforce_type=True

    Change-Id: Ia1511c1e1db53c83c8745134804aa09c7d2a3408
    Related-Bug: #1517839

Changed in watcher:
status: New → Fix Released

This issue was fixed in the openstack/oslo.messaging 4.1.0 release.

ting.wang (bx-wang) on 2016-02-05
Changed in designate:
assignee: tingwang (bx-wang) → nobody
Changed in murano:
status: In Progress → Fix Released
Changed in cloudkitty:
status: New → Fix Released
Changed in heat:
assignee: tingwang (bx-wang) → nobody
Changed in neutron:
status: In Progress → New
Changed in cinder:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
status: New → In Progress

Neutron does not need anything to do with it. We'll just wait for oslo.config to enforce the types for us.

Changed in neutron:
status: New → Won't Fix
gordon chung (chungg) on 2016-03-10
no longer affects: ceilometer
no longer affects: gnocchi
Changed in manila:
milestone: none → newton-1
Changed in manila:
importance: Undecided → Low
status: New → Triaged
Graham Hayes (grahamhayes) wrote :
Changed in designate:
status: Confirmed → Fix Released
Angus Salkeld (asalkeld) on 2016-03-31
Changed in heat:
importance: Undecided → Low
status: New → Confirmed
assignee: nobody → Angus Salkeld (asalkeld)

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

Changed in heat:
status: Confirmed → In Progress
Changed in heat:
milestone: none → newton-1

Reviewed: https://review.openstack.org/300251
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3ed5948b1c20a000e82bea4cd2af7f4dce039ba9
Submitter: Jenkins
Branch: master

commit 3ed5948b1c20a000e82bea4cd2af7f4dce039ba9
Author: Angus Salkeld <email address hidden>
Date: Mon Apr 11 10:52:22 2016 +1000

    Set enforce_type=True on config overrides in tests

    This makes sure that type checking is done by oslo.config
    on the test override values.

    Change-Id: Ia8c1cb55fe98e9d06b9b9ff13e5c2d25aa67bff3
    Closes-bug: #1517839

Changed in heat:
status: In Progress → Fix Released

working on this

Changed in manila:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/310714
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=c8ff80353173d8785df01a71842d78bbfa290234
Submitter: Jenkins
Branch: master

commit c8ff80353173d8785df01a71842d78bbfa290234
Author: nidhimittalhada <email address hidden>
Date: Thu Apr 28 14:58:18 2016 +0530

    Test: make enforce_type=True in CONF.set_override

    Each config option has limitation for type and value. If we use
    method CONF.set_override without parameter enforce_type=True, we
    may pass wrong type to config option.

    This commit makes sure calling method CONF.set_override with
    enforce_type=True.

    Change-Id: I700dcd21941c6399c51e11bef2282e1e4565e85a
    Closes-Bug: #1517839

Changed in manila:
status: In Progress → Fix Released

This issue was fixed in the openstack/heat 7.0.0.0b1 development milestone.

This issue was fixed in the openstack/manila 3.0.0.0b1 development milestone.

Related fix proposed to branch: master
Review: https://review.openstack.org/325748

Related fix proposed to branch: master
Review: https://review.openstack.org/325749

Pallavi (pallavi-s) on 2016-06-06
Changed in nova:
assignee: nobody → Pallavi (pallavi-s)
tags: added: oslo testing

Related fix proposed to branch: master
Review: https://review.openstack.org/325757

Changed in nova:
importance: Undecided → Low
status: New → In Progress

Related fix proposed to branch: master
Review: https://review.openstack.org/325761

Related fix proposed to branch: master
Review: https://review.openstack.org/325765

Related fix proposed to branch: master
Review: https://review.openstack.org/325771

Changed in oslo.config:
status: New → In Progress
Ji.Wei (jiwei) on 2016-06-29
Changed in glance:
assignee: nobody → Ji.Wei (jiwei)
description: updated
description: updated
description: updated
Changed in nova:
status: In Progress → Fix Released
Ji.Wei (jiwei) on 2016-08-31
Changed in glance-store:
assignee: nobody → Ji.Wei (jiwei)
Changed in ceilometer:
assignee: nobody → Ji.Wei (jiwei)
Ji.Wei (jiwei) on 2016-08-31
Changed in glance:
assignee: Ji.Wei (jiwei) → nobody
status: New → Invalid
Changed in tacker:
assignee: nobody → Ji.Wei (jiwei)
Ji.Wei (jiwei) on 2016-08-31
Changed in freezer:
assignee: nobody → Ji.Wei (jiwei)
Changed in tacker:
status: New → In Progress
Hanxi Liu (hanxi-liu) on 2016-09-04
Changed in gnocchi:
assignee: nobody → Hanxi Liu (hanxi-liu)
Changed in ceilometer:
assignee: Ji.Wei (jiwei) → Hanxi Liu (hanxi-liu)
status: New → In Progress
Changed in gnocchi:
status: New → In Progress
Ji.Wei (jiwei) on 2016-09-05
Changed in freezer:
status: New → In Progress
Changed in glance-store:
status: New → In Progress
Changed in panko:
assignee: nobody → xiaozhuangqing (xiaozhuangqing)
Changed in aodh:
assignee: nobody → xiaozhuangqing (xiaozhuangqing)
status: New → In Progress
Changed in panko:
status: New → In Progress
Ji.Wei (jiwei) on 2016-09-05
Changed in magnum:
assignee: nobody → Ji.Wei (jiwei)
Changed in quark:
assignee: nobody → Ji.Wei (jiwei)
Changed in senlin:
assignee: nobody → Ji.Wei (jiwei)
Ji.Wei (jiwei) on 2016-09-05
Changed in ironic:
assignee: nobody → Ji.Wei (jiwei)
Ji.Wei (jiwei) on 2016-09-05
Changed in karbor:
assignee: nobody → Ji.Wei (jiwei)
Changed in octavia:
assignee: nobody → Ji.Wei (jiwei)
Changed in kolla:
assignee: nobody → Ji.Wei (jiwei)
Changed in karbor:
status: New → In Progress
Dmitry Tantsur (divius) on 2016-09-05
Changed in ironic:
importance: Undecided → Low
status: New → Triaged
Changed in karbor:
status: In Progress → Fix Released
Changed in magnum:
status: New → In Progress
Julien Danjou (jdanjou) on 2016-09-15
no longer affects: panko
Julien Danjou (jdanjou) on 2016-09-21
no longer affects: gnocchi
Changed in senlin:
status: New → Fix Released
Changed in octavia:
importance: Undecided → Low
gordon chung (chungg) on 2016-11-02
no longer affects: ceilometer
no longer affects: aodh
Changed in kolla:
importance: Undecided → Low
status: New → Confirmed
39 comments hidden view all 119 comments

Related fix proposed to branch: master
Review: https://review.openstack.org/406449

This issue was fixed in the openstack/senlin 2.0.0 release.

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

commit ccd8abb7f10073905162c168e5fcb5a819871cf7
Author: ChangBo Guo(gcb) <email address hidden>
Date: Tue Jun 28 16:49:18 2016 +0800

    Fix wrong usage of config option gpfs_images_share_mode

    Config option gpfs_images_share_mode with parameter choices=['copy',
    'copy_on_write', None], that means any other value will raise
    ValueError, the check is done by the configuration parser, so no
    invalid value will be accepted and the driver doesn't need to check it
    again. For more details when we set method set_override with paramter
    enforce_type=True, please see: http://paste.openstack.org/show/523740/

    Related-Bug: 1517839

    Change-Id: I000ab639e68534e7be111cc3759b6ae1dffd5520

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

commit c23c44a7b78630fe2cfe531cb6978e28d05f9344
Author: ChangBo Guo(gcb) <email address hidden>
Date: Tue Jun 28 17:10:46 2016 +0800

    test: fix wrong usage of config option in test_window

    Developers usually use method CONF.set_override to change
    config option's value in tests. By default the parameter
    enforce_type=False, it doesn't check any type or value of
    override. If set enforce_type=True , will check parameter
    verride type and value. In production code, oslo_config
    always checks config option's value. In short, we test and
    run code in different ways. For more details when we set method
    set_override with parameter enforce_type=True, please see:
    http://paste.openstack.org/show/523740/

    Related-Bug: 1517839
    Change-Id: I0e1929f7e6afa9b9d5daa15e04418b7111ab9e2f

Reviewed: https://review.openstack.org/406449
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c7df051e3e40fa5ddcf3e472cae6f390f07272e1
Submitter: Jenkins
Branch: master

commit c7df051e3e40fa5ddcf3e472cae6f390f07272e1
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sat Dec 3 18:19:16 2016 +0800

    Remove invalid tests for config option osapi_compute_workers

    Config option osapi_compute_workers is integer with min=1, that
    means any value < 1 will raise ValueError in runtime. Method
    set_override of ConfigOpts will not check value when enforce_type=False,
    In the future release of oslo.config, will set parameter enforce_type
    with True by default.

    This commit fixes warning as follow:
    DeprecationWarning: The argument enforce_type is changing its default
    value to True and then will be removed completely, please fix the
    invalid Integer(min=1) value '0' for option 'osapi_compute_workers'. in
    version '4.0'

    Related-Bug: 1517839

    Change-Id: I7da19419ed13e5d0602bbf5028c3cf7ae30c3c62

Changed in kolla:
milestone: none → ocata-3
Ian Cordasco (icordasc) on 2017-01-30
no longer affects: glance-store

Reviewed: https://review.openstack.org/328692
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=3a8ba0f8ea5a691cc0cb4cd83f07feb26b4d1267
Submitter: Jenkins
Branch: master

commit 3a8ba0f8ea5a691cc0cb4cd83f07feb26b4d1267
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sun Jun 12 13:18:05 2016 +0800

    Make set_override/set_default with enforce_type=True by default

    Consuming projects usually don't set enforce_type=True by default,
    and that will lead some invalid tests which don't honour Config options'
    type and value limits. We began to warn user about the change since Sep,
    2016 in I438aeb766d663dbfe5dbd263fd166c25814204e8. This change will
    notify consuming project to write correct test cases with config
    options.

    This commit also fixes violations in oslo.config test:
    config option 'namespace' is MultiStrOpt, need pass list
    to conf.set_default().

    Closes-Bug: #1517839

    Change-Id: Ifa552de0a994e40388cbc9f7dbaa55700ca276b0

Changed in oslo.config:
status: In Progress → Fix Released
Luigi Toscano (ltoscano) wrote :
Download full text (7.4 KiB)

You missed Tempest. Excerpt from RDO trunk logs (which uses the master branch of oslo.config, not the released version like - iirc - tox):
https://trunk.rdoproject.org/centos7-master-head/64/55/6455980e71abd2300f3ef15400593f479122de83_f98deee5/rpmbuild.log

DEBUG: FAIL: tempest.tests.test_config.TestServiceClientConfig.test_service_client_config_no_service
DEBUG: tags: worker-7
DEBUG: ----------------------------------------------------------------------
DEBUG: Empty attachments:
DEBUG: stderr
DEBUG: stdout
DEBUG: Traceback (most recent call last):
DEBUG: File "tempest/tests/test_config.py", line 32, in setUp
DEBUG: self.useFixture(fake_config.ServiceClientsConfigFixture())
DEBUG: File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 679, in useFixture
DEBUG: reraise(*exc_info)
DEBUG: File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 666, in useFixture
DEBUG: fixture.setUp()
DEBUG: File "tempest/tests/fake_config.py", line 97, in setUp
DEBUG: self.conf.set_default('v3_endpoint_type', 'fake_v3_uri', 'identity')
DEBUG: File "/usr/lib/python2.7/site-packages/debtcollector/removals.py", line 261, in wrapper
DEBUG: return f(*args, **kwargs)
DEBUG: File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2312, in __inner
DEBUG: result = f(self, *args, **kwargs)
DEBUG: File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2659, in set_default
DEBUG: opt_info['opt'], default, enforce_type)
DEBUG: File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2665, in _get_enforced_type_value
DEBUG: converted = self._convert_value(value, opt)
DEBUG: File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2943, in _convert_value
DEBUG: return opt.type(value)
DEBUG: File "/usr/lib/python2.7/site-packages/oslo_config/types.py", line 156, in __call__
DEBUG: repr(value)))
DEBUG: ValueError: Valid values are [public, admin, internal, publicURL, adminURL, internalURL], but found 'fake_v3_uri'
DEBUG: ======================================================================
DEBUG: FAIL: tempest.tests.test_config.TestServiceClientConfig.test_service_client_config_service_all
DEBUG: tags: worker-7
DEBUG: ----------------------------------------------------------------------
DEBUG: Empty attachments:
DEBUG: stderr
DEBUG: stdout
DEBUG: Traceback (most recent call last):
DEBUG: File "tempest/tests/test_config.py", line 32, in setUp
DEBUG: self.useFixture(fake_config.ServiceClientsConfigFixture())
DEBUG: File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 679, in useFixture
DEBUG: reraise(*exc_info)
DEBUG: File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 666, in useFixture
DEBUG: fixture.setUp()
DEBUG: File "tempest/tests/fake_config.py", line 97, in setUp
DEBUG: self.conf.set_default('v3_endpoint_type', 'fake_v3_uri', 'identity')
DEBUG: File "/usr/lib/python2.7/site-packages/debtcollector/removals.py", line 261, in wrapper
DEBUG: return f(*args, **kwargs)
DEBUG: File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2312, in __inner
DEBUG: result = f(self, *arg...

Read more...

Luigi Toscano (ltoscano) on 2017-04-12
Changed in tempest:
status: New → Confirmed

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

Changed in tempest:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/456445
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=8cc2cba2a0a278a2cabbea2ff1bd18d83692db45
Submitter: Jenkins
Branch: master

commit 8cc2cba2a0a278a2cabbea2ff1bd18d83692db45
Author: ChangBo Guo(gcb) <email address hidden>
Date: Thu Apr 13 12:34:04 2017 +0800

    Fix invalid values when setting config options' default value

    Config options v3_endpoint_type, v2_public_endpoint_type and
    v2_admin_endpoint_type only allow dedicated values[1],
    oslo.config 4.0 will check overridden value type by default[2],
    so need remove invalid overridden values.

    [1] https://github.com/openstack/tempest/blob/0d93900ba6d7daaebb1886918573431af3af50dc/tempest/config.py#L145-L164
    [2] https://review.openstack.org/#/c/328692/

    Closes-Bug: #1517839

    Change-Id: I86cc9e53b86a69357254b68ba564df716a2284a5

Changed in tempest:
status: In Progress → Fix Released

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

Changed in ironic:
assignee: Ji.Wei (jiwei) → Javier Peña (jpena-c)
status: Triaged → In Progress

Reviewed: https://review.openstack.org/457188
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=213f7120c483a37317091b7478dfb99495619ce4
Submitter: Jenkins
Branch: master

commit 213f7120c483a37317091b7478dfb99495619ce4
Author: ChangBo Guo(gcb) <email address hidden>
Date: Mon Apr 17 16:51:02 2017 +0800

    Remove usage of parameter enforce_type

    Oslo.config deprecated parameter enforce_type and change its
    default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0.
    Nova peridic py35 job failure due to the DeprecationWarning: "Using the
    'enforce_type' argument is deprecated in version '4.0' and will be
    removed in version '5.0': The argument enforce_type has changed its
    default value to True and then will be removed completely."[1]
    So need clean up usage of enforce_type.

    Note this patch also change enforce_type from False to default value
    True in test__get_node_console_with_reset_wait_timeout. We should test
    as runtime, we can use float type to test when config option
    serial_console_state_timeout is float.

    [1] http://logs.openstack.org/periodic/periodic-nova-py35-with-oslo-master/6eeea0f/testr_results.html.gz

    Related--Bug: #1517839

    Change-Id: I94915a5c6abbbb739c597025272dc0e25d3ba2ec

This issue was fixed in the openstack/tempest 16.0.0 release.

Reviewed: https://review.openstack.org/457356
Committed: https://git.openstack.org/cgit/openstack/octavia/commit/?id=520c9e8b00b55e79cdea753b6cf42943a15d2d4f
Submitter: Jenkins
Branch: master

commit 520c9e8b00b55e79cdea753b6cf42943a15d2d4f
Author: Michael Johnson <email address hidden>
Date: Mon Apr 17 13:41:41 2017 -0700

    Fix some configuration type issues.

    This patch corrects some testing issues with improper configuration types.

    These changes prepare octavia for oslo.config version 4.0.0 which sets
    enforce_type=True by default.

    Change-Id: I0a3bca495a40cd921b59e4f8b4c4ae8c228d4816
    Related-Bug: #1517839

Reviewed: https://review.openstack.org/457604
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=f64154482f4a146a61e460f26cde7266a9051051
Submitter: Jenkins
Branch: master

commit f64154482f4a146a61e460f26cde7266a9051051
Author: Javier Pena <email address hidden>
Date: Tue Apr 18 14:10:22 2017 +0200

    Fix unit tests for oslo.config 4.0

    oslo.config 4.0 will check overridden value type by default[1],
    which exposes a couple issues in Ironic:

    - default_storage_interface is defined as ListOpt, when it should be
      StrOpt.

    - test_get_client_with_endpoint_override sets an invalid url for config
      option url, which fails when checked by oslo.config.

    [1] https://review.openstack.org/#/c/328692

    Change-Id: Id166da73a41c8c46d9f3e239579d0cafb93bf69f
    Closes-Bug: #1517839

Changed in ironic:
status: In Progress → Fix Released

This issue was fixed in the openstack/oslo.config 4.0.0 release.

Reviewed: https://review.openstack.org/457050
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d1020785dc54a997dff6efa3a740b5b4b20a9294
Submitter: Jenkins
Branch: master

commit d1020785dc54a997dff6efa3a740b5b4b20a9294
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sun Apr 16 14:09:02 2017 +0800

    Fix tests when CONF.set_override with enforce_type=True

    Oslo.config make CONF.set_override with enforce_type=True by default
    in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0 and
    I5b62427495179edb7672c6e5c508037f8b9d0b84, these changes break Glance's
    tests[1], this commit fixes failures:

    * Method config will raise ValueError in oslo.config 4.0 , so add it
      in expected exception list,

    * Oslo.config ensures option 'location_strategy' only allow two values,
      so remove invalid test.

    [1] http://logs.openstack.org/periodic/periodic-glance-py35-with-oslo-master/290de5d/testr_results.html.gz

    Related-Bug: #1517839

    Change-Id: I366042c7a739e74c270ae8cc7eca047a23ea2dd9

Reviewed: https://review.openstack.org/455391
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=716c70c315c3344ee718e63e38bced2f12560cf7
Submitter: Jenkins
Branch: master

commit 716c70c315c3344ee718e63e38bced2f12560cf7
Author: Lance Bragstad <email address hidden>
Date: Mon Apr 10 17:04:13 2017 +0000

    Remove usage of enforce_type

    The usage of `enforce_type` from oslo.config will be removed in the
    4.0 release of oslo.config. The default behavior has been
    incorporated into set_override/set_default as of:

      Ifa552de0a994e40388cbc9f7dbaa55700ca276b0

    We no longer need to specify `enforce_type=True` and we should
    remove it since it will be removed from oslo.config.

    This commit also fixes violations with enforce_type=True.

    Change-Id: I8222e84583aaa4de4c7c36ec8cec5e35c2e7e253
    Related-Bug: 1517839

Related fix proposed to branch: master
Review: https://review.openstack.org/461089

Reviewed: https://review.openstack.org/461083
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=e1155a0a46ff188688fe057ce73a343b08b6c03b
Submitter: Jenkins
Branch: master

commit e1155a0a46ff188688fe057ce73a343b08b6c03b
Author: ChangBo Guo(gcb) <email address hidden>
Date: Fri Apr 28 23:36:03 2017 +0800

    Remove test_unsupported_default_store

    Config option 'default_store' in group 'glance_store' only allows value
    in [file, filesystem, http, https, swift, swift+http, swift+https,
    swift+config, rbd, sheepdog, cinder, vsphere] due to the parameter
    choices, oslo.config will ensure that, other value will lead ValueError.
    So don't need test this case.

    Related-Bug: #1517839
    Change-Id: I3459a8e9f07ed9464073133931fadc77f8186602

Reviewed: https://review.openstack.org/460873
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=5da589a8f68a0edee5a41b377b59d5f8c987ed0f
Submitter: Jenkins
Branch: master

commit 5da589a8f68a0edee5a41b377b59d5f8c987ed0f
Author: ChangBo Guo(gcb) <email address hidden>
Date: Fri Apr 28 16:22:10 2017 +0800

    Remove test_metadata_invalid_contact_type

    oslo.config will ensure option [saml]/idp_contact_type with parameter
    choices only allow values in ('technical', 'support', 'administrative',
    'billing', 'other') in runtime, so don't need test in KeyStone.
    This commit also remove check code for the option.

    Partial-Bug: #1686921
    Related-Bug: #1517839

    Change-Id: I0c78a25a353d04dbe46e9679771c51b22b677a27

Reviewed: https://review.openstack.org/461089
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=815293738ae1931cf98db30be4f6748c5ef45b85
Submitter: Jenkins
Branch: master

commit 815293738ae1931cf98db30be4f6748c5ef45b85
Author: ChangBo Guo(gcb) <email address hidden>
Date: Fri Apr 28 23:49:43 2017 +0800

    Fix wrong overridden value of config option client_socket_timeout

    Config option only allows the value zero which implies wait forever,
    or positive integer, so we need pass positive integer. CONF.set_default
    will check the value by converting it to integer, 0.1 will be converted
    to 0. that leads test failure, use 1 instead.

    Related-Bug: #1517839
    Change-Id: I86eeff90e464faa80277823a87ab352761dd8544

Reviewed: https://review.openstack.org/462878
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=f86d53da9fa230c7dbcdff901bd309aa966fc060
Submitter: Jenkins
Branch: master

commit f86d53da9fa230c7dbcdff901bd309aa966fc060
Author: ChangBo Guo(gcb) <email address hidden>
Date: Fri May 5 17:02:30 2017 +0800

    Remove usage of parameter enforce_type

    Oslo.config deprecated parameter enforce_type and change its
    default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0.
    Remove the usage of it to avoid DeprecationWarning: "Using the
    'enforce_type' argument is deprecated in version '4.0' and will be
    removed in version '5.0': The argument enforce_type has changed its
    default value to True and then will be removed completely."

    Related--Bug: #1517839
    Change-Id: Ie3267df7e086e01eae6679cf01b3d9aa9b7a26cd

Reviewed: https://review.openstack.org/463291
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=381a84a4e8e3a57ac26c3796cb51ba502be351bf
Submitter: Jenkins
Branch: master

commit 381a84a4e8e3a57ac26c3796cb51ba502be351bf
Author: ChangBo Guo(gcb) <email address hidden>
Date: Mon May 8 17:55:32 2017 +0800

    Remove usage of parameter enforce_type

    Oslo.config deprecated parameter enforce_type and change its default
    value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0. Remove
    the usage of it to avoid DeprecationWarning: "Using the 'enforce_type'
    argument is deprecated in version '4.0' and will be removed in version
    '5.0': The argument enforce_type has changed its default value to True
    and then will be removed completely."

    Change-Id: I91b0f0a52b5ce8654702510eed76d5dea8cc8fe4
    Related--Bug: #1517839

Reviewed: https://review.openstack.org/466756
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=3815f8ddfeb0357d14f0e9e52b2cf6ea9774bdf6
Submitter: Jenkins
Branch: master

commit 3815f8ddfeb0357d14f0e9e52b2cf6ea9774bdf6
Author: ChangBo Guo(gcb) <email address hidden>
Date: Mon May 22 22:43:45 2017 +0800

    Remove usage of parameter enforce_type

    Oslo.config deprecated parameter enforce_type and change its
    default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0.
    Remove the usage of it to avoid DeprecationWarning: "Using the
    'enforce_type' argument is deprecated in version '4.0' and will be
    removed in version '5.0': The argument enforce_type has changed its
    default value to True and then will be removed completely."

    Related--Bug: #1517839

    Change-Id: Id45669d982d1a045cddd47123943531453c2124d

description: updated

Reviewed: https://review.openstack.org/469354
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=12b9c1dd77895c0661cbe52431c849f3500e94c3
Submitter: Jenkins
Branch: master

commit 12b9c1dd77895c0661cbe52431c849f3500e94c3
Author: ChangBo Guo(gcb) <email address hidden>
Date: Wed May 31 15:15:19 2017 +0800

    Remove usage of parameter enforce_type

    Oslo.config deprecated parameter enforce_type and change its default
    value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0. Remove the
    usage of it to avoid DeprecationWarning: "Using the 'enforce_type'
    argument is deprecated in version '4.0' and will be removed in version
    '5.0': The argument enforce_type has changed its default value to True
    and then will be removed completely."

    Related--Bug: #1517839

    Change-Id: I643e23f358e6a71f5361daa9cc2ef5ebdd44c792

Reviewed: https://review.openstack.org/462376
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=e78ab76fa16910be7ba7907d5fa7cf590c59324f
Submitter: Jenkins
Branch: master

commit e78ab76fa16910be7ba7907d5fa7cf590c59324f
Author: ChangBo Guo(gcb) <email address hidden>
Date: Thu May 4 13:17:46 2017 +0800

    Remove usage of parameter enforce_type

    Oslo.config deprecated parameter enforce_type and change its
    default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0.
    Remove the usage of it to avoid DeprecationWarning: "Using the
    'enforce_type' argument is deprecated in version '4.0' and will be
    removed in version '5.0': The argument enforce_type has changed its
    default value to True and then will be removed completely."

    Change-Id: If045d76574823f29c58b39a104354abc1407cb8d
    Related--Bug: #1517839

Reviewed: https://review.openstack.org/474062
Committed: https://git.openstack.org/cgit/openstack/neutron-lbaas/commit/?id=4c972289008509ed08aac64a62c923d3eca2299e
Submitter: Jenkins
Branch: master

commit 4c972289008509ed08aac64a62c923d3eca2299e
Author: ChangBo Guo(gcb) <email address hidden>
Date: Wed Jun 14 13:23:32 2017 +0800

    Remove usage of parameter enforce_type

    Oslo.config deprecated parameter enforce_type and change its
    default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0.
    Remove the usage of it to avoid DeprecationWarning: "Using the
    'enforce_type' argument is deprecated in version '4.0' and will be
    removed in version '5.0': The argument enforce_type has changed its
    default value to True and then will be removed completely."

    Related--Bug: #1517839

    Change-Id: If045d76574823f29c58b39a104354abc1407cb8d

Displaying first 40 and last 40 comments. View all 119 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers