From 6a825ce390e82aad76382e57815d044d9b0a326d Mon Sep 17 00:00:00 2001 From: Delfino Curado Date: Mon, 27 Dec 2021 19:57:11 -0500 Subject: [PATCH] Revert "Add priority to repositories in base-image" This reverts commit 965e897c71b378ee895d2ca6a00d0a892df6177e. The yum plugin called yum-priorities was added to make sure that the build system use the ussuri-ceph repo. This was done because StarlingX used to build ceph without its python3 packages. Now that ceph is generating its python3 packages this plugin is removed as well as the ussuri-ceph repo. This way StarlingX base image will use the packages built by it's own build system. Test plan: Complete build run Starlingx installation stx-openstack apply - check that the helm chart can create ceph pools Depends-On: https://review.opendev.org/c/starlingx/integ/+/824582 Story: 2009074 Task: 44281 Signed-off-by: Delfino Curado Change-Id: I4390c9bc9ec9dbc9ff077c4bcc1adb7d4fbfdbe5 --- .../base-image-build-centos-dev.cfg | 2 - .../base-image-build-centos-stable.cfg | 2 - .../build-docker-images/build-stx-base.sh | 50 +++++++------------ .../stx-centos/Dockerfile.dev | 2 - .../stx-centos/Dockerfile.stable | 2 - 5 files changed, 17 insertions(+), 41 deletions(-) diff --git a/build-tools/build-docker-images/base-image-build-centos-dev.cfg b/build-tools/build-docker-images/base-image-build-centos-dev.cfg index a08f1a2c..c54a376e 100644 --- a/build-tools/build-docker-images/base-image-build-centos-dev.cfg +++ b/build-tools/build-docker-images/base-image-build-centos-dev.cfg @@ -1,3 +1 @@ -repo=ussuri-ceph,http://mirror.starlingx.cengn.ca/mirror/centos/download.ceph.com/rpm-nautilus/el7/x86_64/ -repo-priority=ussuri-ceph,1 repo=ussuri-wsgi,http://mirror.starlingx.cengn.ca:80/mirror/centos/centos/mirror.centos.org/centos/7/sclo/x86_64/rh/ diff --git a/build-tools/build-docker-images/base-image-build-centos-stable.cfg b/build-tools/build-docker-images/base-image-build-centos-stable.cfg index a08f1a2c..c54a376e 100644 --- a/build-tools/build-docker-images/base-image-build-centos-stable.cfg +++ b/build-tools/build-docker-images/base-image-build-centos-stable.cfg @@ -1,3 +1 @@ -repo=ussuri-ceph,http://mirror.starlingx.cengn.ca/mirror/centos/download.ceph.com/rpm-nautilus/el7/x86_64/ -repo-priority=ussuri-ceph,1 repo=ussuri-wsgi,http://mirror.starlingx.cengn.ca:80/mirror/centos/centos/mirror.centos.org/centos/7/sclo/x86_64/rh/ diff --git a/build-tools/build-docker-images/build-stx-base.sh b/build-tools/build-docker-images/build-stx-base.sh index 82c252cd..a3cbe6bc 100755 --- a/build-tools/build-docker-images/build-stx-base.sh +++ b/build-tools/build-docker-images/build-stx-base.sh @@ -37,7 +37,6 @@ TAG_LATEST=no LATEST_TAG=latest HOST=${HOSTNAME} declare -i MAX_ATTEMPTS=1 -declare -A REPO_PRIORITY_LIST function usage { cat >&2 <: - --latest: Add a 'latest' tag when pushing - --latest-tag: Use the provided tag when pushing latest. - --user: Docker repo userid - --registry: Docker registry - --clean: Remove image(s) from local registry - --hostname: build repo host - --attempts: Max attempts, in case of failure (default: 1) - --config-file: Specify a path to a config file which will specify additional arguments to be passed into the command + --os: Specify base OS (valid options: ${SUPPORTED_OS_ARGS[@]}) + --os-version: Specify OS version + --version: Specify version for output image + --stream: Build stream, stable or dev (default: stable) + --repo: Software repository (Format: name,baseurl), can be specified multiple times + --local: Use local build for software repository (cannot be used with --repo) + --push: Push to docker repo + --proxy: Set proxy : + --latest: Add a 'latest' tag when pushing + --latest-tag: Use the provided tag when pushing latest. + --user: Docker repo userid + --registry: Docker registry + --clean: Remove image(s) from local registry + --hostname: build repo host + --attempts: Max attempts, in case of failure (default: 1) + --config-file:Specify a path to a config file which will specify additional arguments to be passed into the command EOF } @@ -100,15 +98,11 @@ function get_args_from_file { repo) REPO_LIST+=(${config_items[1]}) ;; - repo-priority) - priority_value=(${config_items[1]//,/ }) - REPO_PRIORITY_LIST[${priority_value[0]}]=${priority_value[1]} - ;; esac done } -OPTS=$(getopt -o h -l help,os:,os-version:,version:,stream:,release:,repo:,repo-priority:,push,proxy:,latest,latest-tag:,user:,registry:,local,clean,hostname:,attempts:,config-file: -- "$@") +OPTS=$(getopt -o h -l help,os:,os-version:,version:,stream:,release:,repo:,push,proxy:,latest,latest-tag:,user:,registry:,local,clean,hostname:,attempts:,config-file: -- "$@") if [ $? -ne 0 ]; then usage exit 1 @@ -192,11 +186,6 @@ while true; do CONFIG_FILE=$2 shift 2 ;; - --repo-priority) - priority_value=(${2//,/ }) - REPO_PRIORITY_LIST[${priority_value[0]}]=${priority_value[1]} - shift 2 - ;; -h | --help ) usage exit 1 @@ -278,10 +267,6 @@ STX_REPO_FILE=${BUILDDIR}/stx.repo for repo in ${REPO_LIST[@]}; do repo_name=$(echo $repo | awk -F, '{print $1}') repo_baseurl=$(echo $repo | awk -F, '{print $2}') - priority='' - if [[ ! -z "${REPO_PRIORITY_LIST[$repo_name]}" ]] ; then - priority="priority=${REPO_PRIORITY_LIST[$repo_name]}" - fi if [ -z "${repo_name}" -o -z "${repo_baseurl}" ]; then echo "Invalid repo specified: ${repo}" >&2 @@ -297,7 +282,6 @@ enabled=1 gpgcheck=0 skip_if_unavailable=1 metadata_expire=0 -${priority} EOF diff --git a/build-tools/build-docker-images/stx-centos/Dockerfile.dev b/build-tools/build-docker-images/stx-centos/Dockerfile.dev index 64c55f5f..af30a6b6 100644 --- a/build-tools/build-docker-images/stx-centos/Dockerfile.dev +++ b/build-tools/build-docker-images/stx-centos/Dockerfile.dev @@ -6,8 +6,6 @@ FROM centos:${RELEASE} RUN set -ex ;\ sed -i '/\[main\]/ atimeout=120' /etc/yum.conf ;\ - yum install --disablerepo=* ${REPO_OPTS} -y \ - yum-priorities ;\ yum install -y centos-release-openstack-stein ;\ rm -rf \ /var/log/* \ diff --git a/build-tools/build-docker-images/stx-centos/Dockerfile.stable b/build-tools/build-docker-images/stx-centos/Dockerfile.stable index 3716ee19..b30f615a 100644 --- a/build-tools/build-docker-images/stx-centos/Dockerfile.stable +++ b/build-tools/build-docker-images/stx-centos/Dockerfile.stable @@ -14,8 +14,6 @@ RUN set -ex ;\ sed -i '/\[main\]/ atimeout=120' /etc/yum.conf ;\ mv /stx.repo /etc/yum.repos.d/ ;\ yum upgrade --disablerepo=* ${REPO_OPTS} -y ;\ - yum install --disablerepo=* ${REPO_OPTS} -y \ - yum-priorities ;\ yum install --disablerepo=* ${REPO_OPTS} -y \ qemu-img \ openssh-clients \