From 9eca5443d48cde7a5f16e16cb16d89e3cd3ab66c Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Fri, 24 Jan 2020 16:54:13 +1000 Subject: [PATCH] Use apt-get to install python-minimal apt does not refresh the package mirrors for the jobs run within the Jenkins, and fails to install python-minimal. With apt issue is reproducable: https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/builder-packer-merge-ubuntu-16.04-docker/74 With apt-get as a workaround resolves the packages with the mirrors sussessfully: https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/builder-packer-merge-ubuntu-16.04-docker/73 Issue: RELENG-2548 Change-Id: I3436fa250bff5b90e2b4c390a97c0b989b52d7af Signed-off-by: Anil Belur --- provision/install-python.sh | 10 ++++++++-- .../use-apt-get-python-install-047586b8c69644b6.yaml | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/use-apt-get-python-install-047586b8c69644b6.yaml diff --git a/provision/install-python.sh b/provision/install-python.sh index 5c06432..d3fbe22 100755 --- a/provision/install-python.sh +++ b/provision/install-python.sh @@ -29,9 +29,15 @@ function is_ubuntu() } if is_ubuntu; then + # TODO: Find out what is causing apt unable to refresh the package source + # which results in "E: Unable to locate package python-minimal" seen only + # on the Jenkins packer jobs and not local packer builds. + # This may have todo with apt overriding the package_mirrors variables + # (%availability_zone, %region) required in /etc/cloud/cloud.cfg. echo "Installing python-minimal..." - apt -y update - apt install -y python-minimal + apt-get clean all -y + apt-get -y update + apt-get install -y python-minimal fi type python diff --git a/releasenotes/notes/use-apt-get-python-install-047586b8c69644b6.yaml b/releasenotes/notes/use-apt-get-python-install-047586b8c69644b6.yaml new file mode 100644 index 0000000..909e02d --- /dev/null +++ b/releasenotes/notes/use-apt-get-python-install-047586b8c69644b6.yaml @@ -0,0 +1,15 @@ +--- +fixes: + - | + Use apt-get instead of apt to install python-minimal. + + Using apt does not refresh the package mirrors (for packer build run within + Jenkins) and fails with "E: Unable to locate package python-minimal" + to install python-minimal. + + With apt issue is reproducable: + https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/builder-packer-merge-ubuntu-16.04-docker/74 + + Use apt-get instead as a workaround to resolve the package from the mirrors + sussessfully: + https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/builder-packer-merge-ubuntu-16.04-docker/73 -- 2.16.6