[ClusterLabs Developers] Trouble with crm_node -l output

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Tue Nov 8 07:45:24 EST 2016

Hi guys,

I am currently struggling with "crm_node --list" output. I need to get the list
of existing nodes in the cluster from my resource agent ("past and current"
nodes as stated in crm_node man page).

However, the "crm_node --list" output is quite different depending on the
system you are running it on. It outputs either:

  * a single line with a simple list of node
  * one pair of "NODEID NODENAME" per line
  * one triplet of "NODEID NODENAME STATUS" per line

Based on this, I am wondering how the db2 RA might work correctly on system not
doing the "NODEID NODENAME STATUS" output. See:


Based on this,
  * on what this output is based? 
  * what can I test from my RA to know what kind of output I should expect?
  * is there another way to get this list of node safely whatever
    the version of <I don't know what produces this>?

Bellow the various output I gathered so far...(and maybe one bug using crm_node

== CentOS 6.8

I have the following output:

  root at srv1:~$ crm_node -l
  srv1 srv2 srv3

Packages and versions:

  corosync                1.4.7-5.el6.x86_64
  corosynclib             1.4.7-5.el6.x86_64
  libqb                   0.17.1-2.el6.x86_64
  pacemaker               1.1.14-8.el6_8.1.x86_64
  pacemaker-cli           1.1.14-8.el6_8.1.x86_64
  pacemaker-cluster-libs  1.1.14-8.el6_8.1.x86_64
  pacemaker-libs          1.1.14-8.el6_8.1.x86_64

== CentOS 7.2

I have the following output:

  root at srv1:~# crm_node -l
  3 srv3 member
  1 srv1 member
  2 srv2 member

Packages and versions:

  corosync                2.3.4-7.el7_2.3.x86_64
  corosynclib             2.3.4-7.el7_2.3.x86_64
  libqb                   0.17.1-2.el7.1.x86_64
  pacemaker               1.1.13-10.el7_2.4.x86_64
  pacemaker-cli           1.1.13-10.el7_2.4.x86_64
  pacemaker-cluster-libs  1.1.13-10.el7_2.4.x86_64
  pacemaker-libs          1.1.13-10.el7_2.4.x86_64 

== Ubuntu 14.04

I have the following output:

  root at srv3:~# crm_node -l
  3232266874 srv2
  3232266875 srv3
  3232266873 srv1

And BTW, crm_node is not able to get node name using node id: 

  root at srv3:~# crm_node -N 3232266875
  root at srv3:~# crm_node -N 3232266874
  root at srv3:~# crm_node -N 3232266873

Packages and versions:

  corosync             2.3.3-1ubuntu3
  libcorosync-common4  2.3.3-1ubuntu3
  libqb0               0.16.0.real-1ubuntu5
  pacemaker            1.1.10+git20130802-1ubuntu2.3
  pacemaker-cli-utils  1.1.10+git20130802-1ubuntu2.3

== Debian 8

I have the following output:

  root at srv1:~# crm_node -l
  3232266854 srv2 member
  3232266853 srv1 member
  3232266855 srv3 member

And same problem with "crm_node -N NODEID".

Packages and versions:

  corosync                       2.3.5-3~bpo8+1
  libcorosync-common4            2.3.5-3~bpo8+1
  libqb0                         0.17.2.real-4~bpo8+1
  pacemaker                      1.1.14-2~bpo8+1
  pacemaker-cli-utils            1.1.14-2~bpo8+1
  pacemaker-common               1.1.14-2~bpo8+1
  pacemaker-resource-agents      1.1.14-2~bpo8+1

Thank you for your help!


More information about the Developers mailing list