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
Port of https://github.com/juju/charm-helpers/pull/373 to this
interface for reactive charms. From the ch pull request:
On Eoan we saw errors like:
ERROR: syntax in primitive: Attribute order error: timeout must appear
before any instance attribute parsing 'primitive res_ks_cf9dea1_vip
ocfheartbeatIPaddr2 params ip=10.5.253.30 op monitor depth=0
timeout=20s interval=10s'
It would appear, that ordering matters, update resource config function
to the correct order.
Change-Id: I1f8a440fb0ad62192307946de42b9b176b3ef4c1
Partial-Bug: #1843830
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
Currently resources that are marked for deletion are not removed
from the local reactive charm resource map. This means that on
charm upgrade the charm will rerequest resources that
are marked for deletion as well as requesting they are deleted.
Change-Id: I68c57307c9e5b0a5743ac3105e48668b2e436957
* Add unit tests for common.py and requires.py.
* Update tox env for above.
* Update gitignore to ignore common kruft.
* CRM._parse did not add a space when constructing 'results' after
each argument of 'data'. This caused each element to run into the
last.
Change-Id: I2c35820149618aae02171c89b26bf29ee5e22344
The interface was failing to setup monitoring for Virtual IPs. If for
some reason a VIP failed on an instance corosync would fail to notice
it.
This change adds the op monitor setting to monitor VIPs.
Change-Id: If885340f04b8834fa4604ab742c7facfc6f316ad
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
The CRM.delete_services(...) and CRM.init_services(...) methods
update the internal list used to communicate with the hacluster
charm. This causes the list to continuously grow, which causes
the data in the hacluster relation to change. The constantly
updated relation change causes hooks to fire unintentionally.
Change-Id: Ica823027b1a3fafe277d862fae0a3cdcf5907774
Partial-Bug: #1737776
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
Allow for two VIPs on a single interface as in IPv4/IPv6 dual
stack scenarios.
Add missing group membership for VIPs.
Change-Id: Ieba9fd453efcd3d407baaeb8d0d6f3f71750060e
When requesting hacluster manage an init service the principle
sends options to hacluster but is currently erroneously sending
the word 'param' as well. eg
The pinciple is setting:
''res_designate_haproxy'': '' params op monitor interval="5s"''
When it should be:
''res_designate_haproxy'': ''op monitor interval="5s"''
Including the word 'params' evenutally causes hacluster to fail with:
ERROR: syntax in primitive: params op monitor interval=5s
Change-Id: Id35bb22692914dc3f94465d8ae7d62971a238d4e
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