canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #05925
[Merge] ~hyask/autopkgtest-cloud:skia/riscv64_tweaks into autopkgtest-cloud:master
Skia has proposed merging ~hyask/autopkgtest-cloud:skia/riscv64_tweaks into autopkgtest-cloud:master.
Requested reviews:
Canonical's Ubuntu QA (canonical-ubuntu-qa)
For more details, see:
https://code.launchpad.net/~hyask/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/478605
Just a few tweaks for supporting riscv64. See commit log for full details.
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~hyask/autopkgtest-cloud:skia/riscv64_tweaks 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 bd9006c..af279b0 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
@@ -66,6 +66,10 @@ if [ -z "$IMG" ]; then
# Fall back to previous adt image and upgrade that
IMG="${PREVIMG}"
fi
+if [ "$ARCH" = "riscv64" ]; then
+ # riscv64 needs manual kickstart for now. Always start from previous image.
+ IMG="${PREVIMG}"
+fi
# If we have neither, fall back to the latest stable release
BASE_RELEASE=${BASE_RELEASE:-$(distro-info --stable)}
diff --git a/charms/focal/autopkgtest-cloud-worker/lib/systemd.py b/charms/focal/autopkgtest-cloud-worker/lib/systemd.py
index 9c530bc..843ea33 100644
--- a/charms/focal/autopkgtest-cloud-worker/lib/systemd.py
+++ b/charms/focal/autopkgtest-cloud-worker/lib/systemd.py
@@ -14,6 +14,11 @@ ARCH_RELEASE_ALLOW_MAPPING = {
"xenial": ["amd64", "i386"],
}
+ARCH_RELEASE_DISALLOW_MAPPING = {
+ "bionic": ["riscv64"],
+ "focal": ["riscv64"],
+}
+
def get_unit_names(region, arch, ns):
if arch == "amd64":
@@ -180,6 +185,11 @@ def update_cloud_dropins(region, arch, n, releases):
and arch not in ARCH_RELEASE_ALLOW_MAPPING[release]
):
return []
+ if (
+ release in ARCH_RELEASE_DISALLOW_MAPPING
+ and arch in ARCH_RELEASE_DISALLOW_MAPPING[release]
+ ):
+ return []
if arch == "amd64" and UbuntuRelease(release) < UbuntuRelease("focal"):
return ["amd64", "i386"]
else:
@@ -392,6 +402,26 @@ def set_up_systemd_units(target_cloud_config, target_lxd_config, releases):
+ arch
+ ".timer"
)
+ if release in ARCH_RELEASE_DISALLOW_MAPPING:
+ if arch in ARCH_RELEASE_DISALLOW_MAPPING[release]:
+ if os.path.exists(
+ "/etc/systemd/system/build-adt-image@"
+ + release
+ + "-"
+ + region
+ + "-"
+ + arch
+ + ".timer"
+ ):
+ os.remove(
+ "/etc/systemd/system/build-adt-image@"
+ + release
+ + "-"
+ + region
+ + "-"
+ + arch
+ + ".timer"
+ )
# now do lxd. the target config is a dict arch -> IP -> nworkers
all_lxd_arches = set(
diff --git a/mojo/service-bundle b/mojo/service-bundle
index fb669e7..de88a81 100644
--- a/mojo/service-bundle
+++ b/mojo/service-bundle
@@ -162,6 +162,7 @@ applications:
bos03:
arm64: 1
ppc64el: 1
+ riscv64: 1
s390x: 1
{%- elif stage_name == "devel" %}
n-workers: |-
@@ -171,6 +172,7 @@ applications:
amd64: 1
arm64: 0
ppc64el: 0
+ riscv64: 0
{%- endif %}
autopkgtest-lxd-worker:
{%- if stage_name == "production" or stage_name == "staging" %}