[ClusterLabs Developers] Trouble with crm_node -l output

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Tue Nov 8 17:33:13 UTC 2016


On Tue, 8 Nov 2016 11:23:37 -0600
Ken Gaillot <kgaillot at redhat.com> wrote:

> On 11/08/2016 06:45 AM, Jehan-Guillaume de Rorthais wrote:
> > 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  
> 
> Unfortunately, there is no good answer here. The information presented
> can vary by cluster layer (heartbeat vs corosync 1+CMAN vs corosync
> 1+plugin vs corosync 2), and the display format may have changed over
> the years.
> 
> Currently, crm_node contacts the cluster layer directly. I'd like to
> change that so that it contacts one of the pacemaker daemons instead,
> which will allow for a more consistent view (and will allow remote nodes
> to be counted). But that's long-term.
> 
> I think there are other resource agents, like galera IIRC, that need to
> know the other nodes. You might want to see how they do it.

The pgsql and galera RA both use a user given parameter to define the node
list. I was trying to avoid this, but this might be the simplest solution for
now...

Thank you for your answer!




More information about the Developers mailing list