Tim Andersson has proposed merging
~andersson123/autopkgtest-cloud:cloudrc-deployment-issue 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/476161
Fixes the deployment of the cloudrc files!
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of
~andersson123/autopkgtest-cloud:cloudrc-deployment-issue 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 831b3fa..433f6e3 100644
--- a/charms/focal/autopkgtest-cloud-worker/reactive/autopkgtest_cloud_worker.py
+++ b/charms/focal/autopkgtest-cloud-worker/reactive/autopkgtest_cloud_worker.py
@@ -359,10 +359,14 @@ def update_nova_rcs():
log("Extracting cloud .rc files...", "INFO")
clear_old_rcs()
+ rc_dest = Path(os.path.expanduser("~ubuntu/cloudrcs/"))
with tarfile.open(rcs_file_path) as tar:
- tar.extractall()
- log("...got {}".format(", ".join(tar.getnames())), "INFO")
+ for member in tar:
+ fname = Path(member.name.rsplit("/")[-1])
+ rc_filepath = rc_dest / fname
+ log(f"Writing file {rc_filepath}", "INFO")
+ tar.makefile(member, rc_filepath)
os.remove(rcs_file_path)
status.maintenance("Done updating nova rc files")
--
Mailing list: https://launchpad.net/~canonical-ubuntu-qa
Post to : [email protected]
Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa
More help : https://help.launchpad.net/ListHelp