Bug 1716434 - NoOptionError: No option 'region' in section: 'identity'
Summary: NoOptionError: No option 'region' in section: 'identity'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-packstack
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z3
: 14.0 (Rocky)
Assignee: Alfredo Moralejo
QA Contact: Filip Hubík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-03 14:00 UTC by Filip Hubík
Modified: 2019-07-02 16:31 UTC (History)
2 users (show)

Fixed In Version: openstack-packstack-13.0.0-0.20190420094339.ce737f8.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-02 16:31:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 663091 0 'None' MERGED Add OS_REGION_NAME when keystone api is >= 2 in rc file 2020-07-07 11:08:18 UTC
OpenStack gerrit 663275 0 'None' MERGED Add OS_REGION_NAME when keystone api is >= 2 in rc file 2020-07-07 11:08:18 UTC
Red Hat Product Errata RHBA-2019:1666 0 None None None 2019-07-02 16:31:22 UTC

Description Filip Hubík 2019-06-03 14:00:45 UTC
Description of problem:
Discover config fails as part of InfraRed Tempest run, packstack deployment only:

root@aio $ /usr/bin/discover-tempest-config --debug -v --create --image http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img identity.uri $OS_AUTH_URL identity.admin_password $OS_PASSWORD scenario.img_dir ~/tempest-dir/etc --out ~/tempest-dir/etc/tempest.conf

...
DEBUG config_tempest.constants [-] Setting [heat_plugin] admin_password = redhat set /usr/lib/python2.7/site-packages/config_tempest/tempest_conf.py:107
DEBUG config_tempest.constants [-] Setting [heat_plugin] project_name = demo set /usr/lib/python2.7/site-packages/config_tempest/tempest_conf.py:107
CRITICAL tempest [-] Unhandled error: NoOptionError: No option 'region' in section: 'identity'
ERROR tempest Traceback (most recent call last):
ERROR tempest   File "/usr/bin/discover-tempest-config", line 10, in <module>
ERROR tempest     sys.exit(main())
ERROR tempest   File "/usr/lib/python2.7/site-packages/config_tempest/main.py", line 597, in main
ERROR tempest     verbose=args.verbose
ERROR tempest   File "/usr/lib/python2.7/site-packages/config_tempest/main.py", line 519, in config_tempest
ERROR tempest     services = Services(clients, conf, credentials)
ERROR tempest   File "/usr/lib/python2.7/site-packages/config_tempest/services/services.py", line 42, in __init__
ERROR tempest     self.discover()
ERROR tempest   File "/usr/lib/python2.7/site-packages/config_tempest/services/services.py", line 111, in discover
ERROR tempest     service.set_default_tempest_options(self._conf)
ERROR tempest   File "/usr/lib/python2.7/site-packages/config_tempest/services/orchestration.py", line 42, in set_default_tempest_options
ERROR tempest     conf.set(sec, 'region', conf.get('identity', 'region'))
ERROR tempest   File "/usr/lib64/python2.7/ConfigParser.py", line 618, in get
ERROR tempest     raise NoOptionError(option, section)
ERROR tempest

Version-Release number of selected component (if applicable):
OSP14, puddle 2019-05-31.1

Steps to Reproduce:
1. Deploy OSP14 using packstack and IR
2. Run Tempest deployment

Additional info:
It seems that the difference between last working job and the new failing one is:
python2-tempestconf-2.2.0-0.20190507153823.e0d5dd6.el7ost.noarch <- new
python-tempestconf-2.0.0-0.20180821043805.d7db90e.el7ost <- from latest passing job, previous puddle
# the discover command is the same for both builds

Comment 4 Martin Kopec 2019-06-03 21:41:28 UTC
A new feature which sets heat_plugin options (when heat service is enabled) has been introduced in the new version of python-tempestconf. The feature requires region to be set under [identity] section [1].

In a devstack environment the region is set after devstack/openrc file is sourced. In a RHOS environment the region is part of deployer-input.conf file. However it seems that in a packstack environment the region is not part of the rc file. Therefore in packstack, the region should be set prior python-tempestconf execution. It can be done by:
1. exporting OS_REGION_NAME=<region> variable
2. using overrides when running python-tempestconf

[1] https://opendev.org/openstack/python-tempestconf/src/commit/5dda24d4067aa9a99c287940971400c7704331a8/config_tempest/services/orchestration.py#L42

Comment 5 Alfredo Moralejo 2019-06-04 16:34:53 UTC
I've proposed fix in packstack in https://review.opendev.org/663091 

I'll cherry pick to stable branches.

Comment 12 Filip Hubík 2019-06-27 11:38:29 UTC
I can confirm we do not see this issue since we have openstack-packstack-13.0.0-0.20190420094339.ce737f8 present in OSP14 packstack deployments. Looking at the difference between 2 runs ([0], [1]) of puddles 2019-06-10.3 (13.0.0-0.20190420094338.ce737f8) and 2019-06-17.2 (13.0.0-0.20190420094339.ce737f) it seems like we can remove the temporary InfraRed workaround https://review.gerrithub.io/c/redhat-openstack/infrared/+/459115 and consider this fix verified.

[0] - https://rhos-qe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/ReleaseDelivery/view/OSP14/job/phase2-14-rhel-7.6-openstack-all-in-one-neutron-rabbitmq/134/
[1] - https://rhos-qe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/ReleaseDelivery/view/OSP14/job/phase2-14-rhel-7.6-openstack-all-in-one-neutron-rabbitmq/135/

Since run 135, OS_REGION_NAME is present in keystonerc_admin file as part of packstack deployment:

unset OS_SERVICE_TOKEN
    ...
>>  export OS_REGION_NAME=RegionOne
    export OS_AUTH_URL=http://172.16.1.31:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '
    
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
...

Comment 14 errata-xmlrpc 2019-07-02 16:31:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1666


Note You need to log in before you can comment on or make changes to this bug.