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) <eric....@easystack.cn>
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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1517839

Title:
  Make CONF.set_override with parameter enforce_type=True by default

Status in Cinder:
  In Progress
Status in cloudkitty:
  Fix Released
Status in Designate:
  Fix Released
Status in Freezer:
  In Progress
Status in Glance:
  Invalid
Status in heat:
  Fix Released
Status in Ironic:
  Triaged
Status in Karbor:
  Fix Released
Status in OpenStack Identity (keystone):
  Fix Released
Status in kolla:
  Confirmed
Status in Magnum:
  In Progress
Status in Manila:
  Fix Released
Status in Murano:
  Fix Released
Status in neutron:
  Won't Fix
Status in OpenStack Compute (nova):
  Fix Released
Status in octavia:
  New
Status in oslo.config:
  Fix Released
Status in oslo.messaging:
  Fix Released
Status in Quark: Money Reinvented:
  New
Status in Rally:
  Fix Released
Status in senlin:
  Fix Released
Status in tacker:
  In Progress
Status in tempest:
  Fix Released
Status in watcher:
  Fix Released

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1517839/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to