diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index fa59ee7f73..ebae4e9c7d 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -62,7 +62,6 @@ case ${DISTRO_ID} in python-pyasn1 pyOpenSSL python-ndg_httpsclient \ python-netaddr python-prettytable python-crypto PyYAML \ python-virtualenv - VIRTUALENV_OPTIONS="" ;; ubuntu) apt-get update @@ -98,10 +97,15 @@ export UPPER_CONSTRAINTS_FILE=${UPPER_CONSTRAINTS_FILE:-"$UPPER_CONSTRAINTS_PROT # Figure out the right virtualenv command and options if [[ ${PYTHON_VERSION} =~ ^3 ]]; then VIRTUALENV_COMMAND="python3 -m venv" - VIRTUALENV_OPTIONS=${VIRTUALENV_OPTIONS:-"--copies"} + VIRTUALENV_OPTIONS="--copies" else VIRTUALENV_COMMAND="virtualenv --python=${PYTHON_EXEC_PATH}" - VIRTUALENV_OPTIONS=${VIRTUALENV_OPTIONS:-"--always-copy"} + VIRTUALENV_OPTIONS="--always-copy" +fi + +# Trying to use the copy option on CentOS fails miserably, so we override it. +if [[ "${DISTRO_ID}" == "centos" ]] || [[ "${DISTRO_ID}" == "rhel" ]]; then + VIRTUALENV_OPTIONS="" fi # Create a Virtualenv for the Ansible runtime diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index ab5a5c9ed3..fada19bb37 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -186,7 +186,6 @@ if [[ "${ACTION}" == "upgrade" ]]; then # requirements to be installed. unset ANSIBLE_PACKAGE unset UPPER_CONSTRAINTS_FILE - unset VIRTUALENV_OPTIONS # Kick off the data plane tester bash ${OSA_CLONE_DIR}/tests/data-plane-test.sh &> /var/log/data-plane-error.log &