Move common requires code in to the common module so that
requires.py only contains the code which is specific to
reactive charms. This will allow for a subsequent patch which
creates a requires interface consumable by operator framework
charms.
Change-Id: I70037252cc7a677a9394929cb0cd17e9506ab624
having any corosync resource available.
Closes-bug: #1864804
Change-Id: I6eb3b9a816a93c4c7894e17935b1e7c8604592c5
Signed-off-by: José Pekkarinen <jose.pekkarinen@canonical.com>
Systemd support is in corosync, but currently the add_init_service
handles adding an upstart service only. This results in Charmed
Kubernetes having incorrectly monitored services.
Change-Id: I935613292ce6b78cf645469fda6d21b0aa695c28
Closes-Bug: #1843933
If a nic is not specified when setting up a vip resource then
corosync should just do the right thing. This change makes the nic
field optional as there is little benefit in using it.
Change-Id: I022a43df0a50a21df3c5f021dcd563da4d20db53
Ensure that CRM group members are sorted to avoid continual
data mutation on ha relations to the hacluster charm, which
causes restarts of services and vips.
Change-Id: I80ca19fa5f1d573827ea9cd7fe0f18c575518c8c
Closes-Bug: 1754149
The interface was setting ha.available immediately with no gating.
The hacluster charm sets a relation variable, clustered, when it has
enough peers and has setup corosync. This change updates the
interface to react to this setting. Only set ha.available when
clustered is set and True.
Change-Id: I23eb5e70537a62d5b9e5e24d09f37519b63a1717
Closes-Bug: #1749280
Switch to using json encoded data when passing configuration
to the hacluster charm.
Note that this requires an up-to-date version of the hacluster
charm, but ensures that data is presented consistently over the
relation due to deterministic encoding using json.
Change-Id: If2ace4b37f4152bf8bc44526b609a034433efc67
Closes-Bug: 1741304
Add code for managing DNS Entries via hacluster. This is part of the
effort to enable DNS HA in the reactive charms.
Change-Id: I1a6cdeffa3aa8657b957ba68cd09face27f93b27
Partial-Bug: #1727376
Fix bug I intrduces in:
77c2b25407
Where the haproxy resource was also added to vip group.
Ensure only VIP resources are added to the vip group.
Change-Id: Ie6b4ae89af74151ebb435c72a6df78174bbec87b
Allow for two VIPs on a single interface as in IPv4/IPv6 dual
stack scenarios.
Add missing group membership for VIPs.
Change-Id: Ieba9fd453efcd3d407baaeb8d0d6f3f71750060e
This change stops the requires side of the interface (in a reactive
charm) from setting data on the relation that's already been set.
This has the effect of not asking hacluster to do something every time
a reactive charm (e.g. designate) does update status.
Change-Id: I750f3c41a2f0447a47cfd19bab1d4958de4577f2
Related-Bug: #1708396
Add methods for setting up hacluster resources in interface to allow external
code to cleanly call <interface>.add_<resource> rather than having to import
specific methods from common.py