Introduce DEVSTACK_GATE_UNSTACK env variable

When this variable is set to "1" environment created by devstack will be
removed by calling ./unstack.sh.  This is beneficial for installing
dependencies while not being interested in running openstack services.

Change-Id: I47cd842edc44858e6f487a425de0ab7a68ba4cf8
Related-Bug: #1360658
This commit is contained in:
Jakub Libosvar
2014-08-27 17:45:23 +02:00
committed by Maru Newby
parent a7009df479
commit c768b6ae90
2 changed files with 9 additions and 0 deletions

View File

@@ -301,6 +301,11 @@ export DEVSTACK_GATE_CLEAN_LOGS=${DEVSTACK_GATE_CLEAN_LOGS:-1}
# to run before being aborted (default 60).
export DEVSTACK_GATE_TIMEOUT=${DEVSTACK_GATE_TIMEOUT:-60}
# Set to 1 to unstack immediately after devstack installation. This
# is intended to be a stop-gap until devstack can support
# dependency-only installation.
export DEVSTACK_GATE_UNSTACK=${DEVSTACK_GATE_UNSTACK:-0}
# Set this to override the branch selected for testing (in
# single-branch checkouts; not used for grenade)
export OVERRIDE_ZUUL_BRANCH=${OVERRIDE_ZUUL_BRANCH:-$ZUUL_BRANCH}

View File

@@ -344,6 +344,10 @@ else
fi
fi
if [[ "$DEVSTACK_GATE_UNSTACK" -eq "1" ]]; then
sudo -H -u stack ./unstack.sh
fi
echo "Removing sudo privileges for devstack user"
sudo rm /etc/sudoers.d/50_stack_sh