Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: heartbeat by blaschke from 
      ([email protected])
   2. Linux-HA CVS: lib by gshi from  ([email protected])
   3. Linux-HA CVS: lib by gshi from  ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Fri,  9 Dec 2005 12:51:34 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by blaschke from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : blaschke
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat


Modified Files:
        hb_resource.c heartbeat.c heartbeat_private.h 


Log Message:

Port fixes for bugs 559, 835 and 927 from 1.2.x


===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/hb_resource.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- hb_resource.c       16 Nov 2005 05:21:56 -0000      1.81
+++ hb_resource.c       9 Dec 2005 19:51:33 -0000       1.82
@@ -1,4 +1,4 @@
-/* $Id: hb_resource.c,v 1.81 2005/11/16 05:21:56 gshi Exp $ */
+/* $Id: hb_resource.c,v 1.82 2005/12/09 19:51:33 blaschke Exp $ */
 /*
  * hb_resource: Linux-HA heartbeat resource management code
  *
@@ -149,7 +149,7 @@
 static int FilterNotifications(const char * msgtype);
 static int countbystatus(const char * status, int matchornot);
 static gboolean hb_rsc_isstable(void);
-static void shutdown_if_needed(void);
+static void PerformAutoFailback(void);
 
 ProcTrack_ops hb_rsc_RscMgmtProcessTrackOps = {
        RscMgmtProcessDied,
@@ -339,22 +339,31 @@
        return rc;
 }
 
+static gboolean
+AutoFailbackProc(gpointer dummy)
+{
+       PerformAutoFailback();
+       return FALSE;
+}
+
 static void
 PerformAutoFailback(void)
 {
        if (ANYDEBUG) {
                cl_log(LOG_DEBUG, "Calling PerformAutoFailback()");
        }
-       if ((procinfo->i_hold_resources & HB_FOREIGN_RSC) == 0
+       if (shutdown_in_progress
+       ||      (procinfo->i_hold_resources & HB_FOREIGN_RSC) == 0
        ||      !rsc_needs_failback || !auto_failback) {
                rsc_needs_failback = FALSE;
-               shutdown_if_needed();
+               hb_shutdown_if_needed();
                return;
        }
 
-       if (going_standby != NOT) {
-               cl_log(LOG_ERR, "Auto failback ignored.");
-               rsc_needs_failback = FALSE;
+       if (going_standby != NOT 
+       ||      !other_is_stable || resourcestate != HB_R_STABLE) {
+               cl_log(LOG_DEBUG, "Auto failback delayed.");
+               Gmain_timeout_add(1*1000, AutoFailbackProc, NULL);
                return;
        }
        if (ANYDEBUG) {
@@ -510,8 +519,6 @@
        gboolean        need_stonith = TRUE;
        struct ha_msg * hmsg;
        char            timestamp[16];
-       standby_running = zero_longclock;
-       going_standby   = NOT;
 
        
        if ((hmsg = ha_msg_new(6)) == NULL) {
@@ -538,6 +545,22 @@
                        return;
                }
        }
+       else if (going_standby != NOT) {
+               cl_log(LOG_INFO, "Cancelling pending standby operation");
+               going_standby = NOT;
+               standby_running = zero_longclock;
+
+               if ((!other_is_stable)
+               &&      ((procinfo->i_hold_resources & HB_ALL_RSC) == 
HB_ALL_RSC)) {
+                       other_is_stable = TRUE;
+                       if (ANYDEBUG) {
+                               cl_log(LOG_DEBUG
+                               ,       "hb_rsc_recover_dead_resources:"
+                               " other now stable");
+                       }
+               }
+               hb_shutdown_if_needed();
+       }
        
        /*deliver this message to clients*/
        heartbeat_monitor(hmsg, KEEPIT, "<internal>");
@@ -611,6 +634,15 @@
                ,       hip->nodename);
                send_stonith_msg(hip->nodename, T_STONITH_UNNEEDED);
                if (nice_failback) {
+                       if ((procinfo->i_hold_resources & HB_ALL_RSC) == 
HB_ALL_RSC) {
+                               other_is_stable = TRUE;
+                               if (ANYDEBUG) {
+                                       cl_log(LOG_DEBUG
+                                       ,       "hb_rsc_recover_dead_resources:"
+                                       " other now stable");
+                               }
+                               return;
+                       }
                        /* These might happen due to timing weirdnesses */
                        if (! (procinfo->i_hold_resources & HB_LOCAL_RSC)){
                                req_our_resources(TRUE);
@@ -809,7 +841,7 @@
        enum hb_rsc_state       newrstate = resourcestate;
        static int                      first_time = 1;
 
-       shutdown_if_needed();
+       hb_shutdown_if_needed();
        if (!DoManageResources || !nice_failback) {
                return;
        }
@@ -1086,7 +1118,7 @@
        }
 
        AuditResources();
-       shutdown_if_needed();
+       hb_shutdown_if_needed();
 }
 
 void
@@ -1254,7 +1286,7 @@
        if (shutdown_in_progress) {
                cl_log(LOG_INFO
                ,       "Resource takeover cancelled - shutdown in progress.");
-               shutdown_if_needed();
+               hb_shutdown_if_needed();
                return;
        }else if (hip->nodetype != PINGNODE_I) {
                cl_log(LOG_INFO
@@ -1768,7 +1800,7 @@
        if (ANYDEBUG) {
                cl_log(LOG_INFO, "New standby state: %d", going_standby);
        }
-       shutdown_if_needed();
+       hb_shutdown_if_needed();
 }
 
 static int
@@ -1944,8 +1976,8 @@
 
 }
 
-static void
-shutdown_if_needed(void)
+void
+hb_shutdown_if_needed(void)
 {
        if (rsc_needs_shutdown) {
                hb_giveup_resources();
@@ -1986,7 +2018,7 @@
 
        if (!hb_rsc_isstable()) {
                /* Try again later... */
-               /* (through shutdown_if_needed()) */
+               /* (through hb_shutdown_if_needed()) */
                if (!rsc_needs_shutdown) {
                        cl_log(LOG_WARNING
                        ,       "Shutdown delayed until current"
@@ -2234,7 +2266,7 @@
 
        p->privatedata = NULL;
        StartNextRemoteRscReq();
-       shutdown_if_needed();
+       hb_shutdown_if_needed();
 }
 
 static const char *
@@ -2346,7 +2378,7 @@
        hook = g_hook_first_valid(&RemoteRscReqQueue, FALSE);
        if (hook == NULL) {
                ResourceMgmt_child_count = 0;
-               shutdown_if_needed();
+               hb_shutdown_if_needed();
                return;
        }
 
@@ -2456,6 +2488,10 @@
 
 /*
  * $Log: hb_resource.c,v $
+ * Revision 1.82  2005/12/09 19:51:33  blaschke
+ *
+ * Port fixes for bugs 559, 835 and 927 from 1.2.x
+ *
  * Revision 1.81  2005/11/16 05:21:56  gshi
  * we should not put non-string field into environment setting
  *
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat.c,v
retrieving revision 1.475
retrieving revision 1.476
diff -u -3 -r1.475 -r1.476
--- heartbeat.c 9 Dec 2005 16:07:38 -0000       1.475
+++ heartbeat.c 9 Dec 2005 19:51:33 -0000       1.476
@@ -2,7 +2,7 @@
  * TODO:
  * 1) Man page update
  */
-/* $Id: heartbeat.c,v 1.475 2005/12/09 16:07:38 blaschke Exp $ */
+/* $Id: heartbeat.c,v 1.476 2005/12/09 19:51:33 blaschke Exp $ */
 /*
  * heartbeat: Linux-HA heartbeat code
  *
@@ -2982,6 +2982,7 @@
                        going_standby = NOT;
                        cl_log(LOG_WARNING, "No reply to standby request"
                        ".  Standby request cancelled.");
+                       hb_shutdown_if_needed();
                }
        }
 
@@ -6031,6 +6032,10 @@
 
 /*
  * $Log: heartbeat.c,v $
+ * Revision 1.476  2005/12/09 19:51:33  blaschke
+ *
+ * Port fixes for bugs 559, 835 and 927 from 1.2.x
+ *
  * Revision 1.475  2005/12/09 16:07:38  blaschke
  *
  * Bug 990 - Added -D option to tell heartbeat to display default directive
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat_private.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- heartbeat_private.h 29 Jul 2005 07:03:47 -0000      1.16
+++ heartbeat_private.h 9 Dec 2005 19:51:33 -0000       1.17
@@ -1,4 +1,4 @@
-/* $Id: heartbeat_private.h,v 1.16 2005/07/29 07:03:47 sunjd Exp $ */
+/* $Id: heartbeat_private.h,v 1.17 2005/12/09 19:51:33 blaschke Exp $ */
 /*
  * heartbeat_private.h: definitions for the Linux-HA heartbeat program
  * that are defined in heartbeat.c and are used by other .c files
@@ -79,6 +79,7 @@
 void hb_dump_proc_stats(volatile struct process_info * proc);
 void hb_trigger_restart(int quickrestart);
 
+void hb_shutdown_if_needed(void);
 void hb_giveup_resources(void);
 void hb_kill_tracked_process(ProcTrack* p, void * data);
 gboolean hb_mcp_final_shutdown(gpointer p);




------------------------------

Message: 2
Date: Fri,  9 Dec 2005 12:56:56 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by gshi from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : gshi
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/plugins/tiebreaker




Log Message:
Directory /home/cvs/linux-ha/linux-ha/lib/plugins/tiebreaker added to the 
repository





------------------------------

Message: 3
Date: Fri,  9 Dec 2005 12:56:56 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by gshi from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : gshi
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/plugins/quorum




Log Message:
Directory /home/cvs/linux-ha/linux-ha/lib/plugins/quorum added to the repository





------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 25, Issue 21
********************************************

Reply via email to