From 6ef6f2b59be09baa5663126b49fbdce27c4798d6 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Thu, 14 Mar 2019 17:21:08 +0100 Subject: [PATCH] Migrate fullstack job definition to zuulv3 syntax Now, as neutron-functional job is moved to zuulv3 syntax, the same can be easily done with fullstack job. This patch also switches experimental neutron-fullstack-with-wsgi job. This patch removes also fullstack part from gate scripts and it removes hooks for dstat and stack_base as both are not used anywhere else. Related-Bug: #1804844 Change-Id: Iac7583f01651410a3df3e349b2c843b109a8bb18 --- .zuul.yaml | 37 +++---- neutron/tests/contrib/gate_hook.sh | 38 +------- neutron/tests/contrib/hooks/dstat | 1 - neutron/tests/contrib/hooks/stack_base | 8 -- neutron/tests/contrib/post_test_hook.sh | 5 +- .../neutron-fullstack-with-uwsgi/post.yaml | 80 ---------------- .../neutron-fullstack-with-uwsgi/run.yaml | 67 ------------- playbooks/legacy/neutron-fullstack/post.yaml | 96 ------------------- playbooks/legacy/neutron-fullstack/run.yaml | 55 ----------- 9 files changed, 14 insertions(+), 373 deletions(-) delete mode 100644 neutron/tests/contrib/hooks/dstat delete mode 100644 neutron/tests/contrib/hooks/stack_base delete mode 100644 playbooks/legacy/neutron-fullstack-with-uwsgi/post.yaml delete mode 100644 playbooks/legacy/neutron-fullstack-with-uwsgi/run.yaml delete mode 100644 playbooks/legacy/neutron-fullstack/post.yaml delete mode 100644 playbooks/legacy/neutron-fullstack/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 1bb1ac4606f..3c042d3a701 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -145,19 +145,14 @@ - job: name: neutron-fullstack - parent: legacy-dsvm-base - run: playbooks/legacy/neutron-fullstack/run.yaml - post-run: playbooks/legacy/neutron-fullstack/post.yaml - timeout: 7800 - required-projects: - - openstack-infra/devstack-gate - - openstack/neutron - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - - ^neutron/locale/.*$ - - ^releasenotes/.*$ - + parent: neutron-functional + vars: + tox_envlist: dsvm-fullstack + zuul_copy_output: + # We need to copy directory with logs to have it in job artifacts also, + # /opt/stack/logs is default logs directory defined in neutron's + # tox.ini file + '{{ devstack_base_dir }}/logs/dsvm-fullstack-logs': logs - job: name: neutron-rally-task @@ -415,18 +410,10 @@ - job: name: neutron-fullstack-with-uwsgi - parent: legacy-dsvm-base - run: playbooks/legacy/neutron-fullstack-with-uwsgi/run.yaml - post-run: playbooks/legacy/neutron-fullstack-with-uwsgi/post.yaml - timeout: 7800 - required-projects: - - openstack-infra/devstack-gate - - openstack/neutron - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - - ^neutron/locale/.*$ - - ^releasenotes/.*$ + parent: neutron-fullstack + vars: + devstack_localrc: + NEUTRON_DEPLOY_MOD_WSGI: true voting: false - job: diff --git a/neutron/tests/contrib/gate_hook.sh b/neutron/tests/contrib/gate_hook.sh index 58b1dc46e0a..552c62851a9 100644 --- a/neutron/tests/contrib/gate_hook.sh +++ b/neutron/tests/contrib/gate_hook.sh @@ -2,7 +2,7 @@ set -ex -VENV=${1:-"dsvm-fullstack"} +VENV=${1:-"api"} FLAVOR=${2:-"all"} GATE_DEST=$BASE/new @@ -55,42 +55,6 @@ function load_rc_for_rally { case $VENV in -"dsvm-fullstack") - # The following need to be set before sourcing - # configure_for_func_testing. - GATE_STACK_USER=stack - PROJECT_NAME=neutron - IS_GATE=True - LOCAL_CONF=$DEVSTACK_PATH/local.conf - - source $DEVSTACK_PATH/functions - source $NEUTRON_PATH/devstack/lib/ovs - - source $NEUTRON_PATH/tools/configure_for_func_testing.sh - - configure_host_for_func_testing - - # Because of bug present in current Ubuntu Xenial kernel version - # we need a fix for VXLAN local tunneling. - if [[ "$VENV" =~ "dsvm-fullstack" ]]; then - if is_ubuntu && [ ${DISTRO} == "xenial" ]; then - # The OVS_BRANCH variable is used by git checkout. In the case below, - # we use openvswitch release 2.9.3 that contains a fix for usage of - # VXLAN tunnels on a single node (ovs repository commit - # 741f47cf35df2bfc7811b2cff75c9bb8d05fd26f). This can be dropped once - # we switch to Ubuntu Bionic nodes, where kernel has the fix - OVS_BRANCH="v2.9.3" - compile_ovs_kernel_module - fi - fi - - # prepare base environment for ./stack.sh - load_rc_hook stack_base - - # enable monitoring - load_rc_hook dstat - ;; - "api"|"api-pecan"|"full-pecan"|"dsvm-scenario-ovs") # TODO(ihrachys) consider feeding result of ext-list into tempest.conf load_rc_hook api_all_extensions diff --git a/neutron/tests/contrib/hooks/dstat b/neutron/tests/contrib/hooks/dstat deleted file mode 100644 index b380601b831..00000000000 --- a/neutron/tests/contrib/hooks/dstat +++ /dev/null @@ -1 +0,0 @@ -enable_service dstat diff --git a/neutron/tests/contrib/hooks/stack_base b/neutron/tests/contrib/hooks/stack_base deleted file mode 100644 index a8e06e9b208..00000000000 --- a/neutron/tests/contrib/hooks/stack_base +++ /dev/null @@ -1,8 +0,0 @@ -# set password, otherwise devstack enters interactive mode and fails -ADMIN_PASSWORD=secretadmin -# don't use screen to start services (needed to disable colorization in -# captured service logs) -USE_SCREEN=False -# start with an empty service list, otherwise devstack will configure several -# 'default' services, including rabbitmq and mysql -disable_all_services diff --git a/neutron/tests/contrib/post_test_hook.sh b/neutron/tests/contrib/post_test_hook.sh index 58cbf8bd138..99059fedf29 100644 --- a/neutron/tests/contrib/post_test_hook.sh +++ b/neutron/tests/contrib/post_test_hook.sh @@ -27,9 +27,6 @@ function generate_log_index { # honor job flavors like -python35 case $venv in - *"dsvm-fullstack"*) - venv="dsvm-fullstack" - ;; *"dsvm-functional"*) venv="dsvm-functional" ;; @@ -52,7 +49,7 @@ function generate_log_index { $xtrace } -if [[ "$venv" == dsvm-functional* ]] || [[ "$venv" == dsvm-fullstack* ]]; then +if [[ "$venv" == dsvm-functional* ]]; then owner=stack sudo_env= diff --git a/playbooks/legacy/neutron-fullstack-with-uwsgi/post.yaml b/playbooks/legacy/neutron-fullstack-with-uwsgi/post.yaml deleted file mode 100644 index dac875340aa..00000000000 --- a/playbooks/legacy/neutron-fullstack-with-uwsgi/post.yaml +++ /dev/null @@ -1,80 +0,0 @@ -- 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=**/*nose_results.html - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - 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=**/*testr_results.html.gz - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - 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=/.testrepository/tmp* - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - 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=**/*testrepository.subunit.gz - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}/tox' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/.tox/*/log/* - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - 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/neutron-fullstack-with-uwsgi/run.yaml b/playbooks/legacy/neutron-fullstack-with-uwsgi/run.yaml deleted file mode 100644 index 2e0926c00d4..00000000000 --- a/playbooks/legacy/neutron-fullstack-with-uwsgi/run.yaml +++ /dev/null @@ -1,67 +0,0 @@ -- hosts: all - name: This is a Neutron Fullstack test suite running with uwsgi - 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-infra/devstack-gate - dest: devstack-gate - EOF - /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ - git://git.openstack.org \ - openstack-infra/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]] - NEUTRON_DEPLOY_MOD_WSGI=True - - 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_TEMPEST=0 - export DEVSTACK_GATE_EXERCISES=0 - export DEVSTACK_GATE_NEUTRON=1 - export DEVSTACK_GATE_INSTALL_TESTONLY=1 - export BRANCH_OVERRIDE=default - if [ "$BRANCH_OVERRIDE" != "default" ] ; then - export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE - fi - - function gate_hook { - bash -xe $BASE/new/neutron/neutron/tests/contrib/gate_hook.sh dsvm-fullstack - } - export -f gate_hook - - function post_test_hook { - bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-fullstack - } - 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/neutron-fullstack/post.yaml b/playbooks/legacy/neutron-fullstack/post.yaml deleted file mode 100644 index 3b3df752f8f..00000000000 --- a/playbooks/legacy/neutron-fullstack/post.yaml +++ /dev/null @@ -1,96 +0,0 @@ -- 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=**/*nose_results.html - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - 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=**/*testr_results.html.gz - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - 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=/.testrepository/tmp* - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - 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=**/*testrepository.subunit.gz - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}/tox' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/.tox/*/log/* - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - # TODO(slaweq): this should be moved to separate role and used in zuulv3 - # jobs definitions also - - name: Store journal logs in {{ ansible_user_dir }}/workspace/logs/journal.log - become: yes - shell: - cmd: | - /bin/journalctl -a > {{ ansible_user_dir }}/workspace/logs/journal.log - - - name: Set journal.log file permissions - become: yes - file: - path: '{{ ansible_user_dir }}/workspace/logs/journal.log' - owner: '{{ ansible_user }}' - group: '{{ ansible_user }}' - mode: 0644 - - - 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/neutron-fullstack/run.yaml b/playbooks/legacy/neutron-fullstack/run.yaml deleted file mode 100644 index 079ee47ced5..00000000000 --- a/playbooks/legacy/neutron-fullstack/run.yaml +++ /dev/null @@ -1,55 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-neutron-dsvm-fullstack from old job gate-neutron-dsvm-fullstack-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-infra/devstack-gate - dest: devstack-gate - EOF - /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ - git://git.openstack.org \ - openstack-infra/devstack-gate - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - export USE_PYTHON3=true - export PYTHONUNBUFFERED=true - export DEVSTACK_GATE_TEMPEST=0 - export DEVSTACK_GATE_EXERCISES=0 - export DEVSTACK_GATE_NEUTRON=1 - export DEVSTACK_GATE_INSTALL_TESTONLY=1 - export BRANCH_OVERRIDE=default - if [ "$BRANCH_OVERRIDE" != "default" ] ; then - export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE - fi - - function gate_hook { - bash -xe $BASE/new/neutron/neutron/tests/contrib/gate_hook.sh dsvm-fullstack - } - export -f gate_hook - - function post_test_hook { - bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-fullstack - } - 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 }}'