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 alan from 
      ([email protected])
   2. Linux-HA CVS: lrm by alan from  ([email protected])
   3. Linux-HA CVS: snmp_subagent by xunsun from 
      ([email protected])
   4. Linux-HA CVS: lib by alan from  ([email protected])


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

Message: 1
Date: Sun, 25 Dec 2005 15:39:51 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/heartbeat


Modified Files:
        heartbeat.c 


Log Message:
Increased the debug level of a few messages...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat.c,v
retrieving revision 1.477
retrieving revision 1.478
diff -u -3 -r1.477 -r1.478
--- heartbeat.c 19 Dec 2005 18:41:43 -0000      1.477
+++ heartbeat.c 25 Dec 2005 22:39:50 -0000      1.478
@@ -2,7 +2,7 @@
  * TODO:
  * 1) Man page update
  */
-/* $Id: heartbeat.c,v 1.477 2005/12/19 18:41:43 gshi Exp $ */
+/* $Id: heartbeat.c,v 1.478 2005/12/25 22:39:50 alan Exp $ */
 /*
  * heartbeat: Linux-HA heartbeat code
  *
@@ -1608,7 +1608,7 @@
                     gint* timeout)
 {
 
-       if (DEBUGDETAILS){
+       if (DEBUGPKT){
                cl_log(LOG_DEBUG,"polled_input_prepare(): timeout=%d"
                ,       *timeout);
        }
@@ -1626,7 +1626,7 @@
        
        LookForClockJumps();
        
-       if (DEBUGDETAILS) {
+       if (DEBUGPKT) {
                cl_log(LOG_DEBUG,"polled_input_check(): result = %d"
                ,       cmp_longclock(now, NextPoll) >= 0);
        }
@@ -1642,7 +1642,7 @@
 {
        longclock_t     now = time_longclock();
 
-       if (DEBUGDETAILS){
+       if (DEBUGPKT){
                cl_log(LOG_DEBUG,"polled_input_dispatch() {");
        }
        NextPoll = add_longclock(now, msto_longclock(POLL_INTERVAL));
@@ -1682,7 +1682,7 @@
                hb_send_resources_held(TRUE, NULL);
                AuditResources();
        }
-       if (DEBUGDETAILS){
+       if (DEBUGPKT){
                cl_log(LOG_DEBUG,"}/*polled_input_dispatch*/;");
        }
 
@@ -6037,6 +6037,9 @@
 
 /*
  * $Log: heartbeat.c,v $
+ * Revision 1.478  2005/12/25 22:39:50  alan
+ * Increased the debug level of a few messages...
+ *
  * Revision 1.477  2005/12/19 18:41:43  gshi
  * add debug msg for rexmit
  *




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

Message: 2
Date: Sun, 25 Dec 2005 16:23:41 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lrm by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : lrm

Dir     : linux-ha/lrm/lrmd


Modified Files:
        lrmd.c 


Log Message:
Put in some temporary debugging code to just help me figure out
why the permanent debugging code I put in isn't working...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/lrmd/lrmd.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -3 -r1.191 -r1.192
--- lrmd.c      25 Dec 2005 14:40:35 -0000      1.191
+++ lrmd.c      25 Dec 2005 23:23:41 -0000      1.192
@@ -1,4 +1,4 @@
-/* $Id: lrmd.c,v 1.191 2005/12/25 14:40:35 alan Exp $ */
+/* $Id: lrmd.c,v 1.192 2005/12/25 23:23:41 alan Exp $ */
 /*
  * Local Resource Manager Daemon
  *
@@ -3025,7 +3025,7 @@
                         * need to be passed in. Maybe pass through the
                         * entire lrm_op_t too? */
                        lrmd_debug2(LOG_DEBUG
-                       ,       "perform_ra_op:call RA plugin to perform %s, 
pid: [%d]"
+                       ,       "perform_ra_op:calling RA plugin to perform %s, 
pid: [%d]"
                        ,       op_info(op), getpid());         
                        RAExec->execra (rsc->id,
                                        rsc->type,
@@ -3078,6 +3078,7 @@
                lrmd_op_destroy(op);
                p->privatedata = NULL;
                dump_data_for_debug();
+lrmd_log(LOG_ERR, "RETURNING from %s line %d", __FUNCTION__, __LINE__);
                return;
        }
 
@@ -3088,16 +3089,18 @@
                        lrmd_op_destroy(op);
                        p->privatedata = NULL;
                        dump_data_for_debug();
+lrmd_log(LOG_ERR, "RETURNING from %s line %d", __FUNCTION__, __LINE__);
                        return;
                }
        }
 
        rsc = lookup_rsc(op->rsc_id);
        if (rsc == NULL) {
-               lrmd_debug(LOG_DEBUG,"on_ra_proc_finished: the rsc (id=%s) does"
-                       " not exist", op->rsc_id);
+               lrmd_debug(LOG_DEBUG, "on_ra_proc_finished: the rsc (id=%s) 
does"
+               " not exist", op->rsc_id);
                on_op_done(op);
                p->privatedata = NULL;
+lrmd_log(LOG_ERR, "RETURNING from %s line %d", __FUNCTION__, __LINE__);
                return;
        }       
        RAExec = g_hash_table_lookup(RAExecFuncs,rsc->class);
@@ -3105,19 +3108,26 @@
                lrmd_log(LOG_ERR,"on_ra_proc_finished: can not find RAExec for"
                        "resource class <%s>", rsc->class);
                dump_data_for_debug();
+lrmd_log(LOG_ERR, "RETURNING from %s line %d", __FUNCTION__, __LINE__);
                return;
        }
 
        op_type = ha_msg_value(op->msg, F_LRM_OP);
+lrmd_log(LOG_ERR, "Mapping return value from plugin in %s() line %d", 
__FUNCTION__, __LINE__);
        rc = RAExec->map_ra_retvalue(exitcode, op_type, 
op->first_line_ra_stdout);
        if (rc != EXECRA_OK || debug_level > 1) {
-               lrmd_debug(rc == EXECRA_OK ? LOG_DEBUG : LOG_ERR
+               lrmd_log(rc == EXECRA_OK ? LOG_DEBUG : LOG_ERR
                ,       "Resource Agent (%s): process [%d], "
                        "exitcode %d, rc %d, with signo %d, the RA output: %s"
                ,       op_info(op)
                ,       p->pid, exitcode, rc, signo
                ,       op->first_line_ra_stdout);
        }
+lrmd_log(LOG_ERR, "Mapping of return value complete in %s() line %d", 
__FUNCTION__, __LINE__);
+lrmd_log(LOG_ERR, "Resource Agent (%s): process [%d], "
+"exitcode %d, rc %d, with signo %d, the RA output: %s"
+,      op_info(op), p->pid, exitcode, rc, signo, op->first_line_ra_stdout);
+
        if (EXECRA_EXEC_UNKNOWN_ERROR == rc || EXECRA_NO_RA == rc) {
                if (HA_OK != ha_msg_mod_int(op->msg, F_LRM_OPSTATUS,
                                                        LRM_OP_ERROR)) {
@@ -3444,6 +3454,10 @@
 }
 /*
  * $Log: lrmd.c,v $
+ * Revision 1.192  2005/12/25 23:23:41  alan
+ * Put in some temporary debugging code to just help me figure out
+ * why the permanent debugging code I put in isn't working...
+ *
  * Revision 1.191  2005/12/25 14:40:35  alan
  * More debugging output.
  *




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

Message: 3
Date: Sun, 25 Dec 2005 19:25:45 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: snmp_subagent by xunsun from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : xunsun
Host    : 
Project : linux-ha
Module  : snmp_subagent

Dir     : linux-ha/snmp_subagent


Modified Files:
        hbagent.c 


Log Message:
typo reported by Filip Sneppe <[EMAIL PROTECTED]>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/snmp_subagent/hbagent.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- hbagent.c   30 Nov 2005 02:03:40 -0000      1.41
+++ hbagent.c   26 Dec 2005 02:25:45 -0000      1.42
@@ -819,7 +819,7 @@
                        free_membershiptable();
                         
                         /* finalize membership */
-                        saClmFinlize(&clm);
+                        saClmFinalize(&clm);
                        return HA_OK;
                } else {
                    cl_log(LOG_WARNING, "saClmDispatch error, ret = [%d]", ret);




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

Message: 4
Date: Mon, 26 Dec 2005 01:45:34 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/lib/plugins/lrm


Modified Files:
        raexechb.c raexeclsb.c 


Log Message:
Changed the code to treat monitor as the same as status - since what the CRM
actually asks for is the monitor operation.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/lrm/raexechb.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- raexechb.c  24 Dec 2005 22:49:33 -0000      1.44
+++ raexechb.c  26 Dec 2005 08:45:32 -0000      1.45
@@ -22,7 +22,7 @@
  */
 
 #include <portability.h>
-#include <stdio.h>             
+#include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -140,7 +140,7 @@
        }
 
        /*  Register our interfaces */
-       return imports->register_interface(us, PIL_PLUGINTYPE_S,  PIL_PLUGIN_S, 
+       return imports->register_interface(us, PIL_PLUGINTYPE_S,  PIL_PLUGIN_S,
                &raops, NULL, &OurInterface, &OurImports,
                interfprivate); 
 }
@@ -202,7 +202,7 @@
 
                g_string_free(debug_info, TRUE);
        } 
-       
+
        execv(ra_pathname, params_argv);
        cl_perror("(%s:%s:%d) execv failed for %s"
                  , __FILE__, __FUNCTION__, __LINE__, ra_pathname);
@@ -269,7 +269,7 @@
 static uniform_ret_execra_t 
 map_ra_retvalue(int ret_execra, const char * op_type, const char * std_output)
 {
-       
+
        /* Now there is no formal related specification for Heartbeat RA 
         * scripts. Temporarily deal as LSB init script.
         */
@@ -281,16 +281,17 @@
                   * running_pattern1 = "*running*",
                   * running_pattern2 = "*OK*";
        const char * lower_std_output = NULL;
-       
-       if ( 0 == STRNCMP_CONST(op_type, "status") ) {
+
+       if (    0 == STRNCMP_CONST(op_type, "status")
+       ||      0 == STRNCMP_CONST(op_type, "monitor")) {
                if (std_output == NULL ) {
-                       cl_log(LOG_WARNING, "The heartbeat RA did output"
-                       " anything for status output to stdout.");
+                       cl_log(LOG_WARNING, "This heartbeat RA didn't output"
+                       " anything for status output.");
                        return EXECRA_NOT_RUNNING;
                }else if (idebuglevel) {
                        cl_log(LOG_DEBUG, "RA output was: [%s]", std_output);
                }
-                       
+
                lower_std_output = g_ascii_strdown(std_output, -1);
 
                if ( TRUE == g_pattern_match_simple(stop_pattern1
@@ -335,7 +336,7 @@
 static int 
 get_resource_list(GList ** rsc_info)
 {
-       return get_runnable_list(RA_PATH, rsc_info);                    
+       return get_runnable_list(RA_PATH, rsc_info);
 }
 
 static char*
@@ -347,7 +348,7 @@
        g_string_sprintf( meta_data, meta_data_template, rsc_type
                        , rsc_type, rsc_type);
        return meta_data->str;
-}      
+}
 static int
 get_provider_list(const char* ra_type, GList ** providers)
 {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/lrm/raexeclsb.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- raexeclsb.c 19 Dec 2005 06:57:44 -0000      1.42
+++ raexeclsb.c 26 Dec 2005 08:45:32 -0000      1.43
@@ -125,11 +125,11 @@
  * specification.
  */
 static const int status_op_exitcode_map[] = { 
-       EXECRA_OK,
-       EXECRA_UNKNOWN_ERROR,
-       EXECRA_UNKNOWN_ERROR,
-       EXECRA_NOT_RUNNING,
-       EXECRA_UNKNOWN_ERROR
+       EXECRA_OK,              /* LSB_STATUS_OK */
+       EXECRA_NOT_RUNNING,     /* LSB_STATUS_VAR_PID */
+       EXECRA_NOT_RUNNING,     /* LSB_STATUS_VAR_LOCK */
+       EXECRA_NOT_RUNNING,     /* LSB_STATUS_STOPPED */
+       EXECRA_UNKNOWN_ERROR    /* LSB_STATUS_UNKNOWN */
 };
 
 /* The begin of exported function list */
@@ -284,18 +284,19 @@
 map_ra_retvalue(int ret_execra, const char * op_type, const char * std_output)
 {
        /* Except op_type equals 'status', the UNIFORM_RET_EXECRA is compatible
-          with LSB standard.
-       */
-       if ( 0 == STRNCMP_CONST(op_type, "status")) {
-               if (ret_execra < 0 || ret_execra > 4 ) {
+        * with the LSB standard.
+        */
+       if (    0 == STRNCMP_CONST(op_type, "status")
+       ||      0 == STRNCMP_CONST(op_type, "monitor")) {
+               if (ret_execra < 0) {
                        ret_execra = EXECRA_UNKNOWN_ERROR;
+               }else if (ret_execra < DIMOF(status_op_exitcode_map)) {
+                       ret_execra =  status_op_exitcode_map[ret_execra];
                }
-               return status_op_exitcode_map[ret_execra];
        }
-       /* For none-status operation return code */
-       if ( ret_execra < 0 || ret_execra > 7 ) {
+       if (ret_execra < 0) {
                ret_execra = EXECRA_UNKNOWN_ERROR;
-       } 
+       }
        return ret_execra;
 }
 




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

_______________________________________________
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 68
********************************************

Reply via email to