commit 284bd30809ee31b5ba6311c4054aa12f34dfb23f
Author: James Page <email address hidden>
Date: Tue May 24 14:18:37 2016 +0100
Refactor hostname resolution via DNS
Due to oddities in the way that DNS used to work on older MAAS
versions, specifically when using LXC containers, the charm
would endeavour to discover a full forward/reverse resolvable
hostname/ip address to use when clustering with peers, and to
set the internal nodename for each RMQ instance.
Changes in MAAS 2.0 mean that an IP address may resolve to more
than 1 DNS record, making identification via DNS of the FQDN
problematic.
The charm actively manages /etc/hosts with IP address/hostname for
all peer units in a RMQ cluster using the cluster relation; make
use of this feature to allow the internal nodename of each unit
to actually be the hostname of the server, as the charm is ensuring
the resolvability of hostnames within the cluster.
To avoid races where the lead unit has not had its hostname written
to /etc/hosts, only cluster with the lead unit in the hook execution
where this actually happens.
Change-Id: Ia400c3b6e2cb1a5f2ee6f5fe98b5437033e02024
Closes-Bug: 1584902
(cherry picked from commit 7ffdcd204e6550cf5dcad57ed07ea302c1eedcce)
Reviewed: https:/ /review. openstack. org/322340 /git.openstack. org/cgit/ openstack/ charm-rabbitmq- server/ commit/ ?id=284bd30809e e31b5ba6311c405 4aa12f34dfb23f
Committed: https:/
Submitter: Jenkins
Branch: stable/16.04
commit 284bd30809ee31b 5ba6311c4054aa1 2f34dfb23f
Author: James Page <email address hidden>
Date: Tue May 24 14:18:37 2016 +0100
Refactor hostname resolution via DNS
Due to oddities in the way that DNS used to work on older MAAS
versions, specifically when using LXC containers, the charm
would endeavour to discover a full forward/reverse resolvable
hostname/ip address to use when clustering with peers, and to
set the internal nodename for each RMQ instance.
Changes in MAAS 2.0 mean that an IP address may resolve to more
than 1 DNS record, making identification via DNS of the FQDN
problematic.
The charm actively manages /etc/hosts with IP address/hostname for
all peer units in a RMQ cluster using the cluster relation; make
use of this feature to allow the internal nodename of each unit
to actually be the hostname of the server, as the charm is ensuring
the resolvability of hostnames within the cluster.
To avoid races where the lead unit has not had its hostname written
to /etc/hosts, only cluster with the lead unit in the hook execution
where this actually happens.
Change-Id: Ia400c3b6e2cb1a 5f2ee6f5fe98b54 37033e02024 f5dcad57ed07ea3 02c1eedcce)
Closes-Bug: 1584902
(cherry picked from commit 7ffdcd204e6550c