Skip to content

Commit 4622fd6

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "fail if devstack attempts to be run under virtualenv"
2 parents db6cb07 + 90dd262 commit 4622fd6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

stack.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ if [[ $EUID -eq 0 ]]; then
9393
exit 1
9494
fi
9595

96+
# OpenStack is designed to run at a system level, with system level
97+
# installation of python packages. It does not support running under a
98+
# virtual env, and will fail in really odd ways if you do this. Make
99+
# this explicit as it has come up on the mailing list.
100+
if [[ -n "$VIRTUAL_ENV" ]]; then
101+
echo "You appear to be running under a python virtualenv."
102+
echo "DevStack does not support this, as we my break the"
103+
echo "virtualenv you are currently in by modifying "
104+
echo "external system-level components the virtualenv relies on."
105+
echo "We reccommend you use a separate virtual-machine if "
106+
echo "you are worried about DevStack taking over your system."
107+
exit 1
108+
fi
109+
96110
# Provide a safety switch for devstack. If you do a lot of devstack,
97111
# on a lot of different environments, you sometimes run it on the
98112
# wrong box. This makes there be a way to prevent that.

0 commit comments

Comments
 (0)