← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] autopkgtest-cloud:net-name-for-region into autopkgtest-cloud:master

 

Brian Murray has proposed merging autopkgtest-cloud:net-name-for-region into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~ubuntu-release/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/444308

Then network in PS5 is named net_stg-proposed-migration while in PS45 it is named net_stg_proposed-migration. To be able to allow the PS45 autopkgtest-cloud-worker units to access PS5 I made changes to build-adt-image (this MP) and worker-lcy02.conf (hacking --net-id argument).

It's entirely possible there is an "easy" way to copy the net_stg-proposed-migration network to net_stg_proposed-migration in PS5 but I couldn't find it. I also took this direction given that PS45 accessing PS5 should be short lived because everything should move to PS5.
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of autopkgtest-cloud:net-name-for-region into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
index be6b4d3..c2144a9 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/build-adt-image
@@ -20,7 +20,13 @@ if [ -z "${MIRROR:-}" ]; then
 fi
 export MIRROR
 
-[ -z "${NET_NAME:-}" ] && . ~/net-name.rc
+if [ -z "${NET_NAME:-}" ]; then
+        if [ -e ~/net-name-${REGION}.rc ]; then
+                . ~/net-name-${REGION}.rc
+        else
+                ~/net-name.rc
+        fi
+fi
 export NET_NAME
 
 if [ -z "${USE_CLOUD_CONFIG_FROM_ENV:-}" ]; then

Follow ups