Fix amphora image build
Upstream get-pip.sh recently introduced a regression where it does not work well with Python <=3.5. DIB, upper-constrained at version 2.35.0 in requirements/upper-constraints.txt, wants to install pip with Python 2, and that fails with with error message: "ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6." See attached story for more logging. To work-around this issue on stable/ussuri, we have to make a compromise: build amphora images using a >= 3.x DIB version. We could either pick a 3.x DIB released version or Git master branch. For consistency with what was done in stable/stein and stable/train not so long ago, we propose Git master branch. Task: 41991 Story: 2008688 Change-Id: I4531ff80ac82a61e527c024101e0785d49aa135b
This commit is contained in:
parent
8161166875
commit
9d4704d39f
|
@ -108,7 +108,20 @@ function build_octavia_worker_image {
|
|||
fi
|
||||
sudo mkdir -m755 ${dib_logs}
|
||||
sudo chown $STACK_USER ${dib_logs}
|
||||
$OCTAVIA_DIR/diskimage-create/diskimage-create.sh -l ${dib_logs}/$(basename $OCTAVIA_AMP_IMAGE_FILE).log $octavia_dib_tracing_arg -o $OCTAVIA_AMP_IMAGE_FILE ${PARAM_OCTAVIA_AMP_BASE_OS:-} ${PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID:-} ${PARAM_OCTAVIA_AMP_IMAGE_SIZE:-}
|
||||
# Build amphora image with master DIB in a Python 3 virtual environment
|
||||
(
|
||||
DIB_VENV_DIR=$(mktemp -d)
|
||||
DIB_GIT_DIR=/tmp/dib-octavia
|
||||
python3 -m venv $DIB_VENV_DIR
|
||||
export USE_PYTHON3=True
|
||||
export PATH=$DIB_VENV_DIR/bin:$PATH
|
||||
if ! [ -d $DIB_GIT_DIR ]; then
|
||||
git clone ${GITREPO["diskimage-builder"]} $DIB_GIT_DIR
|
||||
fi
|
||||
(cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) | sed '/diskimage-builder/d' > $DIB_VENV_DIR/u-c.txt
|
||||
pip install -c $DIB_VENV_DIR/u-c.txt $DIB_GIT_DIR
|
||||
$OCTAVIA_DIR/diskimage-create/diskimage-create.sh -l ${dib_logs}/$(basename $OCTAVIA_AMP_IMAGE_FILE).log $octavia_dib_tracing_arg -o $OCTAVIA_AMP_IMAGE_FILE ${PARAM_OCTAVIA_AMP_BASE_OS:-} ${PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID:-} ${PARAM_OCTAVIA_AMP_IMAGE_SIZE:-}
|
||||
)
|
||||
fi
|
||||
upload_image file://${OCTAVIA_AMP_IMAGE_FILE} $TOKEN
|
||||
|
||||
|
|
Loading…
Reference in New Issue