[ClusterLabs] No node name in corosync-cmapctl output

Andreas Hasenack andreas at canonical.com
Tue May 31 09:16:46 EDT 2022


Hi,

corosync 3.1.6
pacemaker 2.1.2
crmsh 4.3.1

TL;DR
I only seem to get a "name" attribute in the "corosync-cmapctl | grep
nodelist" output if I set an explicit name in corosync.conf's
nodelist. If I rely on the default of "name will be uname -n if it's
not set", I get nothing.


I formed a test cluster of 3 nodes, and I'm not setting the name
attribute in the nodelist, so that it defaults to `uname -n`:
nodelist {
    node {
         nodeid: 1
        ring0_addr: k1
    }
    node {
        nodeid: 2
        ring0_addr: k2
    }
    node {
        nodeid: 3
        ring0_addr: k3
    }
}

The addresses "k1", "k2" and "k3" are fully resolvable (I know IPs are
better, but for this quick test it was simpler to use the hostnames).

crm status is happy:
root at k1:~# crm status
Cluster Summary:
  * Stack: corosync
  * Current DC: k3 (version 2.1.2-ada5c3b36e2) - partition with quorum
  * Last updated: Tue May 31 12:53:02 2022
  * Last change:  Tue May 31 12:51:55 2022 by hacluster via crmd on k3
  * 3 nodes configured
  * 0 resource instances configured

Node List:
  * Online: [ k1 k2 k3 ]

Full List of Resources:
  * No resources


But there is no node name in the corosync-cmapctl output:

root at k1:~# corosync-cmapctl |grep nodelist
nodelist.local_node_pos (u32) = 0
nodelist.node.0.nodeid (u32) = 1
nodelist.node.0.ring0_addr (str) = k1
nodelist.node.1.nodeid (u32) = 2
nodelist.node.1.ring0_addr (str) = k2
nodelist.node.2.nodeid (u32) = 3
nodelist.node.2.ring0_addr (str) = k3

I was expecting to have entries like "nodelist.node.0.name = k1" in
that output. Apparently I only get that if I explicitly set a node
name in nodelist.

For example, if I set the name of nodeid 1 to "explicit1":
    node {
        name: explicit1
        nodeid: 1
        ring0_addr: k1
    }

Then I get the name attribute for that nodeid only:
# corosync-cmapctl |grep nodelist
nodelist.local_node_pos (u32) = 0
nodelist.node.0.name (str) = explicit1
nodelist.node.0.nodeid (u32) = 1
nodelist.node.0.ring0_addr (str) = k1
nodelist.node.1.nodeid (u32) = 2
nodelist.node.1.ring0_addr (str) = k2
nodelist.node.2.nodeid (u32) = 3
nodelist.node.2.ring0_addr (str) = k3

Why not also use "uname -n" when "name" is not explicitly set in the
corosync nodelist config?


More information about the Users mailing list