canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #05450
[Merge] ~andersson123/autopkgtest-cloud:novarcs-decoding-what-the-hell into autopkgtest-cloud:master
Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:novarcs-decoding-what-the-hell 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/473347
The new way of decoding novarcs.tar didn't work in production, so I've reverted to the old way with a comment explaining the situation
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:novarcs-decoding-what-the-hell into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/reactive/autopkgtest_cloud_worker.py b/charms/focal/autopkgtest-cloud-worker/reactive/autopkgtest_cloud_worker.py
index e01a689..4c241eb 100644
--- a/charms/focal/autopkgtest-cloud-worker/reactive/autopkgtest_cloud_worker.py
+++ b/charms/focal/autopkgtest-cloud-worker/reactive/autopkgtest_cloud_worker.py
@@ -341,6 +341,7 @@ def clear_rabbitmq():
def update_nova_rcs():
status.maintenance("Updating nova rc files")
# pylint: disable=import-outside-toplevel
+ import base64
from io import BytesIO
from tarfile import TarFile
@@ -354,7 +355,12 @@ def update_nova_rcs():
clear_old_rcs()
- bytes_file = BytesIO(bytes(rctar, encoding="utf-8"))
+ # This previously worked in staging when deploying using terraform,
+ # but then laterally when deploying a new unit in production, failed.
+ # Leaving it commented as we may need to come back and use this in the
+ # future once we figure out the issue.
+ # bytes_file = BytesIO(bytes(rctar, encoding="utf-8"))
+ bytes_file = BytesIO(base64.b64decode(rctar))
tar = TarFile(fileobj=bytes_file)
log("...got {}".format(", ".join(tar.getnames())), "INFO")