← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:trusty-xenial-service-file-fix into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:trusty-xenial-service-file-fix into autopkgtest-cloud:master.

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

For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/455883
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:trusty-xenial-service-file-fix into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/lib/systemd.py b/charms/focal/autopkgtest-cloud-worker/lib/systemd.py
index 3df8f98..edf80bc 100644
--- a/charms/focal/autopkgtest-cloud-worker/lib/systemd.py
+++ b/charms/focal/autopkgtest-cloud-worker/lib/systemd.py
@@ -176,10 +176,9 @@ def update_cloud_dropins(region, arch, n, releases):
     # re-create, to support fiddling on upgrade
     def get_arches(release):
         if release in ARCH_RELEASE_ALLOW_MAPPING:
-            return ARCH_RELEASE_ALLOW_MAPPING[release]
-        elif arch == "amd64" and UbuntuRelease(release) < UbuntuRelease(
-            "focal"
-        ):
+            if arch not in ARCH_RELEASE_ALLOW_MAPPING[release]:
+                return []
+        if arch == "amd64" and UbuntuRelease(release) < UbuntuRelease("focal"):
             return ["amd64", "i386"]
         else:
             return [arch]