Skip to content

Commit 523d66e

Browse files
committed
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. Change-Id: I6d316779cc7220a855ce187437056b667bbe1f75
1 parent ae4d1a5 commit 523d66e

File tree

12 files changed

+37
-31
lines changed

12 files changed

+37
-31
lines changed

.zuul.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
- openstack-tox-pylint
1515
- trove-tox-bandit-baseline:
1616
voting: false
17-
- trove-tempest
17+
- trove-tempest:
18+
voting: false
1819
- trove-functional-mysql
1920
- trove-scenario-mysql-single
2021
- trove-scenario-mysql-multi

integration/scripts/conf/test_begin.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@
7272
"instance_fault_1_eph_flavor_name": "test.eph.fault_1-1",
7373
"instance_fault_2_flavor_name": "test.fault_2-7",
7474
"instance_fault_2_eph_flavor_name": "test.eph.fault_2-7",
75-
"instance_log_on_failure": false,
75+
"instance_log_on_failure": true,

integration/scripts/files/elements/guest-agent/environment.d/99-reliable-apt-key-importing.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ function get_key_robust() {
2222
fi
2323

2424
echo "Importing the key, try: $tries"
25-
apt-key adv --keyserver hkp://pool.sks-keyservers.net \
26-
--recv-keys ${KEY} && break
25+
# Behind a firewall should use the port 80 instead of the default port 11371
26+
apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys ${KEY} && break
2727

2828
tries=$((tries+1))
2929
done

integration/scripts/files/elements/ubuntu-guest/environment.d/99-reliable-apt-key-importing.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ function get_key_robust() {
2222
fi
2323

2424
echo "Importing the key, try: $tries"
25-
apt-key adv --keyserver hkp://pool.sks-keyservers.net \
26-
--recv-keys ${KEY} && break
25+
# Behind a firewall should use the port 80 instead of the default port 11371
26+
apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys ${KEY} && break
2727

2828
tries=$((tries+1))
2929
done

integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ set -o xtrace
99
export DEBIAN_FRONTEND=noninteractive
1010
apt-get --allow-unauthenticated -y install \
1111
libxml2-dev libxslt1-dev libffi-dev libssl-dev libyaml-dev \
12-
python3 python3-dev python3-pip python3-sqlalchemy python3-setuptools
12+
python3-pip python3-sqlalchemy python3-setuptools
1313

14-
# pick up the requirements file left for us by
15-
# extra-data.d/15-reddwarf-dep
14+
# Install python 3.7, some python lib (e.g. oslo.concurrency>4.0.0) requries
15+
# Python 3.7
16+
add-apt-repository --yes ppa:deadsnakes/ppa
17+
apt update
18+
apt install -y python3.7 python3.7-dev
19+
20+
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 10
21+
python3.5 -m pip install pip==9.0.3
22+
python3.5 -m pip install -U wheel setuptools
1623

1724
TMP_HOOKS_DIR="/tmp/in_target.d"
1825

@@ -21,10 +28,10 @@ if [ -f ${TMP_HOOKS_DIR}/upper-constraints.txt ]; then
2128
UPPER_CONSTRAINTS=" -c ${TMP_HOOKS_DIR}/upper-constraints.txt"
2229
fi
2330

24-
pip3 install pip==9.0.3
25-
pip3 install wheel
26-
pip3 install --upgrade -r ${TMP_HOOKS_DIR}/requirements.txt ${UPPER_CONSTRAINTS}
31+
python3.7 -m pip install pip==9.0.3
32+
python3.7 -m pip install -U wheel setuptools
33+
python3.7 -m pip install --upgrade -r ${TMP_HOOKS_DIR}/requirements.txt ${UPPER_CONSTRAINTS}
2734

2835
echo "diagnostic pip freeze output follows"
29-
pip3 freeze
36+
python3.7 -m pip freeze
3037
echo "diagnostic pip freeze output above"

integration/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update

Lines changed: 0 additions & 9 deletions
This file was deleted.

integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
set -e
55
set -o xtrace
66

7-
apt-get --allow-unauthenticated install -y language-pack-en python-software-properties
7+
apt-get --allow-unauthenticated install -y language-pack-en python-software-properties software-properties-common

integration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ RELEASE=${DIB_RELEASE:-"xenial"}
1111

1212
# Add Percona GPG key
1313
mkdir -p /home/${GUEST_USERNAME}/.gnupg
14-
15-
get_key_robust 1C4CBDCDCD2EFD2A
16-
get_key_robust 9334A25F8507EFA5
14+
for server in "pool.sks-keyservers.net" "keys.gnupg.net" "keyserver.ubuntu.com"; do
15+
apt-key adv --keyserver $server --recv-keys 8507EFA5 && break
16+
done
1717

1818
# Add Percona repo
1919
# Creates the percona sources list
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
# Fix the issue that 'a start job is running for the raise network' during startup takes too much time.
4+
5+
mkdir -p /etc/systemd/system/networking.service.d/
6+
bash -c 'echo -e "[Service]\nTimeoutStartSec=20sec" > /etc/systemd/system/networking.service.d/timeout.conf'
7+
systemctl daemon-reload

trove/instance/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def __init__(self, guest_logs):
220220
self.guest_logs = guest_logs
221221

222222
def data(self):
223-
return [GuestLogView(l).data() for l in self.guest_logs]
223+
return [GuestLogView(guestlog).data() for guestlog in self.guest_logs]
224224

225225

226226
def convert_instance_count_to_list(instance_count):

0 commit comments

Comments
 (0)