~hyask/autopkgtest-cloud:skia/close_channels

Last commit made on 2024-06-27
Get this branch:
git clone -b skia/close_channels https://git.launchpad.net/~hyask/autopkgtest-cloud
Only Skia can upload to this branch. If you are Skia please log in for upload directions.

Branch merges

Branch information

Name:
skia/close_channels
Repository:
lp:~hyask/autopkgtest-cloud

Recent commits

9824a62... by Skia

fix: web: close channel to free resources

In case an exception in thrown, the channel would be left opened. If
this happens in a loop, that script can quickly have a big number of
dangling channels. I've observed more than 2k in a single night.

See previous commit for additional context.

Succeeded
[SUCCEEDED] pre_commit:0 (build)
[SUCCEEDED] unit_tests:0 (build)
[SUCCEEDED] build_charms:0 (build)
13 of 3 results
4eb7722... by Skia

fix: worker: close channels to free resources

See https://www.rabbitmq.com/docs/channels
This documentation is well written, and even has a section about channel
leaks. Those two channels that are now being closed were opened for
every test processed, meaning the number of opened channels on RabbitMQ
kept growing: this was exactly a channel leak.

This is a first patch closing two very obvious leaks, but there might be
others. However, this has already helped stabilize RabbitMQ resource
consumption by a lot. Time will tell if we have other similar situation.

f6dd880... by Tim Andersson

fix: web: ensure that autopkgtest.db.sha256 is symlinked

The functionality to symlink /home/ubuntu/public/autopkgtest.db to the
static directory which the flask web app serves files from was
duplicated for autopkgtest.db.sha256 - however a flag wasn't added for
this new statically served file, and the flag for the db being symlinked
was already set, meaning the `symlink_public_db` function wasn't
executed in production and thus autopkgtest.db.sha256 was never
symlinked or served via the web app.

Additionally to this, symlinking the sha256 file was in the same
try/except block as the db itself, where the exception was a
FileExistsError. The db symlink already existed, meaning the exception
was thrown, and thus the sha256 file wouldn't have been symlinked even
with a separate flag as described above.

This commit amends the issue by adding a second flag for the sha256
file, and symlinking the db and the sha256 file in a loop, separately.
The functionality beforehand in which the public directory is created,
was moved to it's own try/except block also.

02d581e... by Tim Andersson

Merge remote-tracking branch 'andersson123/rabbitmq-cleanup-fix'

94acef8... by Tim Andersson

Merge remote-tracking branch 'andersson123/proposed-package-images'

30688c2... by Tim Andersson

fix: cloud: make create-nova-image-with-proposed-package up to date

This commit introduces a new mechanism of loading creds for the
aforementioned script, given that we now use a wider variety of
datacentres, and this script was last updated nearly 5 years ago.

This script also adds two new dependencies to the cloud-worker charm:
- qemu-user-static
- binfmt-support
These are required for the script to execute bash commands on vm's on a
different arch to the host VM - i.e. on arm64 from an amd64 host.

It also modifies the mechanism in which the desired package is installed
from proposed, and does away with the sed line that existed before.

create-nova-image-with-proposed is a script, which hasn't been used in
*quite* a while, which rebuilds one of our adt images, with a specified
package from proposed.

We had to use this recently when the version of base-files in the
release pocket was breaking our tests, but the version of base-files
in the proposed pocket would fix said issue.

ae98e19... by Tim Andersson

Merge remote-tracking branch 'andersson123/stg-bos03-ppc64el-flavor-names'

3b00844... by Tim Andersson

service-bundle: add flavor names for bos03-ppc64el in staging

e7b3cd0... by Tim Andersson

Merge remote-tracking branch 'andersson123/add-djlint-to-ci'

f6a71d0... by Tim Andersson

fix: web: fix timer syntax in apache-request-monitoring.timer

This was missed in a previous MP, but the syntax in the timer file for
this unit was incorrect and thus was only triggering at 5 past midnight
rather than every 5 minutes.

This commit amends the issue by adding the proper syntax for running the
unit every 5 minutes.