Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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: mgmt by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: mgmt by zhenh from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: lib by sunjd from  (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Wed, 14 Jun 2006 21:31:00 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/client


Modified Files:
        haclient.py.in 


Log Message:
fix a bug, check the return value for None 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- haclient.py.in      14 Jun 2006 07:59:02 -0000      1.58
+++ haclient.py.in      15 Jun 2006 03:30:59 -0000      1.59
@@ -1768,6 +1768,11 @@
                        return None
                while len(ret_str)>=4 and ret_str[:4] == "evt:" :
                        ret_str = mgmt_recvmsg()
+                       if ret_str == None :
+                               debug(str(string.split(command, "\n"))+":None")
+                               self.failed_reason = "return None"
+                               return None
+
                ret_list = string.split(ret_str, "\n")
                if ret_list[0] != "ok" :
                        debug(str(string.split(command, "\n"))+":"+ 
str(ret_list))




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

Message: 2
Date: Thu, 15 Jun 2006 02:11:30 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/client


Modified Files:
        haclient.py.in 


Log Message:
we shouldn't let the error interupt the monitoring of cluster
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- haclient.py.in      15 Jun 2006 03:30:59 -0000      1.59
+++ haclient.py.in      15 Jun 2006 08:11:29 -0000      1.60
@@ -526,17 +526,14 @@
                
                nodes = manager.get_all_nodes()
                if nodes == None :
-                       msgbox(_("can not get information from cluster!"))
                        return
 
                active_nodes = manager.get_active_nodes()
                if active_nodes == None :
-                       msgbox(_("can not get information from cluster!"))
                        return
 
                crm_nodes = manager.get_crm_nodes()
                if crm_nodes == None :
-                       msgbox(_("can not get information from cluster!"))
                        return
                
                config = manager.get_cluster_config()




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

Message: 3
Date: Thu, 15 Jun 2006 03:20:24 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by sunjd from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/lib/fencing


Modified Files:
        stonithd_lib.c 


Log Message:
tweaking logs; add more check for ipc functions
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/fencing/stonithd_lib.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- stonithd_lib.c      1 Jun 2006 06:22:33 -0000       1.23
+++ stonithd_lib.c      15 Jun 2006 09:20:23 -0000      1.24
@@ -92,6 +92,7 @@
        uid_t   my_euid;
        gid_t   my_egid;
        const char * tmpstr;
+       int     rc_tmp;
 
        if (chan == NULL || chan->ch_status == IPC_DISCONNECT) {
                wchanattrs = g_hash_table_new(g_str_hash, g_str_equal);
@@ -137,6 +138,7 @@
                return ST_FAIL;
        }
 
+       stdlib_log(LOG_DEBUG, "sending out the signon msg.");
        /* Send the registration request message */
        if (msg2ipcchan(request, chan) != HA_OK) {
                ZAPMSG(request);
@@ -145,13 +147,23 @@
        }
 
        /* waiting for the output to finish */
-       chan_waitout_timeout(chan, DEFAULT_TIMEOUT);
+       do { 
+               rc_tmp= chan_waitout_timeout(chan, DEFAULT_TIMEOUT);
+       } while (rc_tmp == IPC_INTR);
+       if (IPC_OK != rc_tmp) {
+               stdlib_log(LOG_ERR, "%s:%d: waitout failed."
+                          , __FUNCTION__, __LINE__);
+               return ST_FAIL;
+       }
+
        ZAPMSG(request);
 
        /* Read the reply... */
        stdlib_log(LOG_DEBUG, "waiting for the signon reply msg.");
+
         if ( IPC_OK != chan_waitin_timeout(chan, DEFAULT_TIMEOUT) ) {
-               stdlib_log(LOG_ERR, "waitin failed."); /*  how to deal. 
important */
+               stdlib_log(LOG_ERR, "%s:%d: waitin failed."
+                          , __FUNCTION__, __LINE__);
                return ST_FAIL;
        }
 
@@ -210,7 +222,8 @@
        /* Read the reply... */
        stdlib_log(LOG_DEBUG, "waiting for the signoff reply msg.");
         if ( IPC_OK != chan_waitin_timeout(chan, DEFAULT_TIMEOUT) ) {
-               stdlib_log(LOG_ERR, "waitin failed.");
+               stdlib_log(LOG_ERR, "%s:%d: waitin failed."
+                          , __FUNCTION__, __LINE__);
                return ST_FAIL;
        }
 
@@ -309,8 +322,8 @@
        /* Read the reply... */
        stdlib_log(LOG_DEBUG, "waiting for the stonith reply msg.");
         if ( IPC_OK != chan_waitin_timeout(chan, DEFAULT_TIMEOUT) ) {
-               stdlib_log(LOG_ERR, "stonithd_node_fence: waitin failed.");
-               /* how to deal. important */
+               stdlib_log(LOG_ERR, "%s:%d: waitin failed."
+                          , __FUNCTION__, __LINE__);
                return ST_FAIL;
        }
 
@@ -636,8 +649,8 @@
        /* Read the reply... */
        stdlib_log(LOG_DEBUG, "waiting for the stonithRA reply msg.");
         if ( IPC_OK != chan_waitin_timeout(chan, DEFAULT_TIMEOUT) ) {
-               stdlib_log(LOG_ERR, "stonith:waitin failed.");
-               /* how to deal. important */
+               stdlib_log(LOG_ERR, "%s:%d: waitin failed."
+                          , __FUNCTION__, __LINE__);
                return ST_FAIL;
        }
 
@@ -731,9 +744,8 @@
        /* Read the reply... */
        stdlib_log(LOG_DEBUG, "waiting for the reply to list stonith types.");
         if ( IPC_OK != chan_waitin_timeout(chan, DEFAULT_TIMEOUT) ) {
-               stdlib_log(LOG_ERR, "stonithd_list_stonith_types: "
-                          "chan_waitin failed.");
-               /* how to deal. important */
+               stdlib_log(LOG_ERR, "%s:%d: chan_waitin failed."
+                          , __FUNCTION__, __LINE__);
                return ST_FAIL;
        }
 
@@ -820,10 +832,14 @@
                        stdlib_log(LOG_DEBUG, "%s = %s.", field_name2, tmpstr);
                        rc= TRUE;
                } else {
-                       stdlib_log(LOG_DEBUG, "no field %s.", field_name2);
+                       stdlib_log(LOG_NOTICE, "filed <%s> content is <%s>"
+                                  , field_name2
+                                  , (NULL == tmpstr) ? "NULL" : tmpstr);
                }
        } else {
-               stdlib_log(LOG_DEBUG, "No field %s", field_name1);
+               stdlib_log(LOG_NOTICE, "filed <%s> content is <%s>"
+                          , field_name1
+                          , (NULL == tmpstr) ? "NULL" : tmpstr);
        }
 
        return rc;
@@ -848,8 +864,8 @@
        if ( other_remaining > 0 ) {
                alarm(other_remaining);
                stdlib_log(LOG_NOTICE, "chan_waitin_timeout: There are others "
-                       "using timer:%d. I donnot use alarm.", other_remaining);
-               alarm(other_remaining);
+                          "using timer: %d. I donnot use alarm."
+                          , other_remaining);
                ret = chan->ops->waitin(chan);
        } else {
                memset(&old_action, 0, sizeof(old_action));
@@ -860,11 +876,16 @@
                alarm(timeout);
        
                ret = chan->ops->waitin(chan);
-
-               if ( ret == IPC_INTR && INT_BY_ALARM ) {
-                       stdlib_log(LOG_ERR, "chan_waitin_timeout: waitin was "
-                                  "interrupted by alarm signal.");
-               } else {
+               if ( ret == IPC_INTR && TRUE == INT_BY_ALARM ) {
+                       stdlib_log(LOG_ERR, "%s:%d: waitin was interrupted "
+                                  "by the alarm set by myself."
+                                  , __FUNCTION__, __LINE__);
+                       ret = IPC_FAIL;
+               } else {
+                       if (ret == IPC_INTR) {
+                               stdlib_log(LOG_NOTICE
+                                       , "waitin was interrupted by others");
+                       }
                        alarm(0);
                }
 
@@ -898,10 +919,16 @@
 
                ret = chan->ops->waitout(chan);
 
-               if ( ret == IPC_INTR && INT_BY_ALARM ) {
-                       stdlib_log(LOG_ERR, "chan_waitout_timeout: waitout was "
-                                  "interrupted by alarm setted by myself.");
-               } else {
+               if ( ret == IPC_INTR && TRUE == INT_BY_ALARM ) {
+                       stdlib_log(LOG_ERR, "%s:%d: waitout was interrupted"
+                                  " by the alarm set by myself."
+                                  , __FUNCTION__, __LINE__);
+                       ret = IPC_FAIL;
+               } else {
+                       if (ret == IPC_INTR) {
+                               stdlib_log(LOG_ERR
+                                          , "waitin was interrupted by 
others");
+                       }
                        alarm(0);
                }
 




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

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 31, Issue 47
********************************************

Reply via email to