Update upgrade role for Queens from P

This changes the a-r-r with the proper version, and fixes
the repo path for role upgrades:

The role will, during test-upgrade-pre, have its current branch
checked out, and will deploy the current branch infrastructure,
including the generation of the constraints.

Then, the installation of previous branch of the role will use
the constraints for its previous version, but will have no
constraints for it, and fail.

We need to generate the constraints for the previous version too.
This should do it.

On top of it, we need to enfore git and iptables to the list of
packages, because of the issues happening in the developer mode:

Error [Errno 2] No such file or directory while executing command
git clone -q https://git.openstack.org/openstack/neutron
  /tmp/pip-build-iS3zW0/neutron
Cannot find command 'git'\n"

This patch also implements an initial set of jobs intended to
match the current job execution method. It does not intend to
improve how the jobs are executed - only to replicate what is
currently in openstack-infra/openstack-zuul-jobs and provide
the platform to iterate on.

To avoid the chicken and egg issue, this patchset temporarily disables
the upgrade testing.

Co-Authored-By: Manuel Buil <mbuil@suse.com>
Change-Id: I48a554e4ef92bc3c156e43881013cc85df0dc8d4
This commit is contained in:
Jean-Philippe Evrard 2017-10-17 18:59:33 +00:00 committed by Jean-Philippe Evrard
parent c4eb683c55
commit 4d820ac942
13 changed files with 131 additions and 23 deletions

View File

@ -69,7 +69,9 @@ target_name = 'openstack-ansible-' + role_name
title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
# The link to the browsable source code (for the left hand menu)
oslosphinx_cgit_link = 'https://git.openstack.org/cgit/openstack/' + target_name
oslosphinx_cgit_link = (
'https://git.openstack.org/cgit/openstack/{}'.format(target_name)
)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the

View File

@ -65,7 +65,9 @@ target_name = 'openstack-ansible-' + role_name
title = 'OpenStack-Ansible Release Notes: ' + role_name + 'role'
# The link to the browsable source code (for the left hand menu)
oslosphinx_cgit_link = 'https://git.openstack.org/cgit/openstack/' + target_name
oslosphinx_cgit_link = (
'https://git.openstack.org/cgit/openstack/{}'.format(target_name)
)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the

View File

@ -49,24 +49,12 @@ install_pkg_deps() {
eval sudo $pkg_mgr_cmd $pkg_deps
}
git_clone_repo() {
if [[ ! -d tests/common ]]; then
# The tests repo doesn't need a clone, we can just
# symlink it.
if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
ln -s ${WORKING_DIR} ${WORKING_DIR}/tests/common
else
git clone \
https://git.openstack.org/openstack/openstack-ansible-tests \
tests/common
fi
fi
}
# Install the host distro package dependencies
install_pkg_deps
git_clone_repo
# Clone the tests repo for access to the common test script
source tests/tests-repo-clone.sh
# start executing the main test script
# Execute the common test script
source tests/common/run_tests_common.sh

View File

@ -57,7 +57,7 @@
- name: os_previous_neutron
src: https://git.openstack.org/openstack/openstack-ansible-os_neutron
scm: git
version: stable/ocata
version: stable/pike
- name: opendaylight
scm: git
src: https://git.opendaylight.org/gerrit/p/integration/packaging/ansible-opendaylight.git

View File

@ -55,6 +55,10 @@
host: "{{ ansible_host | default(inventory_hostname) }}"
search_regex: OpenSSH
delay: 1
- name: Ensure presence of iptables inside the agent before running the role
package:
name: iptables
state: present
- name: Add iptables rule for communication w/ metadata agent
command: /sbin/iptables -t mangle -A POSTROUTING -p tcp --sport 80 -j CHECKSUM --checksum-fill

View File

@ -30,5 +30,8 @@
# Install Keystone
- include: common/test-install-keystone.yml
# Ensure the repo is setup for previous version
- include: common/previous/test-repo-setup.yml
# Install previous Neutron
- include: test-install-previous-neutron.yml

View File

@ -33,6 +33,7 @@ set -e
export TESTING_HOME=${TESTING_HOME:-$HOME}
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no}
export ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/git.openstack.org/openstack/openstack-ansible-tests"
## Functions -----------------------------------------------------------------
@ -52,7 +53,11 @@ EOF
# If zuul-cloner is present, use it so that we
# also include any dependent patches from the
# tests repo noted in the commit message.
if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
# We only want to use zuul-cloner if we detect
# zuul v2 running, so we check for the presence
# of the ZUUL_REF environment variable.
# ref: http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/ansible/filter/zuul_filters.py?h=feature/zuulv3#n17
if [[ -x /usr/zuul-env/bin/zuul-cloner ]] && [[ "${ZUUL_REF:-none}" != "none" ]]; then
# Prepare the clonemap for zuul-cloner to use
create_tests_clonemap
@ -74,9 +79,22 @@ if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
elif [[ ! -d tests/common ]]; then
# The tests repo doesn't need a clone, we can just
# symlink it.
if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
# symlink it. As zuul v3 clones into a folder called
# 'workspace' we have to use one of its environment
# variables to determine the project name.
if [[ "${ZUUL_SHORT_PROJECT_NAME:-none}" == "openstack-ansible-tests" ]] ||\
[[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
ln -s ${WORKING_DIR} ${WORKING_DIR}/tests/common
# In zuul v3 any dependent repository is placed into
# /home/zuul/src/git.openstack.org, so we check to see
# if there is a tests checkout there already. If so, we
# symlink that and use it.
elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then
ln -s "${ZUUL_TESTS_CLONE_LOCATION}" ${WORKING_DIR}/tests/common
# Otherwise we're clearly not in zuul or using a previously setup
# repo in some way, so just clone it from upstream.
else
git clone \
https://git.openstack.org/openstack/openstack-ansible-tests \
@ -92,7 +110,7 @@ fi
# tests repo are not supported.
if [[ "${CLONE_UPGRADE_TESTS}" == "yes" ]]; then
if [[ ! -d "${WORKING_DIR}/tests/common/previous" ]]; then
git clone -b stable/ocata \
git clone -b stable/pike \
https://git.openstack.org/openstack/openstack-ansible-tests \
${WORKING_DIR}/tests/common/previous
fi

View File

@ -39,6 +39,9 @@ neutron_package_list: |-
{% if neutron_services['neutron-vpnaas-agent']['group'] in group_names and neutron_vpnaas | bool %}
{% set _ = packages.extend(neutron_vpnaas_distro_packages) %}
{% endif %}
{% if neutron_developer_mode | bool %}
{% set _ = packages.extend(neutron_developer_mode_distro_packages) %}
{% endif %}
{{ packages }}
# Set the Calico Felix agent executable destination path

View File

@ -27,11 +27,15 @@ neutron_distro_packages:
- ebtables
- haproxy
- ipset
- iptables
- iputils
- keepalived
- radvd
- which
neutron_developer_mode_distro_packages:
- git
neutron_lxb_distro_packages:
- bridge-utils

View File

@ -34,6 +34,9 @@ neutron_distro_packages:
- radvd
- which
neutron_developer_mode_distro_packages:
- git-core
neutron_lxb_distro_packages:
- bridge-utils

View File

@ -31,10 +31,14 @@ neutron_distro_packages:
- ebtables
- haproxy
- ipset
- iptables
- iputils-arping
- keepalived
- radvd
neutron_developer_mode_distro_packages:
- git-core
neutron_lxb_distro_packages:
- bridge-utils

42
zuul.d/jobs.yaml Normal file
View File

@ -0,0 +1,42 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- job:
name: openstack-ansible-ovs-ubuntu-xenial-nv
parent: openstack-ansible-functional-ubuntu-xenial
voting: false
vars:
tox_env: func_ovs
- job:
name: openstack-ansible-calico-ubuntu-xenial-nv
parent: openstack-ansible-functional-ubuntu-xenial
voting: false
vars:
tox_env: calico
- job:
name: openstack-ansible-dragonflow-ubuntu-xenial-nv
parent: openstack-ansible-functional-ubuntu-xenial
voting: false
vars:
tox_env: dragonflow
- job:
name: openstack-ansible-opendaylight-ubuntu-xenial-nv
parent: openstack-ansible-functional-ubuntu-xenial
voting: false
vars:
tox_env: opendaylight

35
zuul.d/project.yaml Normal file
View File

@ -0,0 +1,35 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- project:
name: openstack/openstack-ansible-os_neutron
check:
jobs:
- openstack-ansible-functional-centos-7
- openstack-ansible-functional-opensuse-423
- openstack-ansible-functional-ubuntu-xenial
# - openstack-ansible-upgrade-ubuntu-xenial
- openstack-ansible-ovs-ubuntu-xenial-nv
- openstack-ansible-calico-ubuntu-xenial-nv
- openstack-ansible-dragonflow-ubuntu-xenial-nv
- openstack-ansible-opendaylight-ubuntu-xenial-nv
gate:
queue: openstack-ansible
jobs:
- openstack-ansible-functional-centos-7
- openstack-ansible-functional-opensuse-423
- openstack-ansible-functional-ubuntu-xenial
# - openstack-ansible-upgrade-ubuntu-xenial