This patch adds the service user rotation feature, which provides two
actions:
- list-service-usernames
- rotate-service-user-password
The first lists the possible usernames that can be rotated. The
second action rotates the service, and is tested via the func-test-pr.
Change-Id: Ia94ab3d54cd8a59e9ba5005b88d3ec1ff87019b1
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1029
Use the coordination module to manage restarting the rabbitmq
services. This is to ensure that restarts are only
performed on one unit at a time. This helps prevent
situation which can cause the cluster to become split
brained (eg if two or more nodes are restarted at the same
time).
* Manually run _run_atstart & _run_atexit method when actions
are run as this does not happen automatically and is needed by
the coordination layer.
* Replace restart_on_change decorator with
coordinated_restart_on_change. coordinated_restart_on_change
includes logic for requesting restart locks from the coordination
module.
* The coordination module works via the leader and cluster events so
the hooks now include calls to check_coordinated_functions
which will run any function that is waiting for a lock.
* Logic has been added to check for the situation where a hook is
being run via the run_deferred_hooks actions. If this is the
case then restarts are immediate as the action should only be run
on one unit at a time.
Change-Id: Ia133c90a610793d4da96d3400a3906b801b52b73
to make it user friendly (rabbitmq)
"rabbitmqctl cluster_status" uses escape codes to color/highlight the
output, and it does not have a way to suppress this. This makes the
output to the command "juju run-action rabbitmq-server/leader
cluster-status" not user friendly and difficult to read.
Add the json formatting option to the rabbitmqctl command and use
the json.dumps method to get a user friendly output.
Add unit test.
Closes-Bug: #1943198
Change-Id: I24380e24ff1edbede9c2db1671a4fc05d5a7cc63
For newer RabbitMQ versions, switch to using the new ini style
configuration file format (rabbitmq.conf vs rabbitmq.config).
This allows the charm to configure a wider set of options and
is needed to support limitation of TLS versions use for on the
wire encryption.
Upgrades at RabbitMQ 3.7.0 should switch from old to new format
and file name.
Change-Id: I6deda5ecf5990d527e22373540074d2a4b7bad38
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/668
When checking queues, display not only queue names but also their
size (number of messages). Return sizes as integers.
Also update parsing to account for a rabbitmqctl output change in
focal.
Closes-Bug: #1838964
Change-Id: I2014f065393a1ad4b594363ade6c01ccec4fb71a
This change adds a `force-boot` action which sets the `force_boot`
flag and restarts the RabbitMQ broker. This action can be used if a
broker refuses to start because the master of a queue is not
available.
Also add appropriate unit tests.
Change-Id: I8b01d1d668e18116c7f8b1fc56f197620a10c91f
Partial-Bug: #1828988
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
There are race conditions in which the forget_cluster_node can get
executed against a node that is in the process of joining the cluster.
This change moves forget_cluster_node to an action that can be
performed by the administrator. The asses_cluster_status has been
updated to check for departed nodes and set status pointing toward the
use of the new forget-cluster-node action.
Closes-Bug: #1818260
Change-Id: I64bcdb9811a3816b394395fac19f5af5cc9f9006
Add status inquiry list-unconsumed-queues action to allow operators to
determine which queues are not being consumed in each RMQ vhost. Useful for
troubleshooting message queue volume alerts.
Closes-Bug: 1767437
Change-Id: Icdd0b8c4db607701bc5e33d86e263b6a5f1bb7f5
In python3 check_output() returns bytes, while python2 returns str,
passing universal_newlines=True assures it will return str no matter
what python version is used.
Change-Id: I34a490bc4142e78d725ad0973607587984ec7c49
Related-Bug: 1716981
All contributions to this charm where made under Canonical
copyright; switch to Apache-2.0 license as agreed so we
can move forward with official project status.
Change-Id: Ie4fc5353520eb3c3c0d14b1aa35703aeaea6ac40
Adds pause and resume unit to the charm such that the
charm stays paused during maintenance operations.
Change-Id: I418a7e115b01ec1f108402de9e070c8bfa8f6003
Partial-Bug: 1558642