~pappacena/turnip:fix-masked-data-storage

Last commit made on 2020-08-24
Get this branch:
git clone -b fix-masked-data-storage https://git.launchpad.net/~pappacena/turnip
Only Thiago F. Pappacena can upload to this branch. If you are Thiago F. Pappacena please log in for upload directions.

Branch merges

Branch information

Name:
fix-masked-data-storage
Repository:
lp:~pappacena/turnip

Recent commits

18101a3... by Thiago F. Pappacena

Adding some more checks for data storage

1877517... by Thiago F. Pappacena

Ensuring data is mounted in layer:turnip-storage charm lifecyle

85753ca... by Colin Watson

charm: Store RabbitMQ broker URL in unitdata

Merged from https://code.launchpad.net/~cjwatson/turnip/+git/turnip/+merge/389651

ce46281... by Colin Watson

charm: Reload systemd after unmasking srv-turnip-data.mount

Merged from https://code.launchpad.net/~cjwatson/turnip/+git/turnip/+merge/389648

67245f8... by Colin Watson

charm: Store RabbitMQ broker URL in unitdata

It looks as though amqp relation data is only accessible when running
hooks for the amqp relation, so get_rabbitmq_url can fail when called
from an nfs relation hook. Stash the result in unitdata instead so that
we can access it from other hooks.

77edec4... by Colin Watson

charm: Reload systemd after unmasking srv-turnip-data.mount

CI is currently showing suspicious symptoms like this:

  2020-08-20 23:54:36 DEBUG nfs-relation-changed Created symlink /etc/systemd/system/srv-turnip-data.mount → /dev/null.
  2020-08-20 23:54:36 DEBUG juju-log nfs:17: Writing file /lib/systemd/system/srv-turnip-data.mount root:root 644
  2020-08-20 23:54:37 DEBUG nfs-relation-changed Removed /etc/systemd/system/srv-turnip-data.mount.
  ...
  2020-08-20 23:54:56 DEBUG amqp-relation-changed Failed to start turnip-celery.service: Unit srv-turnip-data.mount is masked.

But srv-turnip-data.mount shouldn't be masked at this point, because
/etc/systemd/system/srv-turnip-data.mount (the masking symlink) was
removed. systemctl(1) doesn't explicitly say that unmask has the
additional effect of daemon-reload, so my best theory is that we should
explicitly call daemon-reload after unmask.

145b7ec... by Colin Watson

charm: Fix handling of rabbitmq relations

Merged from https://code.launchpad.net/~cjwatson/turnip/+git/turnip/+merge/389630

6475a1a... by Thiago F. Pappacena

Moving rabbitmq server from system-dependencies.txt to dependencies-devel.txt

Merged from https://code.launchpad.net/~pappacena/turnip/+git/turnip/+merge/389629

c5ab05e... by Colin Watson

charm: Fix handling of rabbitmq relations

Avoid trying to start turnip-celery when its code and storage
prerequisites are potentially unavailable.

Rearrange how we request access to rabbitmq. Using the 'available'
state provided by the rabbitmq interface means we can guarantee that the
broker URL will always be available at that point, simplifying
configuration. To ensure that things work if the rabbitmq relation is
removed and re-added, we must explicitly clear any previous access
request so that the rabbitmq-server charm notices that the relation data
has changed.

89c336c... by Thiago F. Pappacena

Moving rabbitmq server from system-dependencies.txt to dependencies-devel.txt