summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLingxian Kong <anlin.kong@gmail.com>2020-05-19 12:28:21 +1200
committerLingxian Kong <anlin.kong@gmail.com>2020-05-26 15:43:17 +1200
commit8d9b938a5596db02d42090104f58a53d6aa4bdde (patch)
tree8ea74145c0a11d69bbacd67092bccab1c9c84f8b
parenta006dc41fb0925209f7cdb1d2547ddeee7510cbf (diff)
downloadtrove-8d9b938a5596db02d42090104f58a53d6aa4bdde.tar.gz
Fix CI job
* Fix pep8: ambiguous variable name * Install Python 3.7 for trove guest image. oslo.concurrency requires python 3.6 or newer. See https://bugs.launchpad.net/tripleo/+bug/1861803 * Mark tempest job non-voting temporarily because of some tempest bugs. * Use stable/ussuri for python-troveclient. * Use stable/ussuri for CI jobs. Change-Id: I6d316779cc7220a855ce187437056b667bbe1f75 (cherry picked from commit 523d66e8fd5d29be8dbae9aa79c5348d3dce8c64)
-rw-r--r--.zuul.yaml13
-rw-r--r--devstack/settings2
-rw-r--r--integration/scripts/conf/test_begin.conf2
-rw-r--r--integration/scripts/files/elements/guest-agent/environment.d/99-reliable-apt-key-importing.bash4
-rw-r--r--integration/scripts/files/elements/guest-agent/source-repository-guest-agent4
-rw-r--r--integration/scripts/files/elements/ubuntu-guest/environment.d/99-reliable-apt-key-importing.bash4
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep21
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update9
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools2
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key6
-rwxr-xr-xintegration/scripts/files/elements/ubuntu-xenial-guest/install.d/22-decrease-networking-timeout7
-rwxr-xr-xintegration/scripts/trovestack2
-rw-r--r--integration/scripts/trovestack.rc2
-rw-r--r--trove/instance/views.py2
-rw-r--r--trove/limits/views.py4
-rw-r--r--trove/tests/api/limits.py4
16 files changed, 47 insertions, 41 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 2d2e175c..9b5cceae 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -14,7 +14,8 @@
- openstack-tox-pylint
- trove-tox-bandit-baseline:
voting: false
- - trove-tempest
+ - trove-tempest:
+ voting: false
- trove-functional-mysql
- trove-scenario-mysql-single
- trove-scenario-mysql-multi
@@ -53,10 +54,10 @@
jobs:
- publish-trove-guest-image-mysql-ubuntu-xenial:
branches:
- - master
+ - stable/ussuri
- publish-trove-guest-image-mysql-ubuntu-xenial-dev:
branches:
- - master
+ - stable/ussuri
- job:
name: trove-legacy-dsvm-base
@@ -152,7 +153,7 @@
vars:
devstack_localrc:
TROVE_RESIZE_TIME_OUT: 1800
- TROVE_NON_DEV_IMAGE_URL_MYSQL: https://tarballs.opendev.org/openstack/trove/images/trove-master-mysql-ubuntu-xenial.qcow2
+ TROVE_NON_DEV_IMAGE_URL_MYSQL: https://tarballs.opendev.org/openstack/trove/images/trove-ussuri-mysql-ubuntu-xenial.qcow2
trove_resize_time_out: 1800
trove_test_datastore: 'mysql'
trove_test_group: 'mysql'
@@ -406,7 +407,7 @@
guest_os: ubuntu
guest_os_release: xenial
guest_username: ubuntu
- branch: master
+ branch: ussuri
dev_mode: false
image_suffix: ""
@@ -421,6 +422,6 @@
guest_os: ubuntu
guest_os_release: xenial
guest_username: ubuntu
- branch: master
+ branch: ussuri
dev_mode: true
image_suffix: "-dev"
diff --git a/devstack/settings b/devstack/settings
index 44b71bb6..eb731b9e 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -4,7 +4,7 @@
# Set up default directories
TROVE_DIR=${TROVE_DIR:-${DEST}/trove}
TROVE_REPO=${TROVE_REPO:-${GIT_BASE}/openstack/trove.git}
-TROVE_BRANCH=${TROVE_BRANCH:-master}
+TROVE_BRANCH=${TROVE_BRANCH:-stable/ussuri}
TROVE_CLIENT_DIR=${TROVE_CLIENT_DIR:-${TROVECLIENT_DIR:-${DEST}/python-troveclient}}
TROVE_CLIENT_REPO=${TROVE_CLIENT_REPO:-${TROVECLIENT_REPO:-${GIT_BASE}/openstack/python-troveclient.git}}
diff --git a/integration/scripts/conf/test_begin.conf b/integration/scripts/conf/test_begin.conf
index c0b6c513..83f6de86 100644
--- a/integration/scripts/conf/test_begin.conf
+++ b/integration/scripts/conf/test_begin.conf
@@ -72,4 +72,4 @@
"instance_fault_1_eph_flavor_name": "test.eph.fault_1-1",
"instance_fault_2_flavor_name": "test.fault_2-7",
"instance_fault_2_eph_flavor_name": "test.eph.fault_2-7",
- "instance_log_on_failure": false,
+ "instance_log_on_failure": true,
diff --git a/integration/scripts/files/elements/guest-agent/environment.d/99-reliable-apt-key-importing.bash b/integration/scripts/files/elements/guest-agent/environment.d/99-reliable-apt-key-importing.bash
index 2661fc05..9622b292 100644
--- a/integration/scripts/files/elements/guest-agent/environment.d/99-reliable-apt-key-importing.bash
+++ b/integration/scripts/files/elements/guest-agent/environment.d/99-reliable-apt-key-importing.bash
@@ -22,8 +22,8 @@ function get_key_robust() {
fi
echo "Importing the key, try: $tries"
- apt-key adv --keyserver hkp://pool.sks-keyservers.net \
- --recv-keys ${KEY} && break
+ # Behind a firewall should use the port 80 instead of the default port 11371
+ apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys ${KEY} && break
tries=$((tries+1))
done
diff --git a/integration/scripts/files/elements/guest-agent/source-repository-guest-agent b/integration/scripts/files/elements/guest-agent/source-repository-guest-agent
index 9860bac6..6efdab67 100644
--- a/integration/scripts/files/elements/guest-agent/source-repository-guest-agent
+++ b/integration/scripts/files/elements/guest-agent/source-repository-guest-agent
@@ -1,3 +1,3 @@
# This is used for source-based builds
-guest-agent git /opt/guest-agent https://opendev.org/openstack/trove master
-upper-constraints file /opt/upper-constraints.txt https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt
+guest-agent git /opt/guest-agent https://opendev.org/openstack/trove stable/ussuri
+upper-constraints file /opt/upper-constraints.txt https://opendev.org/openstack/requirements/raw/branch/stable/ussuri/upper-constraints.txt
diff --git a/integration/scripts/files/elements/ubuntu-guest/environment.d/99-reliable-apt-key-importing.bash b/integration/scripts/files/elements/ubuntu-guest/environment.d/99-reliable-apt-key-importing.bash
index 2661fc05..9622b292 100644
--- a/integration/scripts/files/elements/ubuntu-guest/environment.d/99-reliable-apt-key-importing.bash
+++ b/integration/scripts/files/elements/ubuntu-guest/environment.d/99-reliable-apt-key-importing.bash
@@ -22,8 +22,8 @@ function get_key_robust() {
fi
echo "Importing the key, try: $tries"
- apt-key adv --keyserver hkp://pool.sks-keyservers.net \
- --recv-keys ${KEY} && break
+ # Behind a firewall should use the port 80 instead of the default port 11371
+ apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys ${KEY} && break
tries=$((tries+1))
done
diff --git a/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep b/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep
index 7a0430e1..25b48459 100755
--- a/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep
+++ b/integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep
@@ -9,10 +9,17 @@ set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get --allow-unauthenticated -y install \
libxml2-dev libxslt1-dev libffi-dev libssl-dev libyaml-dev \
- python3 python3-dev python3-pip python3-sqlalchemy python3-setuptools
+ python3-pip python3-sqlalchemy python3-setuptools
-# pick up the requirements file left for us by
-# extra-data.d/15-reddwarf-dep
+# Install python 3.7, some python lib (e.g. oslo.concurrency>4.0.0) requries
+# Python 3.7
+add-apt-repository --yes ppa:deadsnakes/ppa
+apt update
+apt install -y python3.7 python3.7-dev
+
+update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 10
+python3.5 -m pip install pip==9.0.3
+python3.5 -m pip install -U wheel setuptools
TMP_HOOKS_DIR="/tmp/in_target.d"
@@ -21,10 +28,10 @@ if [ -f ${TMP_HOOKS_DIR}/upper-constraints.txt ]; then
UPPER_CONSTRAINTS=" -c ${TMP_HOOKS_DIR}/upper-constraints.txt"
fi
-pip3 install pip==9.0.3
-pip3 install wheel
-pip3 install --upgrade -r ${TMP_HOOKS_DIR}/requirements.txt ${UPPER_CONSTRAINTS}
+python3.7 -m pip install pip==9.0.3
+python3.7 -m pip install -U wheel setuptools
+python3.7 -m pip install --upgrade -r ${TMP_HOOKS_DIR}/requirements.txt ${UPPER_CONSTRAINTS}
echo "diagnostic pip freeze output follows"
-pip3 freeze
+python3.7 -m pip freeze
echo "diagnostic pip freeze output above"
diff --git a/integration/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update b/integration/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update
deleted file mode 100755
index 6cc087a7..00000000
--- a/integration/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-# CONTEXT: GUEST after packages installed
-# PURPOSE: do apt-get update to save each instance having to do all the work
-
-set -e
-set -o xtrace
-
-apt-get update
diff --git a/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools b/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools
index 8360ddfc..7b9221cf 100755
--- a/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools
+++ b/integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools
@@ -4,4 +4,4 @@
set -e
set -o xtrace
-apt-get --allow-unauthenticated install -y language-pack-en python-software-properties \ No newline at end of file
+apt-get --allow-unauthenticated install -y language-pack-en python-software-properties software-properties-common \ No newline at end of file
diff --git a/integration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key b/integration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key
index cb2e851b..732b9e69 100755
--- a/integration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key
+++ b/integration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key
@@ -11,9 +11,9 @@ RELEASE=${DIB_RELEASE:-"xenial"}
# Add Percona GPG key
mkdir -p /home/${GUEST_USERNAME}/.gnupg
-
-get_key_robust 1C4CBDCDCD2EFD2A
-get_key_robust 9334A25F8507EFA5
+for server in "pool.sks-keyservers.net" "keys.gnupg.net" "keyserver.ubuntu.com"; do
+ apt-key adv --keyserver $server --recv-keys 8507EFA5 && break
+done
# Add Percona repo
# Creates the percona sources list
diff --git a/integration/scripts/files/elements/ubuntu-xenial-guest/install.d/22-decrease-networking-timeout b/integration/scripts/files/elements/ubuntu-xenial-guest/install.d/22-decrease-networking-timeout
new file mode 100755
index 00000000..036d5ff2
--- /dev/null
+++ b/integration/scripts/files/elements/ubuntu-xenial-guest/install.d/22-decrease-networking-timeout
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Fix the issue that 'a start job is running for the raise network' during startup takes too much time.
+
+mkdir -p /etc/systemd/system/networking.service.d/
+bash -c 'echo -e "[Service]\nTimeoutStartSec=20sec" > /etc/systemd/system/networking.service.d/timeout.conf'
+systemctl daemon-reload
diff --git a/integration/scripts/trovestack b/integration/scripts/trovestack
index 4f6273e6..74f91fef 100755
--- a/integration/scripts/trovestack
+++ b/integration/scripts/trovestack
@@ -765,7 +765,7 @@ function cmd_test_init() {
exclaim "Re-installing python-troveclient from git"
pip3 uninstall -y python-troveclient
- pip3 install -U git+https://opendev.org/openstack/python-troveclient@master#egg=python-troveclient
+ pip3 install -U git+https://opendev.org/openstack/python-troveclient@stable/ussuri#egg=python-troveclient
}
function cmd_build_image() {
diff --git a/integration/scripts/trovestack.rc b/integration/scripts/trovestack.rc
index eaf74550..62c1cbf7 100644
--- a/integration/scripts/trovestack.rc
+++ b/integration/scripts/trovestack.rc
@@ -59,7 +59,7 @@ GIT_OPENSTACK=${GIT_OPENSTACK:-${GIT_BASE}/openstack}
DEVSTACK_REPO=${DEVSTACK_REPO:-${GIT_BASE}/openstack-dev/devstack.git}
TROVE_REPO=${TROVE_REPO:-${GIT_OPENSTACK}/trove.git}
TROVE_DIR=${TROVE_DIR:-${PATH_TROVE}}
-TROVE_BRANCH=${TROVE_BRANCH:-master}
+TROVE_BRANCH=${TROVE_BRANCH:-stable/ussuri}
TROVE_CLIENT_REPO=${TROVE_CLIENT_REPO:-${TROVECLIENT_REPO:-${GIT_OPENSTACK}/python-troveclient.git}}
TROVE_CLIENT_DIR=${TROVE_CLIENT_DIR:-${TROVECLIENT_DIR:-${PATH_PYTHON_TROVECLIENT}}}
TROVE_CLIENT_BRANCH=${TROVE_CLIENT_BRANCH:-${TROVECLIENT_BRANCH:-master}}
diff --git a/trove/instance/views.py b/trove/instance/views.py
index a79b27b8..fbd5138f 100644
--- a/trove/instance/views.py
+++ b/trove/instance/views.py
@@ -222,7 +222,7 @@ class GuestLogsView(object):
self.guest_logs = guest_logs
def data(self):
- return [GuestLogView(l).data() for l in self.guest_logs]
+ return [GuestLogView(guestlog).data() for guestlog in self.guest_logs]
def convert_instance_count_to_list(instance_count):
diff --git a/trove/limits/views.py b/trove/limits/views.py
index f381d1ca..9d145368 100644
--- a/trove/limits/views.py
+++ b/trove/limits/views.py
@@ -53,6 +53,6 @@ class LimitViews(object):
abs_view["max_" + resource_name] = abs_limit
data.append(abs_view)
- for l in self.rate_limits:
- data.append(LimitView(l).data()["limit"])
+ for limit in self.rate_limits:
+ data.append(LimitView(limit).data()["limit"])
return {"limits": data}
diff --git a/trove/tests/api/limits.py b/trove/tests/api/limits.py
index f4e9bb7d..2279bdb3 100644
--- a/trove/tests/api/limits.py
+++ b/trove/tests/api/limits.py
@@ -91,8 +91,8 @@ class Limits(object):
def _get_limits_as_dict(self, limits):
d = {}
- for l in limits:
- d[l.verb] = l
+ for limit in limits:
+ d[l.verb] = limit
return d
@test