~andersson123/autopkgtest-cloud:fix-amqp-status-collector

Last commit made on 2024-04-04
Get this branch:
git clone -b fix-amqp-status-collector https://git.launchpad.net/~andersson123/autopkgtest-cloud
Only Tim Andersson can upload to this branch. If you are Tim Andersson please log in for upload directions.

Branch merges

Branch information

Name:
fix-amqp-status-collector
Repository:
lp:~andersson123/autopkgtest-cloud

Recent commits

2739741... by Tim Andersson

fix: web: Add RuntimeDirectoryPreserve to amqp-status-collector.service

This fixes the following issue:
- When RabbitMQ is unresponsive, the amqp-status-collector script fails repeatedly
- When amqp-status-collector isn't running, the /run/amqp-status-collector/
  directory is removed, due to the behaviour of RuntimeDirectory
- When that directory is removed, running.json also gets removed
- Lots of other functionality in webcontrol depends upon this file. Such as
  requests, and browsing the /running or results pages

This commit fixes the issue by adding RuntimeDirectoryPreserve=yes to
amqp-status-collector.service. This flag, when set to restart or yes, causes
the runtime directory to not be removed when the systemd unit is down.

Failed
[FAILED] pre_commit:0 (build)
[WAITING] unit_tests:0 (build)
[WAITING] build_charms:0 (build)
13 of 3 results
a88aa40... by Tim Andersson

Merge remote-tracking branch 'andersson123/cloud-worker-tmp-cleanup'

ab17659... by Tim Andersson

feat: web: move ALLOWED_TEAMS to juju config instead of being hardcoded in request/submit.py

Failed
[FAILED] pre_commit:0 (build)
[WAITING] unit_tests:0 (build)
[WAITING] build_charms:0 (build)
13 of 3 results
d7cdec8... by Tim Andersson

Merge remote-tracking branch 'andersson123/lxd-metrics-update'

a603ce6... by Tim Andersson

fix: cloud: only check intended ips for autopkgtest-lxd-worker metrics

This commit adds a fix to the lxd metrics - we don't have a metric right now
which checks the remotes specified in the service bundle if they aren't present
in lxc remote list on the autopkgtest-lxd-worker.

So this checks the list of intended remotes and makes note of any intended remotes
which aren't in lxc remote list.

We also currently report on remotes which aren't specified in the service bundle,
but I think that's fine to leave in the metrics as it's indicative of issues.

This commit also writes lxc-remotes.json to the ~ directory on the lxd
worker, as the metrics script now uses this information to more
accurately report the metrics.

Succeeded
[SUCCEEDED] pre_commit:0 (build)
[SUCCEEDED] unit_tests:0 (build)
[SUCCEEDED] build_charms:0 (build)
13 of 3 results
86262a8... by Tim Andersson

feat: cloud: add worker tmp cleanup config

tmp doesn't get automatically cleaned up periodically, only on boot. This is
problematic as any edge case worker errors that cause the worker script to
exit before cleaning up the logfile directory leaves the entire directory
in tmp, leading to low disk space errors.

This commit introduces a config file which removes files and directories
in /tmp that haven't been modified in the last 30 days.

It adds the tmp cleanup config to the service bundle common
options for the autopkgtest-cloud-worker application.

It also adds the config option to layer.yaml.

And it also writes the cleanup config to /etc/tmpfiles.d/tmp.conf

Succeeded
[SUCCEEDED] pre_commit:0 (build)
[SUCCEEDED] unit_tests:0 (build)
[SUCCEEDED] build_charms:0 (build)
13 of 3 results
7ee57c6... by Tim Andersson

Merge remote-tracking branch 'andersson123/pull-amqp-push-amqp'

6cdec02... by Tim Andersson

feat: cloud: add pull-amqp and push-amqp scripts

pull-amqp is a script that pulls all message from a queue. If the script
is passed a regex, it will only pull the messages from the queue that
match said regex. If the --empty arg is passed, it'll remove said
messages.

push-amqp is a script that simply pushes a message to a specified queue.
The two scripts can be used in conjunction to easily shift specific
queue messages from one queue to another, removing the need to craft a
retry-autopkgtest-regressions command to shift tests between queues.

push-amqp can also be used to push messages to other queues, like the
sqlite-writer queue or the download-results queue.

Fixes bug LP: #2059235

Failed
[FAILED] pre_commit:0 (build)
[WAITING] unit_tests:0 (build)
[WAITING] build_charms:0 (build)
13 of 3 results
9a8aaad... by Tim Andersson

refactor: web&cloud: replace configparser.read with configparser.read_file or read_string

Also refactors all duplicate usage of configparser.read and shares common
functions from helpers/utils.py, and amends unit tests in line with
these changes

Succeeded
[SUCCEEDED] pre_commit:0 (build)
[SUCCEEDED] unit_tests:0 (build)
[SUCCEEDED] build_charms:0 (build)
13 of 3 results
751887f... by Tim Andersson

Merge remote-tracking branch 'ubuntu-release/confirm-using-all'