virtual environment not created before sourcing it when OFFLINE is False and TRACK_DEPENDS is True
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devstack |
Won't Fix
|
Low
|
Unassigned |
Bug Description
When installing Devstack configuring the environment variables OFFLINE and TRACK_DEPENDS to the following values:
OFFLINE=False
TRACK_DEPENDS=True
the following error is obtained:
2017-03-29 10:06:14.247 | + tools/install_
2017-03-29 10:06:15.685 | Requirement already up-to-date: pip!=8 in /usr/local/
2017-03-29 10:06:16.192 | + tools/install_
2017-03-29 10:06:16.194 | + inc/python:
2017-03-29 10:06:16.196 | + inc/python:
2017-03-29 10:06:16.198 | + tools/install_
2017-03-29 10:06:16.200 | + tools/install_
2017-03-29 10:06:16.201 | + tools/install_
2017-03-29 10:06:16.203 | + inc/python:
2017-03-29 10:06:16.205 | + inc/python:
2017-03-29 10:06:16.207 | ++ inc/python:
2017-03-29 10:06:16.209 | ++ inc/python:
2017-03-29 10:06:16.211 | ++ inc/python:
2017-03-29 10:06:16.214 | +++ inc/python:
2017-03-29 10:06:16.214 | +++ inc/python:
2017-03-29 10:06:16.217 | ++ inc/python:
2017-03-29 10:06:16.219 | ++ inc/python:
2017-03-29 10:06:16.221 | ++ inc/python:
2017-03-29 10:06:16.223 | + inc/python:
2017-03-29 10:06:16.225 | + inc/python:
2017-03-29 10:06:16.240 | /home/bbscuser/
2017-03-29 10:06:16.248 | ++./stack.
2017-03-29 10:06:16.255 | ++./stack.
The reason for this error is in the stack.sh script, the Python virtual environment when TRACK_DEPENDS is set to True is created in line 743:
virtualenv --system-
However, the function pip_install in the inc/python script tries to source the virtual environment when TRACK_DEPENDS flag is set:
if [[ $TRACK_DEPENDS = True && ! "$@" =~ virtualenv ]]; then
# TRACK_DEPENDS=True installation creates a circular dependency when
# we attempt to install virtualenv into a virtualenv, so we must global
# that installation.
source $DEST/.
local cmd_pip=
local sudo_pip="env"
else
This function is called from stack.sh few lines before the virtual environment is created, causing that the /opt/stack/
A solution would be moving the whole block that creates the virtual environment in stack.sh script (lines 735 to 746) before calling the tools/install_
Changed in devstack: | |
status: | New → Triaged |
importance: | Undecided → Low |
This bug is similar to this one:
https:/ /bugs.launchpad .net/devstack/ +bug/1208867