[Pacemaker] update the failcount of promote/demote error

Junko IKEDA tsukishima.ha at gmail.com
Tue Oct 26 01:17:07 UTC 2010


Hi,

2010/10/25 Andrew Beekhof <andrew at beekhof.net>:
> On Mon, Oct 25, 2010 at 7:49 AM, Junko IKEDA <tsukishima.ha at gmail.com> wrote:
>> or would it better not to increment the failcount?
>> in unpack_rsc_op(), demote operation is checked not to go into loop,
>> but promote is not.
>> see attached.
>
> the role remains correct though, and the location constraint causes
> the resource to be stopped.
> would it not be better to send a demote op and see if it can operate
> as a slave?

yes, demote operation would be a slave if it can,
so I thought that it might be enough to update the failcount of promote op.

diff -r e7bd6392d1e3 crmd/te_events.c
--- a/crmd/te_events.c  Fri Oct 22 08:18:16 2010 +0200
+++ b/crmd/te_events.c  Tue Oct 26 10:05:01 2010 +0900
@@ -127,6 +127,8 @@ update_failcount(xmlNode *event, const c
     } else if(safe_str_eq(task, CRMD_ACTION_STOP)) {
        interval = 1;
        value = failed_stop_offset;
+    } else if(safe_str_eq(task, CRMD_ACTION_PROMOTE)) {
+        interval = 1;
     }

     if(value == NULL || safe_str_neq(value, INFINITY_S)) {


Thanks,
Junko


>
>>
>> Thanks,
>> Junko
>>
>> 2010/10/21 Junko IKEDA <tsukishima.ha at gmail.com>:
>>> Hi,
>>>
>>> When the promote/demote action returns error code,
>>> it seems that failcount isn't incremented,
>>> so promote/demote action would go into a loop in some cases.
>>> Default settings for promote/demote are implicitly-defined
>>> (on_fail="restart" and interval=0).
>>> Is it possible to handle them as in the case of start/stop operation?
>>> It means, if there are some errors about promote/demote,
>>> pacemaker considers its interval as 1 temporarily.
>>> see attached.
>>>
>>> Thanks,
>>> Junko IKEDA
>>>
>>> NTT DATA INTELLILINK CORPORATION
>>>
>>
>> _______________________________________________
>> 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
>




More information about the Pacemaker mailing list