[Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: heartbeat by sunjd from

Guochun Shi gshi at ncsa.uiuc.edu
Tue Jul 13 11:41:04 MDT 2004


At 07:41 AM 7/13/2004 +0000, you wrote:
>linux-ha CVS committal
>
>Author  : sunjd
>Host    : 
>Project : linux-ha
>Module  : heartbeat
>
>Dir     : linux-ha/heartbeat
>
>
>Modified Files:
>      Tag: STABLE_1_2
>        hb_resource.c 
>
>
>Log Message:
>fix simultaneous stop issue
>
>===================================================================
>RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/hb_resource.c,v
>retrieving revision 1.48.2.2
>retrieving revision 1.48.2.3
>diff -u -3 -r1.48.2.2 -r1.48.2.3
>--- hb_resource.c       29 Apr 2004 01:08:58 -0000      1.48.2.2
>+++ hb_resource.c       13 Jul 2004 07:41:16 -0000      1.48.2.3
>@@ -1,4 +1,4 @@
>-/* $Id: hb_resource.c,v 1.48.2.2 2004/04/29 01:08:58 alan Exp $ */
>+/* $Id: hb_resource.c,v 1.48.2.3 2004/07/13 07:41:16 sunjd Exp $ */
> /*
>  * hb_resource: Linux-HA heartbeat resource management code
>  *
>@@ -853,7 +853,19 @@
>        }
>        if (strcasecmp(type, T_SHUTDONE) == 0) {
>                if (thisnode != curnode) {
>-                       other_is_stable = 0;
>+                       /*
>+                       * Fix the issue of can not stopping simultaneously.
>+                       * It seems other_is_stable should always be set as 1
>+                       * when go here.
>+                       * But for avoiding possible unknown side-effect, now 
>+                       * temporily set other_is_stable = 1 conditionally.
>+                       */
>+                       if (shutdown_in_progress) {
>+                               other_is_stable = 1;
>+                       } else {
>+                               other_is_stable = 0;
>+                       }
>+
>                        other_holds_resources = HB_NO_RSC;
>                        if (ANYDEBUG) {
>                                cl_log(LOG_DEBUG
>@@ -2201,6 +2213,9 @@
> 

Any possible side effect this fix may cause? Manually set the other_is_stable=1 in shutdown case obviously
does not reflect the true state of the other node, but considering the node is being shutdown soon, maybe it is
not important?

-Guochun




More information about the Linux-HA-Dev mailing list