Clear any previous environment in stackrc

As was done in I6badc5864426a371323a59100155e1c284af84b8 for the
overcloud.  This is particularly a problem because right now we
only generate a v2 stackrc file, and if you switch from a v3
overcloudrc to the v2 stackrc you'll have v3 env vars left over in
the environment, which will likely break client usage.

Given that it's late in the cycle, I think this is the safest
change to make.  Adding v3 settings to stackrc can be a followup
in Pike.

Change-Id: I2ba3160656372fd73d51cfbe9de8f49dc983009d
Closes-Bug: 1661689
(cherry picked from commit 03d5cd9a17)
This commit is contained in:
Ben Nemec 2017-02-03 17:11:18 +00:00 committed by Alex Schultz
parent 7378aae130
commit a9b96d295e
1 changed files with 2 additions and 0 deletions

View File

@ -1,3 +1,5 @@
# Clear any old environment that may conflict.
for key in $( set | awk '{FS=\"=\"} /^OS_/ {print $1}' ); do unset $key ; done
NOVA_VERSION=1.1
export NOVA_VERSION
OS_PASSWORD=$(sudo hiera admin_password)