charm-rabbitmq-server/hooks
Alex Kavanagh 81f08ab769 Fix issue where charms aren't clustered but RMQ is
Due to the @cache decorator in the code, it was possible to get the
charm into a state where RMQ is clustered, but the charm doesn't record
it.  The charm 'thinks' it is clustered when it has set the 'clustered'
key on the 'cluster' relation.  Unfortunately, due to the @cached
decorator it's possible in the 'cluster-relation-changed' hook to have a
situation where the RMQ instance clusters during the hook execution and
then, later, when it's supposed to writing the 'clustered' key, it reads
the previous cached value where it wasn't clustered and therefore
doesn't set the 'clustered' key.  This is just about the only
opportunity to do it, and so the charm ends up being locked.

The fix was to clear the @cache values so that the nodes would be
re-read, and this allows the charm to then write the 'clustered' key.

Change-Id: I12be41a83323d150ba1cbaeef64041f0bb5e32ce
Closes-Bug: #1975605
2023-01-06 20:39:50 +00:00
..
lib Remove unused apt_install import. 2014-12-18 17:49:49 +00:00
amqp-relation-changed Refactoring to support use of openstack charm helpers 2013-03-18 10:28:17 +00:00
certificates-relation-changed Add support for certs relation 2018-10-29 17:11:50 +00:00
certificates-relation-joined Add support for certs relation 2018-10-29 17:11:50 +00:00
cluster-relation-broken Break cluster when relation is broken, as this will be run on the unit that's just been removed 2015-03-11 16:11:55 +00:00
cluster-relation-changed Refactoring to support use of openstack charm helpers 2013-03-18 10:28:17 +00:00
cluster-relation-joined Refactoring to support use of openstack charm helpers 2013-03-18 10:28:17 +00:00
config-changed Add missing hook and template 2013-05-21 06:59:02 +01:00
dashboards-relation-joined Rabbitmq metrics and splitbrain detection 2022-01-17 18:32:38 +11:00
ha-relation-changed Refactoring to support use of openstack charm helpers 2013-03-18 10:28:17 +00:00
ha-relation-joined Refactoring to support use of openstack charm helpers 2013-03-18 10:28:17 +00:00
install Move cron max file age calculation to rabbit_utils 2021-08-19 15:12:17 +02:00
install.real Ensure python2 is installed before hook execution 2015-09-22 14:55:23 +01:00
leader-deposed Add leader-settings-changed hook 2015-03-13 11:08:28 +00:00
leader-elected Add leader-settings-changed hook 2015-03-13 11:08:28 +00:00
leader-settings-changed Add leader-settings-changed hook 2015-03-13 11:08:28 +00:00
nrpe-external-master-relation-changed Enable nrpe-external-master-relation. Use charmhelpers (embedded for now) 2013-11-15 11:15:16 -08:00
post-series-upgrade Series Upgrade 2018-09-17 14:49:41 +02:00
pre-series-upgrade Series Upgrade 2018-09-17 14:49:41 +02:00
prometheus-rules-relation-created Rabbitmq metrics and splitbrain detection 2022-01-17 18:32:38 +11:00
prometheus-rules-relation-joined Rabbitmq metrics and splitbrain detection 2022-01-17 18:32:38 +11:00
rabbit_net_utils.py Add support for certs relation 2018-10-29 17:11:50 +00:00
rabbit_utils.py Fix issue where charms aren't clustered but RMQ is 2023-01-06 20:39:50 +00:00
rabbitmq_context.py Use cluster strategy 'ignore' for install 2021-11-24 13:17:03 +00:00
rabbitmq_server_relations.py Fix issue where charms aren't clustered but RMQ is 2023-01-06 20:39:50 +00:00
scrape-relation-broken Rabbitmq metrics and splitbrain detection 2022-01-17 18:32:38 +11:00
scrape-relation-created Rabbitmq metrics and splitbrain detection 2022-01-17 18:32:38 +11:00
scrape-relation-joined Rabbitmq metrics and splitbrain detection 2022-01-17 18:32:38 +11:00
ssl_utils.py Implementation of deferred restarts 2021-04-09 21:11:30 +00:00
start Rebase on trunk changes 2014-03-26 10:23:01 +00:00
stop Rebase on trunk changes 2014-03-26 10:23:01 +00:00
update-status Add update-status hook and ensure that assessment is made of status even on hooks that are not actually registered in the charm codebase 2015-10-21 14:55:23 +01:00
upgrade-charm Move cron max file age calculation to rabbit_utils 2021-08-19 15:12:17 +02:00
upgrade-charm.real Ensure that python3 really is installed on upgrade charm 2020-12-22 20:20:46 +00:00