From cbe7056832c95da83e9a2e8574b7de5f3dc5f34a Mon Sep 17 00:00:00 2001 From: Tom Barron Date: Tue, 16 Jul 2019 09:18:04 -0400 Subject: [PATCH] Run tempest jobs under python3 Add py2 dummy jobs to keep some python 2 coverage through the Train release, but convert all the other tempest jobs to python 3. Change-Id: Ia5fd26c30c6aaeb97ae1b524c5fd58b890fdb054 --- .zuul.yaml | 14 ++++ .../run.yaml | 4 +- .../run.yaml | 4 +- .../run.yaml | 4 +- .../run.yaml | 4 +- .../run.yaml | 4 +- .../manila-tempest-dsvm-scenario/run.yaml | 4 +- .../post.yaml | 15 ++++ .../run.yaml | 81 +++++++++++++++++++ .../run.yaml | 7 +- .../manila-tempest-minimal-dsvm-lvm/run.yaml | 3 + 11 files changed, 134 insertions(+), 10 deletions(-) create mode 100644 playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/post.yaml create mode 100644 playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index a1f8d7ad96..e10dc5e13d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -28,6 +28,8 @@ - manila-tempest-minimal-dsvm-cephfs-nfs: voting: false - manila-tempest-minimal-dsvm-dummy + # Through the Train release we need to keep some python2 coverage. + - manila-tempest-minimal-dsvm-dummy-py2 - manila-tempest-minimal-dsvm-lvm - manila-grenade: voting: false @@ -321,6 +323,18 @@ - openstack/python-manilaclient - openstack/tempest +- job: + name: manila-tempest-minimal-dsvm-dummy-py2 + parent: manila-tempest-base + run: playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/run.yaml + post-run: playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/post.yaml + required-projects: + - openstack/devstack-gate + - openstack/manila + - openstack/manila-tempest-plugin + - openstack/python-manilaclient + - openstack/tempest + - job: name: manila-tempest-minimal-dsvm-lvm parent: manila-tempest-base diff --git a/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml b/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml index 4204c8375c..6516c6b99c 100644 --- a/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-generic-no-share-servers/run.yaml @@ -30,7 +30,7 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin manila https://opendev.org/openstack/manila - + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin EOF executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -51,6 +51,8 @@ export KEEP_LOCALRC=1 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml b/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml index 47610fd3dc..f8853ff35a 100644 --- a/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-mysql-generic/run.yaml @@ -30,7 +30,7 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin manila https://opendev.org/openstack/manila - + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin EOF executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -51,6 +51,8 @@ export KEEP_LOCALRC=1 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml index e72c18ebf8..c0bea8b1a9 100644 --- a/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-postgres-container/run.yaml @@ -30,7 +30,7 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin manila https://opendev.org/openstack/manila - + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin EOF executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -51,6 +51,8 @@ export KEEP_LOCALRC=1 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml index 2da247f3c9..33699630fa 100644 --- a/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-postgres-generic-singlebackend/run.yaml @@ -30,7 +30,7 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin manila https://opendev.org/openstack/manila - + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin EOF executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -51,6 +51,8 @@ export KEEP_LOCALRC=1 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml b/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml index e2fa824bf2..2a9c0a7dcb 100644 --- a/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-postgres-zfsonlinux/run.yaml @@ -30,7 +30,7 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin manila https://opendev.org/openstack/manila - + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin EOF executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -51,6 +51,8 @@ export KEEP_LOCALRC=1 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml b/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml index 73c32e458c..a05b8edbd8 100644 --- a/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml +++ b/playbooks/legacy/manila-tempest-dsvm-scenario/run.yaml @@ -30,7 +30,7 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin manila https://opendev.org/openstack/manila - + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin EOF executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -51,6 +51,8 @@ export KEEP_LOCALRC=1 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/post.yaml b/playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/post.yaml new file mode 100644 index 0000000000..e07f5510ae --- /dev/null +++ b/playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/post.yaml @@ -0,0 +1,15 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/run.yaml b/playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/run.yaml new file mode 100644 index 0000000000..a6e0bd45be --- /dev/null +++ b/playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/run.yaml @@ -0,0 +1,81 @@ +- hosts: all + name: Autoconverted job manila-tempest-minimal-dsvm-dummy-py2 from old job gate-manila-tempest-minimal-dsvm-dummy-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + https://opendev.org \ + openstack/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + cat << 'EOF' >>"/tmp/dg-local.conf" + [[local|localrc]] + enable_plugin manila https://opendev.org/openstack/manila + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_NEUTRON=1 + export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient" + # Basic services needed for minimal job + export OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest,tls-proxy + + # Keep localrc to be able to set some vars in pre_test_hook + export KEEP_LOCALRC=1 + export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + + function pre_test_hook { + # 'dhss' - acronym for 'Driver Handles Share Servers', + # defines mode of a share driver. Boolean-like. + # 'driver' - codename of a share driver to configure. + # 'back_end_type' - defines which installation Manila should + # have - either 'singlebackend' or 'multibackend'. + source $BASE/new/manila/contrib/ci/pre_test_hook.sh False dummy multibackend + } + export -f pre_test_hook + + function post_test_hook { + # 'back_end_type' - defines which installation Manila is + # configured to - either 'singlebackend' or 'multibackend'. + # 'driver' - codename of a share driver that is configured in + # Manila. It is used for enabling/disabling tests that are not + # supported by share driver that is used. + # 'test_type' - defines which set of test suites should be used, + # can have 'api' and 'scenario' values. + # 'postgres_enabled' - set of test suites depends on DB backend + # in some cases, so it is provided explicitely. Boolean-like. + source $BASE/new/manila/contrib/ci/post_test_hook.sh multibackend dummy api False + } + export -f post_test_hook + + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff --git a/playbooks/legacy/manila-tempest-minimal-dsvm-dummy/run.yaml b/playbooks/legacy/manila-tempest-minimal-dsvm-dummy/run.yaml index 8c2593022b..cabec9ca57 100644 --- a/playbooks/legacy/manila-tempest-minimal-dsvm-dummy/run.yaml +++ b/playbooks/legacy/manila-tempest-minimal-dsvm-dummy/run.yaml @@ -30,7 +30,7 @@ cat << 'EOF' >>"/tmp/dg-local.conf" [[local|localrc]] enable_plugin manila https://opendev.org/openstack/manila - + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin EOF executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -46,13 +46,12 @@ # Basic services needed for minimal job export OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest,tls-proxy - export DEVSTACK_GATE_USE_PYTHON3=True - export PYTHON3_VERSION="3.6" - # Keep localrc to be able to set some vars in pre_test_hook export KEEP_LOCALRC=1 export PROJECTS="openstack/manila-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like. diff --git a/playbooks/legacy/manila-tempest-minimal-dsvm-lvm/run.yaml b/playbooks/legacy/manila-tempest-minimal-dsvm-lvm/run.yaml index 56ec3506c1..834ff28313 100644 --- a/playbooks/legacy/manila-tempest-minimal-dsvm-lvm/run.yaml +++ b/playbooks/legacy/manila-tempest-minimal-dsvm-lvm/run.yaml @@ -31,6 +31,7 @@ [[local|localrc]] SKIP_EPEL_INSTALL=True enable_plugin manila https://opendev.org/openstack/manila + enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin enable_plugin neutron-dynamic-routing https://opendev.org/openstack/neutron-dynamic-routing enable_plugin neutron-tempest-plugin https://opendev.org/openstack/neutron-tempest-plugin EOF @@ -72,6 +73,8 @@ export PROJECTS="openstack/neutron-dynamic-routing $PROJECTS" export PROJECTS="openstack/neutron-tempest-plugin $PROJECTS" + export DEVSTACK_GATE_USE_PYTHON3=True + function pre_test_hook { # 'dhss' - acronym for 'Driver Handles Share Servers', # defines mode of a share driver. Boolean-like.