~cjwatson/launchpad-layers:turnip-storage-literal-ipv6-address

Last commit made on 2023-09-05
Get this branch:
git clone -b turnip-storage-literal-ipv6-address https://git.launchpad.net/~cjwatson/launchpad-layers
Only Colin Watson can upload to this branch. If you are Colin Watson please log in for upload directions.

Branch merges

Branch information

Name:
turnip-storage-literal-ipv6-address
Repository:
lp:~cjwatson/launchpad-layers

Recent commits

18c4c3f... by Colin Watson

Handle literal IPv6 addresses in turnip-storage

My local turnip deployment sometimes gets itself into a state where the
individual units still have IPv6 addresses but no IPv4 addresses (until
I run `systemctl restart systemd-networkd.service` on each of them
manually). This has the very annoying consequence of getting the turnip
charm hooks badly wedged, because they try to mount the NFS storage
volume using its IPv6 address without using the correct literal address
syntax.

While the units losing their IPv4 addresses is probably a bug somewhere
else, it makes sense to handle mounting over IPv6 anyway, and it makes
it much less difficult to recover from this situation.

Succeeded
[SUCCEEDED] lint:0 (build)
11 of 1 result
6ca1d67... by Colin Watson

Clear flags more carefully on upgrade-charm

According to
https://charmsreactive.readthedocs.io/en/latest/charms.reactive.bus.html#charms.reactive.bus.dispatch,
most reactive handlers are invoked in an undefined order. This means
that the following sequence is possible if you try to upgrade the (e.g.)
`launchpad-admin` charm and change its `build_label` at the same time:

  reactive/ols.py:upgrade_charm
    clears ols.service.installed, ols.configured, service.configured
  reactive/ols.py:install_service
    unpacks new payload; sets ols.service.installed
  reactive/ols.py:handle_config_changes
    clears ols.configured, service.configured
  reactive/ols.py:update_payload
    clears ols.service.installed, ols.configured, service.configured
  reactive/launchpad-admin.py:configure
    crashes because `production-configs/launchpad-db-lazr.conf` doesn't
    exist yet in the new unpacked payload

`update_payload` clearing `ols.service.installed` results in some
redundant work, but that's not a serious problem. The problem here is
that the `launchpad.db.configured` flag is still set at the point when
the dispatch logic decides whether to invoke `launchpad-admin`'s
`configure` handler; as a result, it may do so almost immediately after
unpacking the new payload rather than carefully working its way back up
the stack of layers, configuring `launchpad-payload`, then
`launchpad-base`, then `launchpad-db`.

I think the least bad workaround for this is to observe that
`charms.reactive.bus.dispatch` documents that all `@hook` handlers are
invoked first. We can therefore add a few `@hook` handlers that clear
flags for each layer, and thereby ensure that things go in the right
order when upgrading a charm and changing its build label at the same
time.

Succeeded
[SUCCEEDED] lint:0 (build)
11 of 1 result
178fe3f... by Colin Watson

Revert "Restore Python 3.6 compatibility in turnip-base"

This reverts commit 466a8348106b0a14e4c1cf18fbafe13d1f927bad. turnip is
deployed on focal now.

Succeeded
[SUCCEEDED] lint:0 (build)
11 of 1 result
42d39a9... by Colin Watson

turnip-base: Avoid comma in Nagios service description

On production, the comma caused Nagios to fail to parse the collected
configuration with errors such as:

  Error: Could not find a service matching host name 'lp-prodstack-git-juju-f2a69b-prod-launchpad-git-17' and description 'Git E2E git://git.launchpad.net/launchpad - hint: check nfs-ganesha.service if all appservers are bad' (config file '/etc/nagios3/conf.d/servicegroups/prompt-critical.cfg', starting on line 2)
  Error: Could not expand member services specified in servicegroup (config file '/etc/nagios3/conf.d/servicegroups/prompt-critical.cfg', starting on line 2)

Succeeded
[SUCCEEDED] lint:0 (build)
11 of 1 result
77ce25b... by Ines Almeida

Add storm_cache_size param to launchpad-db-lazr.conf

9f9bc67... by Ines Almeida

Add storm_cache_size param to launchpad-db config.yaml

8b7d25a... by Colin Watson

Add interface to publish Apache virtual host configuration

This implements the interface described under "Using the vhost-config
relation" in https://git.launchpad.net/apache2-charm/tree/README.md. It
will allow us to put the desired Apache frontend configuration in the
corresponding service charm and then just add some relations to make
everything work. I have a functioning prototype of this for the
librarian.

Succeeded
[SUCCEEDED] lint:0 (build)
11 of 1 result
300b0d9... by Ines Almeida

Create interface for txpkgupload charm

This interface has 2 main goals:
 - Set the `<interface>.available` and `<interface>.configuration.available` flags within the charms
 - Send configuration data from the upload processor to the txpkgupload using `set_config()` in `provides.py`, and fetching it from the txpkgupload charm directly once the `<interface>.configuration.available` flag is on.

0a96b82... by Ines Almeida

Create interface for txpkgupload and queue processors

466a834... by Colin Watson

Restore Python 3.6 compatibility in turnip-base

turnip is still deployed on bionic, so its layers need to retain
compatibility with Python 3.6 for now.

Succeeded
[SUCCEEDED] lint:0 (build)
11 of 1 result