[ClusterLabs] No node name in corosync-cmapctl output

Tomas Jelinek tojeline at redhat.com
Tue May 31 10:11:27 EDT 2022


Dne 31. 05. 22 v 15:34 Jan Friesse napsal(a):
> Hi,
> 
> On 31/05/2022 15:16, Andreas Hasenack wrote:
>> 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.
>>
> 
> wondering where is problem? name is not set so it's not in cmap, what is 
> (mostly) 1:1 mapping of config file. So this is expected, not a bug.

If I remember correctly, this "name will be uname -n if it's not set" is 
done in pacemaker. It is expected such name is not present in cmapctl 
output, as Honza said.

Regards,
Tomas

>>
>> 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?
> 
> Can you please share use case for this behavior? It shouldn't be be hard 
> to implement.
> 
> Regards,
>    Honza
> 
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>>
>> ClusterLabs home: https://www.clusterlabs.org/
>>
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
> 
> ClusterLabs home: https://www.clusterlabs.org/
> 



More information about the Users mailing list