diff --git a/.zuul.yaml b/.zuul.yaml index e6de70f1ef..d1f63a24a9 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -345,14 +345,30 @@ - job: name: swift-probetests-centos-7 - parent: unittests + parent: swift-probetests-centos-8-stream nodeset: centos-7 description: | Setup a SAIO dev environment and run Swift's probe tests under Python 2. - timeout: 7200 vars: bindep_profile: test py27 + ensure_pip_from_packages: False + ensure_pip_from_packages_with_python2: False + ensure_pip_from_upstream: True + ensure_pip_from_upstream_interpreters: + - python2 + ensure_pip_from_upstream_url: "https://bootstrap.pypa.io/pip/2.7/get-pip.py" + +- job: + name: swift-probetests-centos-8-stream + parent: unittests + nodeset: centos-8-stream + description: | + Setup a SAIO dev environment and run Swift's probe tests + under Python 3. + timeout: 7200 + vars: + bindep_profile: test py36 pre-run: - tools/playbooks/common/install_dependencies.yaml - tools/playbooks/saio_single_node_setup/setup_saio.yaml @@ -360,16 +376,6 @@ run: tools/playbooks/probetests/run.yaml post-run: tools/playbooks/probetests/post.yaml -- job: - name: swift-probetests-centos-8-stream - parent: swift-probetests-centos-7 - nodeset: centos-8-stream - description: | - Setup a SAIO dev environment and run Swift's probe tests - under Python 3. - vars: - bindep_profile: test py36 - - job: name: swift-probetests-centos-8-stream-arm64 parent: swift-probetests-centos-8-stream diff --git a/py2-constraints.txt b/py2-constraints.txt index af78a2708a..40a5e5d860 100644 --- a/py2-constraints.txt +++ b/py2-constraints.txt @@ -78,3 +78,4 @@ dnspython===1.16.0 setuptools===44.1.1 pycadf===2.10.0 smmap===3.0.5 +PasteDeploy==2.1.1 diff --git a/tools/playbooks/common/install_dependencies.yaml b/tools/playbooks/common/install_dependencies.yaml index 714ddf50d9..6e2693a27f 100644 --- a/tools/playbooks/common/install_dependencies.yaml +++ b/tools/playbooks/common/install_dependencies.yaml @@ -43,3 +43,12 @@ # For some reason, pip on py2 isn't smart enough to prevent us # trying to install a too-new mock?? - 'mock<4' + + - name: install PasteDeploy - CentOS 7 + pip: name={{ item }} state=present extra_args='--upgrade' + with_items: + # py2_constraints isn't obeyed by pip install swift + - 'PasteDeploy==2.1.1' + when: + - ansible_facts['distribution'] == "CentOS" + - ansible_facts['distribution_major_version'] == "7" diff --git a/tools/playbooks/multinode_setup/common_config.yaml b/tools/playbooks/multinode_setup/common_config.yaml index 15a000260d..a81f449e3b 100644 --- a/tools/playbooks/multinode_setup/common_config.yaml +++ b/tools/playbooks/multinode_setup/common_config.yaml @@ -69,7 +69,7 @@ - hosts: test-runner tasks: - name: add new env. variable for running tests - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/home/{{ ansible_ssh_user}}/test.conf" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/home/{{ ansible_user}}/test.conf" - name: copy the sample configuration files for running tests - template: src=test.conf.j2 dest=/home/{{ ansible_ssh_user }}/test.conf + template: src=test.conf.j2 dest=/home/{{ ansible_user }}/test.conf diff --git a/tools/playbooks/multinode_setup/make_rings.yaml b/tools/playbooks/multinode_setup/make_rings.yaml index 6eda38dc5a..b2ef444ff1 100644 --- a/tools/playbooks/multinode_setup/make_rings.yaml +++ b/tools/playbooks/multinode_setup/make_rings.yaml @@ -126,20 +126,20 @@ when: previous_swift_version | default(latest_swift_release.stdout) is not match("^(rocky|stein|train|ussuri)-em.*|^2\.(1?[0-9]|2[0-5])\.|^(origin/)?stable/[a-u].*") - name: create remakerings from template - template: src=make_multinode_rings.j2 dest=/home/{{ ansible_ssh_user }}/make_multinode_rings mode=0755 + template: src=make_multinode_rings.j2 dest=/home/{{ ansible_user }}/make_multinode_rings mode=0755 - name: create rings dir file: > - path=/home/{{ ansible_ssh_user }}/rings + path=/home/{{ ansible_user }}/rings state=directory - name: make rings shell: - cmd: /home/{{ ansible_ssh_user }}/make_multinode_rings + cmd: /home/{{ ansible_user }}/make_multinode_rings executable: /bin/bash - name: scp rings to all swift-cluster nodes - command: scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=5 -o ConnectionAttempts=360 /home/{{ ansible_ssh_user }}/rings/{{ item[0] }} {{ ansible_ssh_user }}@{{ hostvars[item[1]].nodepool.public_ipv4 }}:/etc/swift + command: scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=5 -o ConnectionAttempts=360 /home/{{ ansible_user }}/rings/{{ item[0] }} {{ ansible_user }}@{{ hostvars[item[1]].nodepool.public_ipv4 }}:/etc/swift with_nested: - ['account.ring.gz', 'container.ring.gz', 'object.ring.gz', 'object-1.ring.gz', 'object-2.ring.gz'] - "{{ groups['swift-cluster'] }}" diff --git a/tools/playbooks/multinode_setup/run.yaml b/tools/playbooks/multinode_setup/run.yaml index 072b157cc4..5ea82fa31c 100644 --- a/tools/playbooks/multinode_setup/run.yaml +++ b/tools/playbooks/multinode_setup/run.yaml @@ -40,4 +40,4 @@ tox_envlist: func-py3 tox_environment: TOX_CONSTRAINTS_FILE: https://releases.openstack.org/constraints/upper/yoga - SWIFT_TEST_CONFIG_FILE: /home/{{ ansible_ssh_user }}/test.conf + SWIFT_TEST_CONFIG_FILE: /home/{{ ansible_user }}/test.conf diff --git a/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 b/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 index c1e05a83b4..fdb9b27352 100755 --- a/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 +++ b/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 @@ -2,7 +2,7 @@ set -e -cd /home/{{ ansible_ssh_user }}/rings +cd /home/{{ ansible_user }}/rings rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz diff --git a/tools/playbooks/saio_single_node_setup/setup_saio.yaml b/tools/playbooks/saio_single_node_setup/setup_saio.yaml index c78cefda70..5353be184f 100644 --- a/tools/playbooks/saio_single_node_setup/setup_saio.yaml +++ b/tools/playbooks/saio_single_node_setup/setup_saio.yaml @@ -161,22 +161,22 @@ create: no - name: copy the SAIO scripts for resetting the environment - command: cp -r {{ zuul.project.src_dir }}/doc/saio/bin /home/{{ ansible_ssh_user }}/bin creates=/home/{{ ansible_ssh_user }}/bin + command: cp -r {{ zuul.project.src_dir }}/doc/saio/bin /home/{{ ansible_user }}/bin creates=/home/{{ ansible_user }}/bin - name: set the correct file mode for SAIO scripts - file: dest=/home/{{ ansible_ssh_user }}/bin mode=0777 recurse=yes + file: dest=/home/{{ ansible_user }}/bin mode=0777 recurse=yes - name: add new env. variable for loopback device - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export SAIO_BLOCK_DEVICE=/srv/swift-disk" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export SAIO_BLOCK_DEVICE=/srv/swift-disk" - name: remove line from resetswift - lineinfile: dest=/home/{{ ansible_ssh_user }}/bin/resetswift line="sudo find /var/log/swift -type f -exec rm -f {} \;" state=absent + lineinfile: dest=/home/{{ ansible_user }}/bin/resetswift line="sudo find /var/log/swift -type f -exec rm -f {} \;" state=absent - name: add new env. variable for running tests - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf" - name: make sure PATH includes the bin directory - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export PATH=${PATH}:/home/{{ ansible_ssh_user }}/bin" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export PATH=${PATH}:/home/{{ ansible_user }}/bin" - name: increase open files limit to run probe tests - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="ulimit -n 4096" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="ulimit -n 4096"