Bug 1465616 - stackrc does not undefine OS_ env vars
Summary: stackrc does not undefine OS_ env vars
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
Target Milestone: z4
: 10.0 (Newton)
Assignee: Ben Nemec
QA Contact: Gurenko Alex
Depends On:
Blocks: 1356451
TreeView+ depends on / blocked
Reported: 2017-06-27 18:56 UTC by Chris Dearborn
Modified: 2017-09-06 17:03 UTC (History)
19 users (show)

Fixed In Version: instack-undercloud-5.3.0-2.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-09-06 17:03:43 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
OpenStack gerrit 479033 None None None 2017-06-29 18:41:19 UTC
OpenStack gerrit 479034 None None None 2017-06-29 18:41:38 UTC
Red Hat Product Errata RHSA-2017:2649 normal SHIPPED_LIVE Moderate: instack-undercloud security, bug fix, and enhancement update 2017-09-06 20:53:50 UTC

Description Chris Dearborn 2017-06-27 18:56:08 UTC
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):

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:
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 18:41:20 UTC
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 10:22:15 UTC
Verified on build: 2017-08-22.2

rpm -q instack-undercloud

Comment 6 errata-xmlrpc 2017-09-06 17:03:43 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.


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