[Pacemaker] [PATCH] crm_mon expansion patch

Yuusuke IIDA iidayuus at intellilink.co.jp
Tue Mar 23 22:32:48 EDT 2010


Hi Andrew,

Please confirm it last time because I revised loop processing pointed out.

I do not understand the point that this processing does not have good well.
 >>> Not sure about this bit:
 >>>
 >>> +    if(failcount>    0) {
 >>> +       printed = TRUE;
 >>> +       print_as(": Resource is failure!!");
 >>> +    }
 >>> +
Does this message say that you had better display it when you reached 
migration-threshold?

I revised it incidentally because I discovered that variable "fail_attr" made 
memory leak by the handling of "-f" option.

I want you to merge even the handling of to display attribute information node 
into a branch of stable-1.0 if I do not have any problem.

Best Regards,
IIDA Yuusuke

(2010/03/10 22:39), Andrew Beekhof wrote:
> On Wed, Mar 10, 2010 at 3:31 AM, Yuusuke IIDA
> <iidayuus at intellilink.co.jp>  wrote:
>> Hi Andrew,
>>
>> thanks for reply.
>>
>> (2010/03/08 19:23), Andrew Beekhof wrote:
>>>
>>> Not sure about this bit:
>>>
>>> +    if(failcount>    0) {
>>> +       printed = TRUE;
>>> +       print_as(": Resource is failure!!");
>>> +    }
>>> +
>>>
>>> Was there any reason you didn't use node->details->attrs (or
>>> utilization) directly?
>>
>> Because there was processing to already display fail-count about it, the
>> reason is because it thought that displaying a message there is suitable.
>
> Sorry, the comment and the patch fragment were not intended to be related.
>
> I meant, why didnt you use node->details->attrs instead of the dual loops below:
>
> +    xml_child_iter_filter(
> +	cib_status, node_state, XML_CIB_TAG_STATE,
>
> and
>
> +	xml_child_iter(trns_attr, nvpair,
>
>
> you should be able to just do:
>
>      slist_iter(node, node_t, data_set->nodes, lpc,
>         g_hash_table_foreach(node->details->attrs, some_printing_function, NULL);
>      );
>
>>> That would be simpler and wouldn't require (incorrectly) assuming that
>>> there is only ever one set of attributes per node.
>>
>> Should this have let you display it in node-details-attrs?
>>
>> Best Regards,
>> IIDA Yuusuke
>>
>>>
>>> 2010/3/3 Yuusuke IIDA<iidayuus at intellilink.co.jp>:
>>>>
>>>> Hi all,
>>>>
>>>>
>>>> This patch is a thing to let crm_mon display the attribute value of the
>>>> node.
>>>> The details argued in the following threads.
>>>> http://www.gossamer-threads.com/lists/linuxha/pacemaker/59168
>>>>
>>>> This function applies a patch to crm_mon.c to use it, and please install
>>>> crm_mon.
>>>> This patch is a change set of stable-1.0: I can apply to 15377.
>>>> And I attach a "-A" option, and please carry out crm_mon.
>>>>
>>>> The main function is as follows.
>>>>   *  I added a function to display the attribute value of the node.
>>>>   -  When abnormality occurred in an attribute value of pingd; of the
>>>> function
>>>> to display a warning message added it.
>>>>   -  Of the function that a list shows a warning message for indication of
>>>> "fail-count" added it.
>>>>   *  Originally I deleted it because the function to display an attribute
>>>> value
>>>> of implemented pingd was redundant.
>>>>
>>>> The attribute to show below excludes you from indication.
>>>>   *  probe_complete
>>>>   *  shutdown
>>>>   *  terminate
>>>>   *  fail-count*
>>>>   *  last-failure*
>>>>
>>>> I want you to merge it into a source tree if you do not have any problem.
>>>>
>>>> Best Regards,
>>>> IIDA Yuusuke
>>>>
>>>> I show below indication example.
>>>>
>>>> #  crm_mon -fA1
>>>> ============
>>>> Last updated:  26 Fri Feb 13:49:05 2010
>>>> Stack:  openais
>>>> Current DC:  node1 - partition with quorum
>>>> Version:  1.0.7-049006f17277+ stable-1.0 tip
>>>> Two two Nodes configured, expected votes
>>>> Two Resources configured.
>>>> ============
>>>>
>>>> Online:  [node1 node2]
>>>>
>>>>   Resource Group:  grpDummy
>>>>      prmDummy1 (ocf::heartbeat:Dummy):  Started node2
>>>>      prmDummy2 (ocf::heartbeat:Dummy):  Started node2
>>>>      prmDummy3 (ocf::heartbeat:Dummy):  Started node2
>>>>   Clone Set:  clnPingd
>>>>      Started:  [node2 node1]
>>>>
>>>> Node Attributes:
>>>> *  Node node2:
>>>>     + default_ping_set                   :  0              :  Link is
>>>> failure!!
>>>>   (Expected=100)
>>>> *  Node node1:
>>>>     + default_ping_set                   :  100
>>>>
>>>> Migration summary:
>>>> *  Node node2:
>>>> *  Node node1:
>>>>    prmDummy3:  migration-threshold=1 fail-count=1:  Resource is failure!!
>>>>
>>>> Failed actions:
>>>>     prmDummy3_monitor_10000 (node=node1, call=13, rc=7, status=complete):
>>>>   not
>>>> running
>>>> #
>>>>
>>>> _______________________________________________
>>>> Pacemaker mailing list
>>>> Pacemaker at oss.clusterlabs.org
>>>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Pacemaker mailing list
>>> Pacemaker at oss.clusterlabs.org
>>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>>
>>
>> _______________________________________________
>> Pacemaker mailing list
>> Pacemaker at oss.clusterlabs.org
>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>

-- 
----------------------------------------
METRO SYSTEMS CO., LTD

YuusukeIida
Mail:iidayuus at intellilink.co.jp
----------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crm_mon.c.patch
Type: text/x-patch
Size: 5865 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20100324/64d92a37/attachment-0001.bin>


More information about the Pacemaker mailing list