Skip to content

Commit c26dfb0

Browse files
emontyjharbott
authored andcommitted
Run pip check at end of devstack
The new pip depsolver is coming this summer. Until it's ready, run pip check at the end of devstack to make sure we're not somehow installing conflicting package versions. We shouldn't be, because of constraints, but if we are, better to know and start figuring it out. Change-Id: Id98f0848ff5a252d93e5f8029df2d069924d603f
1 parent 3765992 commit c26dfb0

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

inc/python

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,30 @@ function disable_python3_package {
111111
$xtrace
112112
}
113113

114+
115+
function pip_check {
116+
time_start "pip_check"
117+
118+
if [[ -n ${PIP_VIRTUAL_ENV:=} && -d ${PIP_VIRTUAL_ENV} ]]; then
119+
local cmd_pip=$PIP_VIRTUAL_ENV/bin/pip
120+
else
121+
local cmd_pip
122+
if python3_enabled; then
123+
echo "Using python $PYTHON3_VERSION to check pip install because python3_enabled=True"
124+
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
125+
else
126+
echo "Using python $PYTHON2_VERSION to check pip install because python3_enabled=False"
127+
cmd_pip=$(get_pip_command $PYTHON2_VERSION)
128+
fi
129+
fi
130+
131+
$cmd_pip check
132+
result=$?
133+
134+
time_stop "pip_check"
135+
return $result
136+
}
137+
114138
# Wrapper for ``pip install`` to set cache and proxy environment variables
115139
# Uses globals ``OFFLINE``, ``PIP_VIRTUAL_ENV``,
116140
# ``PIP_UPGRADE``, ``*_proxy``,

stack.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,9 @@ fi
14211421
# Check the status of running services
14221422
service_check
14231423

1424+
# Run pip check to make sure we're forward compatible with the pip depsolver.
1425+
pip_check
1426+
14241427
# Configure nova cellsv2
14251428
# ----------------------
14261429

0 commit comments

Comments
 (0)