GLOBAL_VENV: add more binaries
glance and rally binaries are also needed.
Also make sure the cinder-rtstool is only called when cinder is actually
enabled.
Change-Id: I18113eabf2fa83e36bace276883775303f6a1e9a
diff --git a/lib/lvm b/lib/lvm
index 57d2cd4..162c491 100644
--- a/lib/lvm
+++ b/lib/lvm
@@ -137,15 +137,17 @@
# Start with a clean volume group
_create_lvm_volume_group $vg $size
- # Remove iscsi targets
- if [ "$CINDER_TARGET_HELPER" = "lioadm" ]; then
- sudo cinder-rtstool get-targets | sudo xargs -rn 1 cinder-rtstool delete
- elif [ "$CINDER_TARGET_HELPER" = "tgtadm" ]; then
- sudo tgtadm --op show --mode target | awk '/Target/ {print $3}' | sudo xargs -r -n1 tgt-admin --delete
- elif [ "$CINDER_TARGET_HELPER" = "nvmet" ]; then
- # If we don't disconnect everything vgremove will block
- sudo nvme disconnect-all
- sudo nvmetcli clear
+ if is_service_enabled cinder; then
+ # Remove iscsi targets
+ if [ "$CINDER_TARGET_HELPER" = "lioadm" ]; then
+ sudo cinder-rtstool get-targets | sudo xargs -rn 1 cinder-rtstool delete
+ elif [ "$CINDER_TARGET_HELPER" = "tgtadm" ]; then
+ sudo tgtadm --op show --mode target | awk '/Target/ {print $3}' | sudo xargs -r -n1 tgt-admin --delete
+ elif [ "$CINDER_TARGET_HELPER" = "nvmet" ]; then
+ # If we don't disconnect everything vgremove will block
+ sudo nvme disconnect-all
+ sudo nvmetcli clear
+ fi
fi
_clean_lvm_volume_group $vg
}
diff --git a/stack.sh b/stack.sh
index 94d586e..d8b70a2 100755
--- a/stack.sh
+++ b/stack.sh
@@ -828,10 +828,12 @@
if [[ "$GLOBAL_VENV" == "True" ]] ; then
# TODO(frickler): find a better solution for this
sudo ln -sf /opt/stack/data/venv/bin/cinder-rtstool /usr/local/bin
+ sudo ln -sf /opt/stack/data/venv/bin/glance /usr/local/bin
sudo ln -sf /opt/stack/data/venv/bin/nova /usr/local/bin
sudo ln -sf /opt/stack/data/venv/bin/nova-manage /usr/local/bin
sudo ln -sf /opt/stack/data/venv/bin/openstack /usr/local/bin
sudo ln -sf /opt/stack/data/venv/bin/privsep-helper /usr/local/bin
+ sudo ln -sf /opt/stack/data/venv/bin/rally /usr/local/bin
sudo ln -sf /opt/stack/data/venv/bin/tox /usr/local/bin
setup_devstack_virtualenv