← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:no-double-download-results into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:no-double-download-results 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/465054
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:no-double-download-results into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/download-results b/charms/focal/autopkgtest-web/webcontrol/download-results
index 1297a66..5cae5dc 100755
--- a/charms/focal/autopkgtest-web/webcontrol/download-results
+++ b/charms/focal/autopkgtest-web/webcontrol/download-results
@@ -122,6 +122,11 @@ if __name__ == "__main__":
     logging.basicConfig(
         level=("DEBUG" in os.environ and logging.DEBUG or logging.INFO)
     )
+    # FIXME: Hacky interrim solution to fix synchronisation issues
+    if os.path.exists("/run/autopkgtest-web-is-leader"):
+        logging.info("Unit is not leader, exiting...")
+        time.sleep(300)
+        sys.exit(0)
 
     amqp_con = amqp_connect()
     status_ch = amqp_con.channel()