]> review.fuel-infra Code Review - tools/sustaining.git/commitdiff
Adjust tempest runner - temp commit 29/42129/1
authorVladimir Khlyunev <vkhlyunev@mirantis.com>
Tue, 14 Mar 2023 08:49:59 +0000 (12:49 +0400)
committerVladimir Khlyunev <vkhlyunev@mirantis.com>
Tue, 14 Mar 2023 08:52:14 +0000 (12:52 +0400)
Change-Id: I2326bcee4718bbef9d55f008d08da926af3bd25f

maintenance-ci/common/scripts/build_mos_swarm_slave_image.sh
maintenance-ci/mos/rally-docker/Dockerfile
maintenance-ci/mos/rally-docker/run_rally_tempest.sh
maintenance-ci/mos/scripts/maintenance-tempest-runner.sh
maintenance-ci/mos/scripts/tempest.create_env.sh

index 765c68d291c02517c2c5d74d22d14f09bb35c7a8..4196e2b7a530b23ec62f96ca1fa7dc9a194fbae3 100644 (file)
@@ -55,7 +55,7 @@ ubuntu-vm-builder \
 bridge-utils \
 python-seed-client \
 sshpass
-
+#libvirt-daemon-system libvirt-clients
 curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
 python get-pip.py
 
index a8d4a4ae175e62c68f55e381bef98b0a450811f2..8db9a44aeb1cf3e78ca633e3332a4731ff74ee83 100644 (file)
@@ -25,12 +25,14 @@ RUN git clone https://github.com/openstack/rally.git
 WORKDIR /root/rally
 RUN git checkout 01a1b5fc6e242775d126a0f357ea91c38c783404 && \
     sed -i "s|https://bootstrap.pypa.io/get-pip.py|https://bootstrap.pypa.io/pip/2.7/get-pip.py|g" install_rally.sh && \
+    sed -i "s|https://git.openstack.org/openstack/rally|https://opendev.org/openstack/rally.git|g" install_rally.sh && \
+    git config --global http.sslverify false && \
     ./install_rally.sh --branch 0.7.0 -d rally-venv/ -y
 
 # EOL-ed python workarounds
 RUN egrep -lR "^import queue$" rally-venv/ | xargs -tI{} sed -i 's/import queue/import Queue as queue/' {} && \
-    sed -i '/if self.version:/a \                    check_output(["git", "checkout", "--", "."],\n                                 cwd=self.path())' /root/rally/rally-venv/local/lib/python2.7/site-packages/rally/verification/tempest/tempest.py && \
-    sed -i '/multiple Tempest instances/a \                check_output([self.venv_wrapper, "pip", "install", "voluptuous==0.8.9"],\n                                 cwd=self.path())' /root/rally/rally-venv/local/lib/python2.7/site-packages/rally/verification/tempest/tempest.py
+    sed -i '/if self.version:/a \                    check_output(["git", "checkout", "--", "."],\n                                 cwd=self.path())' rally-venv/local/lib/python2.7/site-packages/rally/verification/tempest/tempest.py && \
+    sed -i '/multiple Tempest instances/a \                check_output([self.venv_wrapper, "pip", "install", "voluptuous==0.8.9"],\n                                 cwd=self.path())' rally-venv/local/lib/python2.7/site-packages/rally/verification/tempest/tempest.py
 
 WORKDIR /root
 
index 5fc4d01a7d7d328c528b0b97ab0c12f59dbb9e8a..5c9d73a783b0c3ee092e19cce0f11e4e97d0f15c 100644 (file)
@@ -37,6 +37,12 @@ scp_from_controller() {
     scp "${SSH_OPTIONS[@]}" "${SCP_ARGS[@]}" "${VM_USERNAME}@${CTL_ADMIN_IP}:$1" "$2"
 }
 
+pkill_ssh() {
+  pkill ssh
+}
+
+trap "pkill_ssh" ERR
+
 mkdir -p /root/.ssh
 cp /root/shared/id_rsa* /root/.ssh
 chmod 600 /root/.ssh/*
@@ -51,7 +57,6 @@ echo "VM_USERNAME= ${VM_USERNAME}"
 echo "VM_PASSWORD= ${VM_PASSWORD}"
 
 ssh_to_fuel_master "ssh ${CTL_ADMIN_IP} echo \"$(cat /root/shared/id_rsa.pub) >> /root/.ssh/authorized_keys\""
-pkill sshuttle || true
 sshuttle -D -e "ssh ${SSH_OPTIONS[*]}" -r "${VM_USERNAME}@${CTL_ADMIN_IP}" "10.109.0.0/16"
 
 scp_from_controller /root/openrc ${OPENRC_FILE}
@@ -68,7 +73,7 @@ echo "export OS_IDENTITY_API_VERSION='3'" >> ${OPENRC_FILE}
 NOVA_FLTR=$(ssh_to_controller "sed -n '/scheduler_default_filters=/p' /etc/nova/nova.conf | cut -f2 -d=")
 check_ceph=$(ssh_to_controller "cat /etc/cinder/cinder.conf |grep '\[RBD-backend\]' | wc -l")
 
-if [ ${check_ceph} == '1' ]; then
+if [ "${check_ceph}" == "1" ]; then
     storage_protocol="ceph"
     sed -i 's|#swift_operator_role = Member|swift_operator_role = swiftoperator|g' /root/rally/rally-venv/etc/rally/rally.conf
     echo 'scheduler_available_filters = '$NOVA_FLTR >> ceph
index dbc99a43df980360a618a007faadb5434fc5e96d..80b0b35b9d20930b510f4453af6fd332d22b5913 100644 (file)
@@ -69,7 +69,8 @@ IMAGE_ID=$(docker build -q maintenance-ci/mos/rally-docker)
 for i in VM_USERNAME VM_PASSWORD FUEL_ADMIN_IP MGMT_NET CTL_ADMIN_IP PUBLIC_NET; do
   echo "export ${i}=${!i}" >> "${LOCAL_STORAGE}"/ssh_connection_data.sh
 done
-cp "${HOME}"/.ssh/id_rsa* "${LOCAL_STORAGE}"/
+cp "${HOME}"/.ssh/id_rsa "${LOCAL_STORAGE}"/
+cp "${HOME}"/.ssh/id_rsa.pub "${LOCAL_STORAGE}"/
 docker run --cap-add=NET_ADMIN --network host --rm -v "${LOCAL_STORAGE}":/root/shared "${IMAGE_ID}"
 
 
index 1db613412a77837077fa34a674296eb946319a14..b9697159c3cd49a30cc85af76570909593845796 100644 (file)
@@ -20,7 +20,7 @@ rm -rf logs/*
 
 #ISO_PATH=$(seedclient-wrapper -d -m "${MAGNET_LINK?}" -v --force-set-symlink -o "${WORKSPACE}")
 
-ISO_PATH=/home/jenkins/MirantisOpenStack-9.0.iso
+ISO_PATH=/var/lib/transmission-daemon/downloads/MirantisOpenStack-9.0.iso
 
 source "${VENV_PATH?}/bin/activate"