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


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

Message: 1
Date: Sat, 24 Dec 2005 15:10:26 -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 


Log Message:
Put in additional debug information for heartbeat RA debugging...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/lrm/raexechb.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- raexechb.c  22 Dec 2005 08:15:47 -0000      1.42
+++ raexechb.c  24 Dec 2005 22:10:25 -0000      1.43
@@ -113,6 +113,7 @@
 static PILInterface*           OurInterface;
 static void*                   OurImports;
 static void*                   interfprivate;
+static int                     idebuglevel = 0;
 
 /*
  * Our plugin initialization and registration function
@@ -133,6 +134,10 @@
        /* Register ourself as a plugin */
        imports->register_plugin(us, &OurPIExports);  
 
+       if (getenv(HADEBUGVAL) != NULL && atoi(getenv(HADEBUGVAL)) > 0 ) {
+               idebuglevel = atoi(getenv(HADEBUGVAL));
+       }
+
        /*  Register our interfaces */
        return imports->register_interface(us, PIL_PLUGINTYPE_S,  PIL_PLUGIN_S, 
                &raops, NULL, &OurInterface, &OurImports,
@@ -151,7 +156,6 @@
        char ra_pathname[RA_MAX_NAME_LENGTH];
        uniform_ret_execra_t exit_value;
        GString * debug_info;
-       char * inherit_debuglevel = NULL;
        char * optype_tmp = NULL;
        int index_tmp = 0;
 
@@ -184,8 +188,7 @@
        get_ra_pathname(RA_PATH, rsc_type, NULL, ra_pathname);
 
        /* let this log show only high loglevel. */
-       inherit_debuglevel = getenv(HADEBUGVAL);
-       if ((inherit_debuglevel != NULL) && (atoi(inherit_debuglevel) > 1)) {
+       if (idebuglevel  > 1) {
                debug_info = g_string_new("");
                do {
                        g_string_append(debug_info, params_argv[index_tmp]);
@@ -283,26 +286,46 @@
                        cl_log(LOG_WARNING, "The heartbeat RA did output"
                        " anything for status output to stdout.");
                        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
                        , lower_std_output) || TRUE ==
                        g_pattern_match_simple(stop_pattern2
                        , lower_std_output) ) {
+                       if (idebuglevel) {
+                               cl_log(LOG_DEBUG
+                       ,       "RA output [%s] matched stopped pattern"
+                       " [%s] or [%s]"
+                       ,       std_output
+                       ,       stop_pattern1
+                       ,       stop_pattern2);
+                       }
                        return EXECRA_NOT_RUNNING; /* stopped */
                }
                if ( TRUE == g_pattern_match_simple(running_pattern1
                        , lower_std_output) || TRUE ==
                        g_pattern_match_simple(running_pattern2
                        , std_output) ) {
+                       if (idebuglevel) {
+                               cl_log(LOG_DEBUG
+                               ,       "RA output [%s] matched running"
+                               " pattern [%s] or [%s]"
+                               ,       std_output, running_pattern1
+                               ,       running_pattern2);
+                       }
                        return EXECRA_OK; /* running */
                }
                /* It didn't say it was running - must be stopped */
+               cl_log(LOG_DEBUG, "RA output [%s] didn't match any pattern"
+               ,       std_output);
                return EXECRA_NOT_RUNNING; /* stopped */
        }
        /* For non-status operation return code */
-       if ( ret_execra < 0 || ret_execra > 7 ) {
+       if (ret_execra < 0) {
                ret_execra = EXECRA_UNKNOWN_ERROR;
        }
        return ret_execra;




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

Message: 2
Date: Sat, 24 Dec 2005 15:49:33 -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 


Log Message:
Added a debug printout to the LRM to print out the debug level currently in 
effect...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/lrm/raexechb.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- raexechb.c  24 Dec 2005 22:10:25 -0000      1.43
+++ raexechb.c  24 Dec 2005 22:49:33 -0000      1.44
@@ -136,6 +136,7 @@
 
        if (getenv(HADEBUGVAL) != NULL && atoi(getenv(HADEBUGVAL)) > 0 ) {
                idebuglevel = atoi(getenv(HADEBUGVAL));
+               cl_log(LOG_DEBUG, "LRM debug level set to %d", idebuglevel);
        }
 
        /*  Register our interfaces */




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

Message: 3
Date: Sat, 24 Dec 2005 20:45:01 -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:
Dropped two log messages to debug level 3 because they just produce
WAY too much output.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/lrmd/lrmd.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -3 -r1.188 -r1.189
--- lrmd.c      24 Nov 2005 10:27:01 -0000      1.188
+++ lrmd.c      25 Dec 2005 03:45:00 -0000      1.189
@@ -1,4 +1,4 @@
-/* $Id: lrmd.c,v 1.188 2005/11/24 10:27:01 sunjd Exp $ */
+/* $Id: lrmd.c,v 1.189 2005/12/25 03:45:00 alan Exp $ */
 /*
  * Local Resource Manager Daemon
  *
@@ -88,6 +88,11 @@
                 cl_log(priority, fmt); \
         }
 
+#define lrmd_debug3(priority, fmt...); \
+        if ( debug_level >= 3 ) { \
+                cl_log(priority, fmt); \
+        }
+
 #define        lrmd_nullcheck(p)       ((p) ? (p) : "<null>")
 #define        lrm_str(p)      (lrmd_nullcheck(p))
 
@@ -3296,7 +3301,7 @@
        lrmd_rsc_t* rsc = NULL;
        lrmd_op_t* op = (lrmd_op_t *)user_data;
 
-       lrmd_debug2(LOG_DEBUG, "%s begin.", __FUNCTION__);
+       lrmd_debug3(LOG_DEBUG, "%s begin.", __FUNCTION__);
 
        *data = NULL;
        gstr_tmp = g_string_new("");
@@ -3345,7 +3350,7 @@
                g_string_free(gstr_tmp, FALSE);
        }
 
-       lrmd_debug2(LOG_DEBUG, "%s end.", __FUNCTION__);
+       lrmd_debug3(LOG_DEBUG, "%s end.", __FUNCTION__);
        return rc;
 }
 
@@ -3443,6 +3448,10 @@
 }
 /*
  * $Log: lrmd.c,v $
+ * Revision 1.189  2005/12/25 03:45:00  alan
+ * Dropped two log messages to debug level 3 because they just produce
+ * WAY too much output.
+ *
  * Revision 1.188  2005/11/24 10:27:01  sunjd
  * add a log output function for level2 debug
  *




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

Message: 4
Date: Sat, 24 Dec 2005 21:33:52 -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:
Made some error-only output come out when debug level is high enough

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/lrmd/lrmd.c,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -3 -r1.189 -r1.190
--- lrmd.c      25 Dec 2005 03:45:00 -0000      1.189
+++ lrmd.c      25 Dec 2005 04:33:51 -0000      1.190
@@ -1,4 +1,4 @@
-/* $Id: lrmd.c,v 1.189 2005/12/25 03:45:00 alan Exp $ */
+/* $Id: lrmd.c,v 1.190 2005/12/25 04:33:51 alan Exp $ */
 /*
  * Local Resource Manager Daemon
  *
@@ -3113,10 +3113,10 @@
 
        op_type = ha_msg_value(op->msg, F_LRM_OP);
        rc = RAExec->map_ra_retvalue(exitcode, op_type, 
op->first_line_ra_stdout);
-       if (rc != EXECRA_OK) {
+       if (rc != EXECRA_OK || debug_level > 1) {
                lrmd_debug(LOG_DEBUG, "A RA execution: process [%d], "
-                       "exitcode %d, with signo %d, %s, the RA output: %s"
-                       , p->pid, exitcode, signo, op_info(op)
+                       "exitcode %d, rc %d, with signo %d, %s, the RA output: 
%s"
+                       , p->pid, exitcode, rc, signo, op_info(op)
                        , op->first_line_ra_stdout);
        }
        if (EXECRA_EXEC_UNKNOWN_ERROR == rc || EXECRA_NO_RA == rc) {
@@ -3448,6 +3448,9 @@
 }
 /*
  * $Log: lrmd.c,v $
+ * Revision 1.190  2005/12/25 04:33:51  alan
+ * Made some error-only output come out when debug level is high enough
+ *
  * Revision 1.189  2005/12/25 03:45:00  alan
  * Dropped two log messages to debug level 3 because they just produce
  * WAY too much output.




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

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

Reply via email to