Tim Andersson has proposed merging
~andersson123/autopkgtest-cloud:lxd-metrics-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/460176
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of
~andersson123/autopkgtest-cloud:lxd-metrics-fix into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/metrics b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/metrics
index 7224dd3..3261319 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/metrics
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/metrics
@@ -160,4 +160,12 @@ influx_client = InfluxDBClient(
INFLUXDB_DATABASE,
)
-influx_client.write_points(get_units() + get_remotes())
+if "DRY_RUN" not in os.environ.keys():
+ influx_client.write_points(get_units() + get_remotes())
+else:
+ units = get_units()
+ rems = get_remotes()
+ print("units:")
+ print(json.dumps(units, indent=2))
+ print("remotes:")
+ print(json.dumps(rems, indent=2))
--
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