Browse Source

Fix CI

Change-Id: I01c11ccb247a018ae85d7f369f80c38f7e9b7b7c
tags/12.1.0^0
Lingxian Kong 1 month ago
parent
commit
d8b5525fd2
11 changed files with 32 additions and 30 deletions
  1. +1
    -1
      integration/scripts/conf/test_begin.conf
  2. +2
    -2
      integration/scripts/files/elements/guest-agent/environment.d/99-reliable-apt-key-importing.bash
  3. +2
    -2
      integration/scripts/files/elements/ubuntu-guest/environment.d/99-reliable-apt-key-importing.bash
  4. +14
    -7
      integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep
  5. +0
    -9
      integration/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update
  6. +1
    -1
      integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools
  7. +3
    -3
      integration/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key
  8. +4
    -0
      integration/scripts/trovestack
  9. +1
    -1
      trove/instance/views.py
  10. +2
    -2
      trove/limits/views.py
  11. +2
    -2
      trove/tests/api/limits.py

+ 1
- 1
integration/scripts/conf/test_begin.conf View File

@@ -84,4 +84,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,

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

@@ -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


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

@@ -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


+ 14
- 7
integration/scripts/files/elements/ubuntu-guest/install.d/15-trove-dep View File

@@ -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"

+ 0
- 9
integration/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update View File

@@ -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

+ 1
- 1
integration/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools View File

@@ -4,4 +4,4 @@
set -e
set -o xtrace

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

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

@@ -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


+ 4
- 0
integration/scripts/trovestack View File

@@ -815,6 +815,10 @@ function cmd_test_init() {
cat $KEY_DIR/authorized_keys >> $USERHOME/.ssh/authorized_keys
chmod 600 $USERHOME/.ssh/authorized_keys
fi

exclaim "Re-installing python-troveclient from git"
pip3 uninstall -y python-troveclient
pip3 install -U git+https://opendev.org/openstack/python-troveclient@stable/train#egg=python-troveclient
}

function cmd_build_image() {


+ 1
- 1
trove/instance/views.py View File

@@ -214,7 +214,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):


+ 2
- 2
trove/limits/views.py View File

@@ -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}

+ 2
- 2
trove/tests/api/limits.py View File

@@ -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


Loading…
Cancel
Save