[train][goal] Define new magnum-functional-api-ipv6-only job

As part of Train community goal 'Support IPv6-Only Deployments and Testing'[1],
we need to define the integration job which deploy services
on IPv6 and perform testing to make sure service listen and communicate
over IPv6 properly.

Magnum has legacy zuul jobs only so base zuulv3 IPv6 job 'devstack-ipv6' and
'devstack-tempest-ipv6' cannot be used and we have to copy the whole
run.yaml to set the IPv6 setting and run the IPv6 verification
script via post_test_hook.

This commit adds the new job 'magnum-functional-api-ipv6-only'
run on gate and set the required IPv6 setting'.

Story: #2005477
Task: #35902

[1] https://governance.openstack.org/tc/goals/train/ipv6-support-and-testing.html

Change-Id: I3b9e88a6993a16143cfdbf8499389fca12d4af29
This commit is contained in:
Ghanshyam Mann 2019-09-17 20:10:45 +00:00
parent 13e017a80c
commit 455147539e
2 changed files with 114 additions and 0 deletions

View File

@ -143,6 +143,13 @@
vars:
coe: api
- job:
name: magnum-functional-api-ipv6-only
parent: magnum-functional-api
run: playbooks/magnum-functional-base-ipv6.yaml
required-projects:
- openstack/tempest
- job:
name: magnum-functional-api-python2
parent: magnum-functional-base-python2
@ -376,6 +383,7 @@
check:
jobs:
- magnum-functional-api
- magnum-functional-api-ipv6-only
- magnum-functional-api-python2
- openstack-tox-cover:
voting: false
@ -384,6 +392,7 @@
queue: magnum
jobs:
- magnum-functional-api
- magnum-functional-api-ipv6-only
- magnum-functional-api-python2
experimental:
jobs:

View File

@ -0,0 +1,105 @@
- hosts: primary
tasks:
- shell:
cmd: |
set -e
set -x
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
# Enable Magnum Tempest plugin
TEMPEST_PLUGINS='/opt/stack/new/magnum-tempest-plugin'
SERVICE_IP_VERSION=6
SERVICE_HOST=""
# IPv6 and certificates known issue with python2
# https://bugs.launchpad.net/devstack/+bug/1794929
USE_PYTHON3=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_USE_PYTHON3=True
if [ "{{ neutron }}" -eq 1 ] ; then
export DEVSTACK_GATE_NEUTRON=1
fi
export DEVSTACK_GATE_TEMPEST=1
if [ "{{ tempest }}" -eq 0 ] ; then
# Do not run any tempest tests
export DEVSTACK_GATE_TEMPEST_NOTESTS=1
fi
if [ "{{ branch_override }}" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
export PROJECTS="openstack/magnum $PROJECTS"
export PROJECTS="openstack/python-magnumclient $PROJECTS"
export PROJECTS="openstack/diskimage-builder $PROJECTS"
export PROJECTS="openstack/magnum-tempest-plugin $PROJECTS"
if [ "{{ multinode }}" -eq 1 ] ; then
export DEVSTACK_GATE_TOPOLOGY="multinode"
export DEVSTACK_SUBNODE_CONFIG+=$'\n'"disable_service tempest"
fi
if [ "{{ ironic }}" -eq 1 ] ; then
export PROJECTS="openstack/ironic $PROJECTS"
export PROJECTS="openstack/ironic-lib $PROJECTS"
export PROJECTS="openstack/ironic-python-agent $PROJECTS"
export PROJECTS="openstack/python-ironicclient $PROJECTS"
export PROJECTS="x/pyghmi $PROJECTS"
export PROJECTS="openstack/virtualbmc $PROJECTS"
export MAGNUM_GATE_SPECIAL="-ironic"
fi
if [ "{{ horizon }}" -eq 0 ] ; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service horizon"
else
export DEVSTACK_GATE_HORIZON=1
fi
if [ "{{ swift }}" -eq 0 ] ; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-account"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-container"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-object"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-proxy"
fi
if [ "{{ ceilometer }}" -eq 0 ] ; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acentral"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acompute"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-evaluator"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-notifier"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-api"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-collector"
fi
# Keep localrc to be able to set some vars in post_test_hook
export KEEP_LOCALRC=1
function gate_hook {
cd /opt/stack/new/magnum/
./magnum/tests/contrib/gate_hook.sh {{ coe }} $MAGNUM_GATE_SPECIAL
}
export -f gate_hook
function post_test_hook {
source $BASE/new/devstack/accrc/admin/admin
cd /opt/stack/new/magnum/
./magnum/tests/contrib/post_test_hook.sh {{ coe }} $MAGNUM_GATE_SPECIAL
cd $BASE/new/tempest/tools
./verify-ipv6-only-deployments.sh
}
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 }}'