[ClusterLabs] No node name in corosync-cmapctl output

Andreas Hasenack andreas at canonical.com
Wed Jun 1 08:36:54 EDT 2022


On Wed, Jun 1, 2022 at 10:18 AM Jan Friesse <jfriesse at redhat.com> wrote:
> On 31/05/2022 16:28, Andreas Hasenack wrote:
> > Hi,
> >
> > 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)"
> Ok, so you need only local node name - then why not to add
> ```
> [ "$NODE" == " ] && NODE=`uname -n`
> ```

Node name is only equal to `uname -n` if it's not set in the config
file. In debian, it's hardcoded to "node1". In Ubuntu, it's unset, so
it falls back to `uname -n`. I wanted the test script to work in both
cases, so it's the same test script for debian and ubuntu.

> No matter what, implementing resolving of just local node name would be
> really easy - implementing it clusterwise would be super hard (on

I'm using `crm_node -n` now, which seems to work for both cases (name
set or unset in corosync.conf).

More information about the Users mailing list