Commit Graph

10 Commits

Author SHA1 Message Date
Ryan Beisner 6ed2bb0943
Standardize auxiliary file location across os-charms
Change-Id: Ifaa5453bc0703c77184184e05c53d21649f6b92e
Closes-Bug: #1843826
2019-09-12 15:51:49 -05:00
Liam Young 3d34611e88 Add support for maas stonith
The change adds a stonith plugin for maas and method for creating
stonith resources that use the plugin.

Change-Id: I825d211d68facce94bee9c6b4b34debaa359e836
2019-04-03 10:49:22 +00:00
Alex Kavanagh 02b406b6f3 Convert charm to Python 3
Change-Id: Ib7cc06b3b42f26f725a9ea79f09189cc72952d29
2019-03-14 12:40:07 +00:00
Alex Kavanagh 175f1e2d2e Add retry handling to MaaS OCF DNS API calls
This patchset adds retries to the MaaS API calls with the the
maas_dns.py script to allow Maas/PostGRES to 'settle' during failover
situations.  This should enable corosync to successfully update the DNS
records by allowing extra time for MaaS to settle and to detect when the
transient failures from the MaaS occur.

Closes-Bug: #1817429
Change-Id: I5180508ba236c60b7b677e226914e7fcd13c3020
2019-02-27 11:40:12 +01:00
Liam Young 526ffd7587 Create DNS records when using DNS HA
Deficiencies in the older maas API client that is used to manage
DNS records for DNS HA prevent DNS records being created. This
change creates the DNS records by directly interacting with the REST
maas api (v2). If the old approach of pre-creating the DNS records is
followed then those are used rather than creating new ones.

Change-Id: I6e1d7e5f0a7d813c78dfc1e78743ae7b218fbd01
Closes-Bug: 1764832
2018-04-23 17:26:47 +00:00
David Ames d325385b12 Fix ocf maas_dns defaults
Though the metadata has a default setting for cfg_dir, the ocf script
did not have the OCF_RESKEY_cfg_dir variable populated. Other ocf
resource scripts set defaults early. This change mimics that
solution.

Change-Id: I4ceb99b45a284a6ba25fb5b5b6372145917ca444
2017-10-25 12:02:36 -07:00
Billy Olsen 8d81e41576 Change MAAS DNS OCF to read IP from file
The MAAS DNS ocf resource is created specifying the IP address
from the leader node. When the resource is moved to another node
the IP address is not updated because the DNS record already
points to the leader's IP address. This means that the DNS record
will never be updated with any other unit's IP address when the
resource is moved around the cluster.

The IP address to use for the DNS record should be stored in the
pacemaker resource as the configuration is the same across the
entire cluster. This change makes it so that the IP address that
should be bound is written to a file in /etc/maas_dns/$resource_name
and used by the ocf:maas:dns resource when managing the DNS
resource records.

Migration is handled by checking the current version of the MAAS
OCF resource file and determining if the OCF_RESOURCE_INSTANCE
(the name of the resource) is present in the file.

Change-Id: If4e07079dd66dac51cd77c2600106b9b562c2483
Closes-Bug: #1711476
2017-09-20 17:08:44 -07:00
David Ames 41dc7b3fad DNS HA
Allow DNS be the HA resource in leiu of a VIP when using MAAS 2.0.
Added an OCF resource dns
Added maas_dns.py as the api script to update a MAAS 2.0 DNS resource
record.

Charmhelpers sync to pull in DNS HA helpers

Change-Id: I0b71feec86a77643892fadc08f2954204b541d01
2016-06-23 09:45:49 +01:00
Adam Gandelman d9ceb58093 Use rbd OCF from Quantal instead of Raring. 2013-02-27 17:37:10 -08:00
Adam Gandelman 1d077ee509 Ship RBD OCF RA /w charm.
The rbd OCF was not included with the ceph-resource-agents package
until quantal. There is currently not an easy way to install from
another repository as it will also upgrade other ceph package in the
principle service.  As a temporary alternative, ship the rbd OCF
/w the charm for 12.04.

Also improve logging for cases where principle has not passed minimum
required corosync config.
2013-02-25 16:27:11 -08:00