Commit Graph

5 Commits

Author SHA1 Message Date
Liam Young 571f4864c2 Differentiate connected and ready hosts
rabbitmq_hosts is used to check which hosts are connected and also
which are ready. Split these into two different methods and update
the existing rabbitmq_hosts to be a wrapper around
rabbitmq_ready_hosts so that when charms build their contexts they
do not include rabbit units which are not ready for client
connections.

Change-Id: Ic8b669fedfef74ed24db733e01c5dfc0fd079abd
Closes-Bug: #1796886
2020-06-25 09:56:35 +00:00
James Page 4e22b80db2 Ensure rabbitmq host list is consistent
Sort the list of rabbitmq hosts before returning to the calling
function ensuring that the list is always presented in the same
order.  This means that its use in configuration files will be
consistent between hook invocations, avoiding service restarts
as the order won't be random.

Change-Id: I3fe80c389930569a3b4d92e44870e8f949bb62f3
Closes-Bug: 1729020
2017-11-02 08:19:22 +00:00
James Page ace0c46caf Add support for network spaces
Automatically set the private-address relation key to the
network space binding for the relation the interface is
supporting for Juju >= 2.0; for older Juju versions continue
to use "unit-get private-address".

This change also adds the ability for the consuming charm
to override the hostname provided on the relation using the
option hostname parameter.

Change-Id: Iee0d1ac7168fe0c32deaf03add5cb261da6c2a79
2017-01-25 17:35:38 +00:00
Liam Young adc61d2ff9 Add method to decode Rabbit CA cert
If rabbit is running in SSL mode then it will present a base64
encoded CA cert down the relation. Add a methode to retrieve and
decode the cert.

Change-Id: I1806a5d1bcac6a7ac80f655d96f951f84e9db521
2016-08-01 11:22:30 +00:00
James Page 496cbe6dba Re-initialize repositor 2016-03-10 10:23:06 +00:00