Bug 1465616 - stackrc does not undefine OS_ env vars
stackrc does not undefine OS_ env vars
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
high Severity urgent
: z4
: 10.0 (Newton)
Assigned To: Ben Nemec
Gurenko Alex
: Triaged, ZStream
Depends On:
Blocks: 1356451
  Show dependency treegraph
 
Reported: 2017-06-27 14:56 EDT by Chris Dearborn
Modified: 2017-09-06 13:03 EDT (History)
19 users (show)

See Also:
Fixed In Version: instack-undercloud-5.3.0-2.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-06 13:03:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 479033 None None None 2017-06-29 14:41 EDT
OpenStack gerrit 479034 None None None 2017-06-29 14:41 EDT

  None (edit)
Description Chris Dearborn 2017-06-27 14:56:08 EDT
Description of problem:
If the user sources ~/overcloudrc.v3, does some CLI commands, then sources ~/stackrc, all CLI commands will fail with:
"Cannot use v2 authentication with domain scope"

Version-Release number of selected component (if applicable):
puddles/OpenStack/10.0-RHEL-7/2017-06-19.1/RH7-RHOS-10.0.repo

How reproducible:
Install director and deploy an overcloud.
source ~/overcloudrc.v3
source ~/stackrc
nova list
ERROR (DiscoveryFailure): Cannot use v2 authentication with domain scope

If at this point you do:
unset OS_USER_DOMAIN_NAME
unset OS_PROJECT_DOMAIN_NAME
nova list
It works.

Steps to Reproduce:
See above.

Actual results:
All CLI commands fail with "Cannot use v2 authentication with domain scope".

Expected results:
CLI commands should work after sourcing the v3 rc followed by sourcing the stackrc.

Additional info:
This can be fixed by adding the following line (taken from overcloudrc) to the beginning of stackrc:

for key in $( set | awk '{FS="="}  /^OS_/ {print $1}' ); do unset $key ; done
Comment 1 Ben Nemec 2017-06-29 14:41:20 EDT
This was fixed in OSP 11, so it just needs a backport.  I've proposed that upstream (there are actually two patches because the first one was broken).
Comment 4 Gurenko Alex 2017-08-27 06:22:15 EDT
Verified on build: 2017-08-22.2

rpm -q instack-undercloud
instack-undercloud-5.3.0-3.el7ost.noarch
Comment 6 errata-xmlrpc 2017-09-06 13:03:43 EDT
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/RHSA-2017:2649

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