From 2ebce8f49bcdc3d097939efba519a299ebedf3b7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 27 Oct 2025 20:14:10 +0100 Subject: [PATCH] Remove load_nodepool_pip_opts function During bootstrap process we tried to use infra mirrors and wheels for PyPi, however they are not being built anymore for modern distros. So we can simplify code and remove the function as a whole. Change-Id: I7b40a2e9500dc092e3ecb6847629037c614d5a1f Signed-off-by: Dmitriy Rabotyagov --- scripts/bootstrap-ansible.sh | 3 --- scripts/gate-check-commit.sh | 6 +----- scripts/scripts-library.sh | 10 ---------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index 7cf0f2a247..e25bbd1c1a 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -117,9 +117,6 @@ case ${DISTRO_ID} in ;; esac -# Load nodepool PIP mirror settings -load_nodepool_pip_opts - # Ensure we use the HTTPS/HTTP proxy with pip if it is specified if [ -n "$HTTPS_PROXY" ]; then PIP_OPTS+=" --proxy $HTTPS_PROXY" diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 3186c7ea91..3c5060aed9 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -93,8 +93,6 @@ log_instance_info run_dstat || true -load_nodepool_pip_opts - # Bootstrap Ansible if [[ -z "${SKIP_OSA_BOOTSTRAP_AIO+defined}" ]]; then source "${OSA_CLONE_DIR}/scripts/bootstrap-ansible.sh" @@ -129,7 +127,7 @@ elif [[ "${ACTION}" == "shastest" ]]; then elif [[ "${ACTION}" == "linters" ]]; then pushd "${OSA_CLONE_DIR}" # Install linter tools - ${PIP_COMMAND} install --isolated ${PIP_OPTS} -r ${OSA_CLONE_DIR}/test-requirements.txt + ${PIP_COMMAND} install --isolated -r ${OSA_CLONE_DIR}/test-requirements.txt # Disable Ansible color output export ANSIBLE_NOCOLOR=1 # Create ansible logging directory @@ -249,8 +247,6 @@ if [[ "${ACTION}" =~ "upgrade" ]]; then unset PIP_OPTS unset UPGRADE_TARGET_BRANCH - load_nodepool_pip_opts - # Source the current scripts-library.sh functions source "${OSA_CLONE_DIR}/scripts/scripts-library.sh" # We need this as in stein we were deploying custom diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index 3dbc58be05..50beb8fd40 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -88,16 +88,6 @@ function build_ansible_runtime_venv { fi } -# If in OpenStack-Infra, set some vars to use the mirror when bootstrapping Ansible -function load_nodepool_pip_opts { - if [[ -e /etc/ci/mirror_info.sh ]]; then - source /etc/ci/mirror_info.sh - export PIP_OPTS="--index-url ${NODEPOOL_PYPI_MIRROR} --trusted-host ${NODEPOOL_MIRROR_HOST} --extra-index-url ${NODEPOOL_WHEEL_MIRROR}" - else - export PIP_OPTS=${PIP_OPTS:-""} - fi -} - # Determine the distribution we are running on, so that we can configure it # appropriately. function determine_distro {