Hi,

On Tue, May 31, 2022 at 1:35 PM Jan Friesse <[email protected]> wrote:
>
> 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.

It was surprising to me, because the node clearly has a name (crm_node -n).

> > 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.

The use case is a test script[1], which installs the package, starts
the services, and then runs some quick checks. One of the tests is to
check for the node name in "crm status" output, and for that it needs
to discover the node name.

Sure, plenty of ways to achieve that. Set it in the config to a known
name, or run "crm_node -n", or something else. The script is doing:
POS="$(corosync-cmapctl -q -g nodelist.local_node_pos)"
NODE="$(corosync-cmapctl -q -g nodelist.node.$POS.name)"

and I was surprised that there was no "name" entry. In this cluster
stack, depending on which layer you ask,  you may get different
answers :)


1. 
https://salsa.debian.org/ha-team/crmsh/-/blob/master/debian/tests/pacemaker-node-status.sh
_______________________________________________
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/

Reply via email to