Small fixes and improvements: in cleanup, cmp_check, offline scripts
* cmp_check: use the specific vm prefix name
* cleanup.py: check whether Obj Store is present, check if volume
backup service is enabled
* init-workspace: choose the first ext net
* update-openstack-resources: remove the typo line
Related-PROD: PROD-37187
Change-Id: I6053d8e715f7f64425f7952c868e9c0a253fe677
(cherry picked from commit bbe0f445085adfbc73709402e6af2bf5bac46c78)
(cherry picked from commit 66dbe12789e28a09e6e54183aeed1f88ddfdbe3a)
diff --git a/k8s/workspace/init-workspace.sh b/k8s/workspace/init-workspace.sh
index 84ab960..4f8f00c 100644
--- a/k8s/workspace/init-workspace.sh
+++ b/k8s/workspace/init-workspace.sh
@@ -106,11 +106,11 @@
echo " "
keystone_pod=$(kubectl --kubeconfig $MY_PROJFOLDER/envs/mos-kubeconfig.yaml get pod -n openstack -o=custom-columns=NAME:.metadata.name | grep keystone-client)
- echo "# Extracting network"
- cmd="openstack network list --external -c Name -f value"
+ echo "# Extracting network: taking the first found external network"
+ cmd="openstack network list --external -c Name -f value | head -n1"
echo "# Running 'kubectl --kubeconfig $MY_PROJFOLDER/envs/mos-kubeconfig.yaml -n openstack exec ${keystone_pod} -c keystone-client --stdin -- "${cmd}"'"
vPUBNET=$(kubectl --kubeconfig $MY_PROJFOLDER/envs/mos-kubeconfig.yaml -n openstack exec ${keystone_pod} -c keystone-client --stdin -- ${cmd})
- echo "-> 'openstack network list --external -c Name -f value': '${vPUBNET}'"
+ echo "-> 'openstack network list --external -c Name -f value | head -n1': '${vPUBNET}'"
ewriteln "export TEMPEST_CUSTOM_PUBLIC_NET=${vPUBNET}"
echo "# Extracting volume types"
diff --git a/k8s/workspace/update-openstack-resources.sh b/k8s/workspace/update-openstack-resources.sh
index 23f9c21..c8745d2 100644
--- a/k8s/workspace/update-openstack-resources.sh
+++ b/k8s/workspace/update-openstack-resources.sh
@@ -33,7 +33,6 @@
subnetid=$(kubectl exec toolset --stdin -n qa-space -- openstack subnet list -f value | grep ${netid} | cut -d' ' -f1)
echo "# image_ref_name -> ${cirros51_name}"
sed -i "s/image_ref_name/${cirros51_name}/g" $MY_PROJFOLDER/yamls/tempest_custom.yaml
-image_ref_name
echo "# image_ref_uuid -> ${cirros51_id}"
sed -i "s/image_ref_uuid/${cirros51_id}/g" $MY_PROJFOLDER/yamls/tempest_custom.yaml
echo "# image_ref_alt_uuid -> ${cirros52_id}"