~openstack-charmers-next/charms/xenial/rabbitmq-server/trunk

Viewing all changes in revision 146.

  • Committer: James Page
  • Date: 2016-05-26 08:58:45 UTC
  • Revision ID: james.page@ubuntu.com-20160526085845-eeetq30lw53eypat
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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: