[Pacemaker] crm_mon and pingd

Keisuke MORI keisuke.mori+ha at gmail.com
Thu Nov 11 08:22:45 UTC 2010


No objections.

I've push the changeset below:
http://hg.clusterlabs.org/pacemaker/stable-1.0/rev/53132ed532ea

But it would be still preferable to rely on -A, particularly if you
want to use two or more pingd resources or change the attribute name.

I'd also agree for the filtering feature as an enhancement.

Thanks,

2010/11/10 Andrew Beekhof <andrew at beekhof.net>:
> Any objections Mori-san?
> Seems like a reasonable change to me.
>
> On Tue, Nov 9, 2010 at 1:26 PM, Vadym Chepkov <vchepkov at gmail.com> wrote:
>>
>> Would it be too much harm to restore the previous behavior at least partially?
>>
>> diff -r 7f2e453eedfa -r ab2da8a98b47 tools/crm_mon.c
>> --- a/tools/crm_mon.c   Mon Nov 08 23:13:17 2010 +0100
>> +++ b/tools/crm_mon.c   Tue Nov 09 07:18:53 2010 -0500
>> @@ -748,6 +748,17 @@
>>    g_list_free(sorted_op_list);
>>  }
>>
>> +static void get_ping_score(node_t *node, pe_working_set_t *data_set)
>> +{
>> +    const char *attr = "pingd";
>> +    const char *value = NULL;
>> +    value = g_hash_table_lookup(node->details->attrs, attr);
>> +
>> +    if(value != NULL) {
>> +       print_as(" %s=%s", attr, value);
>> +    }
>> +}
>> +
>>  static void print_attr_msg(node_t *node, GListPtr rsc_list, const
>> char *attrname, const char *attrvalue)
>>  {
>>    slist_iter(rsc, resource_t, rsc_list, lpc2,
>> @@ -848,6 +859,9 @@
>>       }
>>
>>       print_as("* Node %s: ", crm_element_value(node_state, XML_ATTR_UNAME));
>> +       if(!print_nodes_attr) {
>> +               get_ping_score(node, data_set);
>> +       }
>>       print_as("\n");
>>
>>       lrm_rsc = find_xml_node(node_state, XML_CIB_TAG_LRM, FALSE);
>>
>> Thanks,
>> Vadym
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>



-- 
Keisuke MORI




More information about the Pacemaker mailing list