dns-ha doesn't properly update IP

Bug #1711476 reported by Billy Olsen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack HA Cluster Charm
Fix Released
Medium
Billy Olsen

Bug Description

Enabling DNS-HA configures the pacemaker resources 'res_{service}_[public|private|internal]_hostname' with only a single IP address, which causes the ocf script to not update the dnsresource-record in MAAS (and if it were to do so, it would update it to the same address anyways).

Therefore the intent of the dns-ha is broken as only a single IP address will get set within the charm.

As an example, here is crm configure show output of a sample 2 node setup. Node Red has IP address 172.16.0.3 and node green has the address 172.16.0.4:

root@green:/etc/apt/sources.list.d# crm configure show
node 1000: red
node 1001: green
primitive res_keystone_public_hostname ocf:maas:dns \
        params fqdn=keystone.maas ip_address=172.16.0.3 maas_url="http://192.168.10.122/MAAS/api/2.0" maas_credentials="7WuvSGRqJjuMy2UPKC:5EXLnLRPBHWCMS5QHJ:gbyhgfR49nNDznAEDmtRUWMmNn7Brwms"
primitive res_ks_haproxy lsb:haproxy \
        op monitor interval=5s
group grp_keystone_hostnames res_keystone_public_hostname
clone cl_ks_haproxy res_ks_haproxy
property cib-bootstrap-options: \
        have-watchdog=false \
        dc-version=1.1.14-70404b0 \
        cluster-infrastructure=corosync \
        no-quorum-policy=stop \
        stonith-enabled=false \
        last-lrm-refresh=1503009637
rsc_defaults rsc-options: \
        resource-stickiness=100

Tags: sts
Changed in charm-keystone:
status: Triaged → In Progress
milestone: none → 17.08
Revision history for this message
Billy Olsen (billy-olsen) wrote :
no longer affects: charm-keystone
Changed in charm-hacluster:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Billy Olsen (billy-olsen)
milestone: none → 17.08
James Page (james-page)
Changed in charm-hacluster:
milestone: 17.08 → 17.11
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-hacluster (master)

Reviewed: https://review.openstack.org/497726
Committed: https://git.openstack.org/cgit/openstack/charm-hacluster/commit/?id=8d81e415765d82ae8ee7640a5a89572d92b72b47
Submitter: Jenkins
Branch: master

commit 8d81e415765d82ae8ee7640a5a89572d92b72b47
Author: Billy Olsen <email address hidden>
Date: Thu Aug 24 20:53:21 2017 -0700

    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

Changed in charm-hacluster:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-hacluster (stable/17.08)

Fix proposed to branch: stable/17.08
Review: https://review.openstack.org/508389

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-hacluster (stable/17.08)

Reviewed: https://review.openstack.org/508389
Committed: https://git.openstack.org/cgit/openstack/charm-hacluster/commit/?id=8e6e68161ac5cf762ee3553c41faae00e1e68419
Submitter: Jenkins
Branch: stable/17.08

commit 8e6e68161ac5cf762ee3553c41faae00e1e68419
Author: Billy Olsen <email address hidden>
Date: Thu Aug 24 20:53:21 2017 -0700

    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
    (cherry picked from commit 8d81e415765d82ae8ee7640a5a89572d92b72b47)

Changed in charm-hacluster:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-hacluster (stable/17.08)

Related fix proposed to branch: stable/17.08
Review: https://review.openstack.org/511034

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charm-hacluster (stable/17.08)

Reviewed: https://review.openstack.org/511034
Committed: https://git.openstack.org/cgit/openstack/charm-hacluster/commit/?id=054ab548dee7cc03e46346fed1b2af4cd60a4490
Submitter: Jenkins
Branch: stable/17.08

commit 054ab548dee7cc03e46346fed1b2af4cd60a4490
Author: Billy Olsen <email address hidden>
Date: Tue Oct 10 13:46:34 2017 -0700

    Sync latest charm-helpers stable

    The latest charm-helpers stable contains a necessary change being
    able to distinguish the os-internal-hostname configuration for
    DNS-HA solutions.

    Additionally, the make sync target in Makefile needs to point to
    the openstack charmers stable branches as the bzr branch of the
    charm-helpers project has been purged.

    Change-Id: I7bef7959987e079252f0a965fbd2ecee22392f1b
    Related-Bug: #1711476

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.