[Description]
The hacluster charm doesn't properly support the hanode-relation-departed hook. This is also indicated in the TODO list for the charm itself. This relationship is needed to be handled in order to set the appropriate quorum count.
When destroying or removing a service unit from the hacluster, the node remains as an offline node in the corosync status output. In order to fully remove the node, the corosync service should first be stopped on the node which is being removed, then removed from the cluster resource manager on one of the remaining nodes.
Note, when a unit is added after removing 1 or more units, the charm will appropriately adjust the nodelist or the expected_votes count to be the appropriate number of votes expected in a cluster.
[Impact]
The number of nodes required for quorum may be incorrect causing inability to form quorum in cluster for small number of nodes. Two node specialty case may not be enabled when number of nodes is 2.
[Test Case]
1. Deploy a service w/ 3 nodes which accepts the hacluster subordinate charm (e.g. keystone)
2. Related service and hacluster
3. Remove one of the service units (either juju destroy-unit or juju remove-unit)
Observe:
- /etc/corosync/corosync.conf still contains an incorrect nodelist (unicast) or expected_votes (multicast)
- two_node option is not specified in quorum section
- sudo crm status continues to report the removed unit as offline
Yes, can confirm. After following the Test Case above, crm status gives:
sudo crm status default- 1 default- 1 (version 1.1.14-70404b0) - partition with quorum
Last updated: Thu Jan 5 13:46:18 2017 Last change: Thu Jan 5 12:55:37 2017 by hacluster via crmd on juju-0388cc-
Stack: corosync
Current DC: juju-0388cc-
3 nodes and 4 resources configured
Online: [ juju-0388cc- default- 1 juju-0388cc- default- 2 ] default- 3 ]
OFFLINE: [ juju-0388cc-
Full list of resources:
Resource Group: grp_ks_vips ks_ens2_ vip (ocf::heartbeat :IPaddr2) : Started juju-0388cc- default- 1 default- 1 juju-0388cc- default- 2 ] default- 3 ]
res_
Clone Set: cl_ks_haproxy [res_ks_haproxy]
Started: [ juju-0388cc-
Stopped: [ juju-0388cc-