[ClusterLabs] crm_mon change in behaviour PM 1.1.12 -> 1.1.14: crm_mon -XA filters #health.* node attributes

Ken Gaillot kgaillot at redhat.com
Thu Mar 3 12:06:46 EST 2016


On 03/03/2016 10:07 AM, Martin Schlegel wrote:
> Hello everybody
> 
> 
> This is my first post on this mailing list and I am only using Pacemaker since 
> fall 2015 ... please be gentle :-) and I will do the same.
> 
> 
> Our cluster is using multiple resource agents that update various node 
> attributes (via RAs like sysinfo, healthcpu, etc.) in the form of #health.* and 
> we rely on the mechanism enabled via the 
> property node-health-strategy=migrate-on-red to trigger resource migrations.
> 
> In Pacemaker version 1.1.12 crm_mon -A or -XA would still display these 
> #health.* attributes, but not since we have moved up to 1.1.14 and I am not sure 
> why this needed to be changed :
> 
> root at ys0-resiliency-test-1:~# crm node status-attr pg1 show \#health-cpu
> *scope=status name=#health-cpu value=green*
> 
> root at ys0-resiliency-test-1:~# crm_mon -XrRAf1 | grep -i '#health' ; echo $?
> *1*
> 
> *
> *
> 
> This seems to be due to this part of the crm_mon.c code:
> 
> /* Never display node attributes whose name starts with one of these prefixes */
> #define FILTER_STR { "shutdown", "terminate", "standby", "fail-count", \
>                                      "last-failure", "probe_complete", *“#”*, NULL }

You are correct. The goal is to hide attributes that are sort of
"internal" to the cluster or resource agents, and just show attributes
set by the user.

> *
> *
> 
> I would like to know if anybody is sharing my opinions on that:
> 
>     1. From an operations point of view it would be easier to get crm_mon to 
> include #health.* in the general output or at least in the XML output via 
> crm_mon -XA, so that I can get a comprehensive status view in one shot.

It does make sense to include all attributes in XML output since that is
intended for automated parsing. It should be fairly easy to move the
filtering from create_attr_list() to print_node_attribute().

>     2. Because the node attributes list can be extensive and clutters up the 
> output it would make sense to allow a user-defined filter for node attributes in 
> general

Feel free to open a feature request on bugs.clusterlabs.org. We also
gladly accept code submissions at https://github.com/ClusterLabs/pacemaker

> 
> Regards,
> 
> Martin Schlegel





More information about the Users mailing list