Merge "[train][goal] Define new blazar-devstack-dsvm-ipv6-only job"

This commit is contained in:
Zuul 2019-09-27 10:37:18 +00:00 committed by Gerrit Code Review
commit edba1b37b7
8 changed files with 105 additions and 6 deletions

View File

@ -42,6 +42,13 @@
- openstack/python-blazarclient
- openstack/blazar-tempest-plugin
- job:
name: blazar-devstack-dsvm-ipv6-only
parent: blazar-devstack-dsvm-py35
run: playbooks/legacy/blazar-devstack-dsvm-py35/run-ipv6.yaml
required-projects:
- openstack/tempest
- project:
templates:
- check-requirements
@ -54,6 +61,7 @@
jobs:
- blazar-devstack-dsvm
- blazar-devstack-dsvm-py35
- blazar-devstack-dsvm-ipv6-only
- openstack-tox-pylint:
voting: false
gate:
@ -61,3 +69,4 @@
jobs:
- blazar-devstack-dsvm
- blazar-devstack-dsvm-py35
- blazar-devstack-dsvm-ipv6-only

View File

@ -13,9 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import netaddr
from blazar.manager import exceptions
def get_os_auth_host(conf):
"""Description
Returns os_auth_host from conf, surrounded by brackets if IPv6.
"""
os_auth_host = conf.os_auth_host
if netaddr.valid_ipv6(os_auth_host, netaddr.core.INET_PTON):
os_auth_host = "[%s]" % os_auth_host
return os_auth_host
def url_for(service_catalog, service_type, admin=False,
endpoint_interface=None,
os_region_name=None):

View File

@ -23,6 +23,7 @@ from oslo_config import cfg
from oslo_log import log as logging
from blazar import context
from blazar.utils.openstack import base
from blazar.utils.openstack import exceptions
CONF = cfg.CONF
@ -56,7 +57,7 @@ class BlazarNeutronClient(object):
if auth_url is None:
auth_url = "%s://%s:%s/%s/%s" % (CONF.os_auth_protocol,
CONF.os_auth_host,
base.get_os_auth_host(CONF),
CONF.os_auth_port,
CONF.os_auth_prefix,
CONF.os_auth_version)

View File

@ -131,7 +131,7 @@ class BlazarNovaClient(object):
if auth_url is None:
auth_url = "%s://%s:%s/%s" % (CONF.os_auth_protocol,
CONF.os_auth_host,
base.get_os_auth_host(CONF),
CONF.os_auth_port,
CONF.os_auth_prefix)

View File

@ -21,6 +21,7 @@ from oslo_config import cfg
from oslo_log import log as logging
from blazar import context
from blazar.utils.openstack import base
from blazar.utils.openstack import exceptions
CONF = cfg.CONF
@ -59,7 +60,7 @@ class BlazarPlacementClient(object):
if auth_url is None:
auth_url = "%s://%s:%s/%s/%s" % (CONF.os_auth_protocol,
CONF.os_auth_host,
base.get_os_auth_host(CONF),
CONF.os_auth_port,
CONF.os_auth_prefix,
CONF.os_auth_version)

View File

@ -18,6 +18,7 @@ import functools
from oslo_config import cfg
from blazar import context
from blazar.utils.openstack import base
from blazar.utils.openstack import keystone
CONF = cfg.CONF
@ -59,7 +60,7 @@ def create_ctx_from_trust(trust_id):
global_request_id=ctx.global_request_id
)
auth_url = "%s://%s:%s/%s" % (CONF.os_auth_protocol,
CONF.os_auth_host,
base.get_os_auth_host(CONF),
CONF.os_auth_port,
CONF.os_auth_prefix)
client = keystone.BlazarKeystoneClient(

View File

@ -44,7 +44,7 @@ function configure_blazar {
touch $BLAZAR_CONF_FILE
iniset $BLAZAR_CONF_FILE DEFAULT os_auth_version v3
iniset $BLAZAR_CONF_FILE DEFAULT os_auth_host $KEYSTONE_AUTH_HOST
iniset $BLAZAR_CONF_FILE DEFAULT os_auth_host $(ipv6_unquote $KEYSTONE_AUTH_HOST)
iniset $BLAZAR_CONF_FILE DEFAULT os_auth_port 80
iniset $BLAZAR_CONF_FILE DEFAULT os_auth_prefix identity
iniset $BLAZAR_CONF_FILE DEFAULT os_admin_password $SERVICE_PASSWORD
@ -58,7 +58,7 @@ function configure_blazar {
iniset $BLAZAR_CONF_FILE nova aggregate_freepool_name $BLAZAR_FREEPOOL_NAME
iniset $BLAZAR_CONF_FILE DEFAULT host $HOST_IP
iniset $BLAZAR_CONF_FILE DEFAULT host $(ipv6_unquote $SERVICE_HOST)
iniset $BLAZAR_CONF_FILE DEFAULT debug $BLAZAR_DEBUG
iniset $BLAZAR_CONF_FILE manager plugins physical.host.plugin,virtual.instance.plugin,virtual.floatingip.plugin

View File

@ -0,0 +1,74 @@
- hosts: all
name: legacy-blazar-devstack-dsvm-ipv6-only
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 blazar https://opendev.org/openstack/blazar
# Swift is not ready for python3 yet
disable_service s-account
disable_service s-container
disable_service s-object
disable_service s-proxy
# Without Swift, c-bak cannot run (in the Gate at least)
disable_service c-bak
# Enable Tempest plugin
TEMPEST_PLUGINS='/opt/stack/new/blazar-tempest-plugin'
SERVICE_IP_VERSION=6
SERVICE_HOST=""
# IPv6 and certificates known issue with python2
# https://bugs.launchpad.net/devstack/+bug/1794929
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export DEVSTACK_GATE_USE_PYTHON3=True
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export ENABLED_SERVICES=blazar,blazar-a,blazar-m,tempest
export PROJECTS="openstack/blazar $PROJECTS"
export PROJECTS="openstack/blazar-nova $PROJECTS"
export PROJECTS="openstack/python-blazarclient $PROJECTS"
export PROJECTS="openstack/blazar-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_TEMPEST_REGEX="blazar_tempest_plugin"
export TEMPEST_CONCURRENCY=1
function post_test_hook {
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 }}'