summaryrefslogtreecommitdiffstats
path: root/doctor_tests/installer/common
diff options
context:
space:
mode:
Diffstat (limited to 'doctor_tests/installer/common')
-rw-r--r--doctor_tests/installer/common/set_compute_config.py4
-rw-r--r--doctor_tests/installer/common/set_fenix.sh18
2 files changed, 14 insertions, 8 deletions
diff --git a/doctor_tests/installer/common/set_compute_config.py b/doctor_tests/installer/common/set_compute_config.py
index 76ac649b..615f1895 100644
--- a/doctor_tests/installer/common/set_compute_config.py
+++ b/doctor_tests/installer/common/set_compute_config.py
@@ -26,9 +26,9 @@ def set_cpu_allocation_ratio():
found_list = ([ca for ca in fcheck.readlines() if "cpu_allocation_ratio"
in ca])
fcheck.close()
+ change = False
+ found = False
if found_list and len(found_list):
- change = False
- found = False
for car in found_list:
if car.startswith('#'):
continue
diff --git a/doctor_tests/installer/common/set_fenix.sh b/doctor_tests/installer/common/set_fenix.sh
index aac376cd..bd1eae47 100644
--- a/doctor_tests/installer/common/set_fenix.sh
+++ b/doctor_tests/installer/common/set_fenix.sh
@@ -22,14 +22,15 @@ apt-get install -y docker-ce docker-ce-cli containerd.io
dpkg -r --force-depends golang-docker-credential-helpers
}
-docker ps | grep fenix >/dev/null && {
-REMOTE=`docker exec -ti fenix git rev-parse origin/master`
-LOCAL=`docker exec -ti fenix git rev-parse @`
-if [ $LOCAL = $REMOTE ]; then
- echo "Fenix start: Already running latest"
+docker ps | grep fenix -q && {
+REMOTE=`git ls-remote https://opendev.org/x/fenix HEAD | awk '{ print $1}'`
+LOCAL=`docker exec -t fenix git rev-parse @`
+if [[ "$LOCAL" =~ "$REMOTE" ]]; then
+ # Difference in above string ending marks, so cannot compare equal
+ echo "Fenix start: Already running latest $LOCAL equals $REMOTE"
exit 0
else
- echo "Fenix container needs to be recreated..."
+ echo "Fenix container needs to be recreated $LOCAL not $REMOTE"
# Remove previous container
for img in `docker image list | grep "^fenix" | awk '{print $1}'`; do
for dock in `docker ps --all -f "ancestor=$img" | grep "$img" | awk '{print $1}'`; do
@@ -75,6 +76,11 @@ echo "password = $OS_PASSWORD" >> fenix-api.conf
echo "username = $OS_USERNAME" >> fenix-api.conf
echo "cafile = /opt/stack/data/ca-bundle.pem" >> fenix-api.conf
+openstack service list | grep -q maintenance || {
+openstack service create --name fenix --enable maintenance
+openstack endpoint create --region $OS_REGION_NAME --enable fenix public http://localhost:12347/v1
+}
+
# Mysql pw
# MYSQLPW=`cat /var/lib/config-data/mysql/etc/puppet/hieradata/service_configs.json | grep mysql | grep root_password | awk -F": " '{print $2}' | awk -F"\"" '{print $2}'`
MYSQLPW=root