Skip to content

Commit 90dd262

Browse files
sdagueianw
authored andcommitted
fail if devstack attempts to be run under virtualenv
This has come up on the mailing list recently, we should just fail early and explicitly so that people don't get way down this path and not realize it's never going to work. Change-Id: I8a7f001adf3a5244b8655858ebd5fc7014a4af55
1 parent ef0d320 commit 90dd262

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)