Specify a cloud for openstack complete
there is a bug in openstackclient that is causing a password prompt
Related-Bug: 1619274
here.
Change-Id: I3aee25845ece846ed2b35aa242dc684b55ac2381
diff --git a/stack.sh b/stack.sh
index 09466a6..1cc4eca 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1383,7 +1383,12 @@
# ===============
# Prepare bash completion for OSC
-openstack complete | sudo tee /etc/bash_completion.d/osc.bash_completion > /dev/null
+#
+# BUG: https://bugs.launchpad.net/python-openstackclient/+bug/1619274
+# the os-cloud param should not be required but if we don't provide it
+# then this command hangs indefinitely if something is wrong with
+# default environment credentials.
+openstack --os-cloud=devstack complete | sudo tee /etc/bash_completion.d/osc.bash_completion > /dev/null
# If cinder is configured, set global_filter for PV devices
if is_service_enabled cinder; then