export LC_ALL=en_US.UTF-8
if [ -z "$NO_CLOBBER" ] || [ ! -e ./$VENV ]; then
- if ! virtualenv --version &>/dev/null; then
- pip install virtualenv
- fi
- virtualenv --python=$PYTHON $VENV
+ python3 -m venv $VENV
fi
+./$VENV/bin/pip install packaging
+
+# It is impossible to upgrade ansible from 2.9 to 2.10 via pip.
+# See https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.10.html#known-issues
+if [ -f "$VENV/bin/ansible" ]; then
+ ansible_version=$($VENV/bin/pip list --format json | python3 -c "import sys; import json; print(list(filter(lambda i: i['name'] == 'ansible', json.loads(sys.stdin.read())))[0]['version'])")
+ uninstall_ansible=$(./$VENV/bin/python3 -c "from packaging.version import parse; print(parse('$ansible_version') < parse('2.10.0'))")
+ if [ "$uninstall_ansible" = "True" ]; then
+ ./$VENV/bin/pip uninstall -y ansible
+ fi
+fi
+
# First, upgrade pip
./$VENV/bin/pip install --upgrade pip
export MACHINE_TYPE=${MACHINE_TYPE:-testnode}
if [ -z "$TEUTHOLOGY_WAIT" ]; then
teuthology-suite -v \
- --teuthology-branch $TEUTHOLOGY_BRANCH \
+ --teuthology-branch $TEUTH_BRANCH \
--ceph-repo https://github.com/ceph/ceph.git \
--suite-repo https://github.com/ceph/ceph.git \
- -c master \
+ -c main \
-m $MACHINE_TYPE \
--limit 1 \
-n 100 \
log.warning(
'The teuthology branch config is empty, skipping')
if not teuthology_branch:
- teuthology_branch = config.get('teuthology_branch', 'master')
+ teuthology_branch = config.get('teuthology_branch', 'main')
- teuthology_sha1 = util.git_ls_remote(
- 'teuthology',
- teuthology_branch
- )
+ if config.teuthology_path is None:
+ teuthology_sha1 = util.git_ls_remote(
+ 'teuthology',
+ teuthology_branch
+ )
+ else:
+ actual_branch = repo_utils.current_branch(config.teuthology_path)
+ if actual_branch != teuthology_branch:
+ raise BranchMismatchError(
+ teuthology_branch,
+ config.teuthology_path,
+ "config.teuthology_path is set",
+ )
+ teuthology_sha1 = util.git_ls_remote(
+ f"file://{config.teuthology_path}",
+ teuthology_branch
+ )
if not teuthology_sha1:
exc = BranchNotFoundError(teuthology_branch, build_git_url('teuthology'))
util.schedule_fail(message=str(exc), name=self.name)