Bug 1465616 - stackrc does not undefine OS_ env vars
stackrc does not undefine OS_ env vars
Status: ON_QA
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
Amit Ugol
: Triaged, ZStream
Depends On:
Blocks: 1356451
  Show dependency treegraph
 
Reported: 2017-06-27 14:56 EDT by Chris Dearborn
Modified: 2017-08-14 16:38 EDT (History)
18 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:
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).

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