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: mgmt by zhenh from 
      ([email protected])
   2. Linux-HA CVS: mgmt by zhenh from 
      ([email protected])
   3. Linux-HA CVS: mgmt by zhenh from 
      ([email protected])
   4. Linux-HA CVS: mgmt by zhenh from 
      ([email protected])
   5. Linux-HA CVS: fencing by sunjd from 
      ([email protected])


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

Message: 1
Date: Sun, 18 Jun 2006 03:18:34 -0600 (MDT)
From: [email protected]
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:
the dc from pengine may be None
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- haclient.py.in      16 Jun 2006 09:53:52 -0000      1.63
+++ haclient.py.in      18 Jun 2006 09:18:33 -0000      1.64
@@ -606,7 +606,7 @@
                                status = _("stopped")
                        else :          
                                dc = manager.get_dc()
-                               if node in dc :
+                               if dc != None and node in dc :
                                        status = _("running(dc)")
                                else :
                                        status = _("running")




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

Message: 2
Date: Sun, 18 Jun 2006 03:28:42 -0600 (MDT)
From: [email protected]
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/daemon


Modified Files:
        mgmt_hb.c 


Log Message:
use the new heartbeat api to avoid message dealy.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_hb.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- mgmt_hb.c   26 May 2006 03:08:54 -0000      1.8
+++ mgmt_hb.c   18 Jun 2006 09:28:41 -0000      1.9
@@ -40,7 +40,7 @@
 static ll_cluster_t * hb = NULL;
 static char* on_get_allnodes(char* argv[], int argc);
 static char* on_get_hb_config(char* argv[], int argc);
-static gboolean on_hb_input(IPC_Channel *, gpointer);
+static gboolean on_hb_input(ll_cluster_t* hb, gpointer data);
 static char* on_echo(char* argv[], int argc);
 static void on_hb_quit(gpointer);
 char* hb_config = NULL;
@@ -123,7 +123,7 @@
                hb = NULL;
                return -1;
        }
-       G_main_add_IPC_Channel(G_PRIORITY_LOW, hb->llc_ops->ipcchan(hb),
+       G_main_add_ll_cluster(G_PRIORITY_LOW, hb,
                        FALSE, on_hb_input, NULL, on_hb_quit);
        
        reg_msg(MSG_ALLNODES, on_get_allnodes);
@@ -144,13 +144,15 @@
 }
 
 gboolean
-on_hb_input(IPC_Channel * chan, gpointer data)
+on_hb_input(ll_cluster_t *hb, gpointer data)
 {
        struct ha_msg* msg;
-       if (chan == NULL) {
-               return FALSE;
+       IPC_Channel *chan = NULL;
+
+       if(hb != NULL) {
+               chan = hb->llc_ops->ipcchan(hb);
        }
-       if (!IPC_ISRCONN(chan)) {
+       if (chan == NULL || !IPC_ISRCONN(chan)) {
                fire_event(EVT_DISCONNECTED);
                mgmt_log(LOG_ERR, "Lost connection to heartbeat service.");
                hb = NULL;




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

Message: 3
Date: Sun, 18 Jun 2006 05:59:37 -0600 (MDT)
From: [email protected]
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/daemon


Modified Files:
        mgmt_crm.c 


Log Message:
force the TE to start a trnsition after cleanup a resource
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- mgmt_crm.c  14 Jun 2006 07:31:29 -0000      1.55
+++ mgmt_crm.c  18 Jun 2006 11:59:36 -0000      1.56
@@ -879,7 +879,10 @@
 {
        IPC_Channel *crmd_channel = NULL;
        char our_pid[11];
+       char *now_s = NULL;
+       time_t now = time(NULL);
        
+       ARGC_CHECK(2);
        snprintf(our_pid, 10, "%d", getpid());
        our_pid[10] = '\0';
        
@@ -890,6 +893,13 @@
        delete_lrm_rsc(crmd_channel, NULL, argv[1]);
        refresh_lrm(crmd_channel, NULL); 
 
+       /* force the TE to start a transition */
+       sleep(5); /* wait for the refresh */
+       now_s = crm_itoa(now);
+       update_attr(cib_conn, cib_sync_call,
+                   NULL, NULL, NULL, NULL, "last-lrm-refresh", now_s);
+       crm_free(now_s);
+
        
        return cl_strdup(MSG_OK);
 }




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

Message: 4
Date: Sun, 18 Jun 2006 06:00:23 -0600 (MDT)
From: [email protected]
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:
only primitive resource can be cleanup
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- haclient.py.in      18 Jun 2006 09:18:33 -0000      1.64
+++ haclient.py.in      18 Jun 2006 12:00:23 -0000      1.65
@@ -1318,7 +1318,7 @@
 
                self.set_action_sensitive('cleanuprsc',
                        manager.connected
-                       and self.cur_type in all_rsc_type)
+                       and self.cur_type in [_("native")])
 
                self.set_action_sensitive('startrsc',
                        manager.connected




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

Message: 5
Date: Sun, 18 Jun 2006 08:19:39 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: fencing by sunjd from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/fencing/stonithd


Modified Files:
        stonithd.c 


Log Message:
bug1183: use the new API of heartbeat to avoid message delay; remove redundant 
code
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/fencing/stonithd/stonithd.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- stonithd.c  15 Jun 2006 10:45:27 -0000      1.92
+++ stonithd.c  18 Jun 2006 14:19:38 -0000      1.93
@@ -1,4 +1,4 @@
-/* $Id: stonithd.c,v 1.92 2006/06/15 10:45:27 sunjd Exp $ */
+/* $Id: stonithd.c,v 1.93 2006/06/18 14:19:38 sunjd Exp $ */
 
 /* File: stonithd.c
  * Description: STONITH daemon for node fencing
@@ -199,7 +199,7 @@
 static void handle_msg_tstit(struct ha_msg* msg, void* private_data);
 static void handle_msg_trstit(struct ha_msg* msg, void* private_data);
 static void handle_msg_resetted(struct ha_msg* msg, void* private_data);
-static gboolean stonithd_hb_msg_dispatch(IPC_Channel * ch, gpointer user_data);
+static gboolean stonithd_hb_msg_dispatch(ll_cluster_t * hb, gpointer 
user_data);
 static void stonithd_hb_msg_dispatch_destroy(gpointer user_data);
 static int init_hb_msg_handler(void);
 static gboolean reboot_block_timeout(gpointer data);
@@ -761,9 +761,13 @@
 static int
 init_hb_msg_handler(void)
 {
-       IPC_Channel * hbapi_ipc = NULL;
        unsigned int msg_mask;
        
+       if (hb == NULL) {
+               stonithd_log(LOG_ERR, "Don't connect to heartbeat: hb==NULL");
+               return LSB_EXIT_GENERIC;        
+       }
+
        stonithd_log2(LOG_DEBUG, "init_hb_msg_handler: begin");
 
        /* Set message callback */
@@ -810,13 +814,9 @@
                return LSB_EXIT_GENERIC;
        }
 
-       if (NULL == (hbapi_ipc = hb->llc_ops->ipcchan(hb))) {
-               stonithd_log(LOG_ERR,"Cannot get hb's client IPC channel.");
-               return LSB_EXIT_GENERIC;
-       }
        /* Watch the hearbeat API's IPC channel for input */
-       G_main_add_IPC_Channel(G_PRIORITY_HIGH, hbapi_ipc, FALSE, 
-                               stonithd_hb_msg_dispatch, (gpointer)hb, 
+       G_main_add_ll_cluster(G_PRIORITY_HIGH, hb, FALSE, 
+                               stonithd_hb_msg_dispatch, NULL, 
                                stonithd_hb_msg_dispatch_destroy);
 
        return 0;
@@ -824,13 +824,16 @@
 
 
 static gboolean
-stonithd_hb_msg_dispatch(IPC_Channel * ipcchan, gpointer user_data)
+stonithd_hb_msg_dispatch(ll_cluster_t * hb, gpointer user_data)
 {
-       ll_cluster_t *hb = (ll_cluster_t*)user_data;
-    
+       if (hb == NULL) {
+               stonithd_log(LOG_ERR, "parameter error: hb==NULL");
+               return FALSE;
+       } 
        while (hb->llc_ops->msgready(hb)) {
-               /* FIXME:  This should be a higher-level API function (broken 
API) */
                if (hb->llc_ops->ipcchan(hb)->ch_status == IPC_DISCONNECT) {
+                       stonithd_log(LOG_ERR
+                                    , "Disconnected with heartbeat daemon");
                        stonithd_quit(0);
                }
                /* invoke the callbacks with none-block mode */
@@ -1360,7 +1363,6 @@
 static gboolean
 accept_client_connect_callback(IPC_Channel * ch, gpointer user)
 {
-       GCHSource * gsrc = NULL;        
        stonithd_client_t * signed_client = NULL;
 
        if (ch == NULL) {
@@ -1370,8 +1372,6 @@
 
        stonithd_log2(LOG_DEBUG, "IPC accepted a callback connection.");
        
-       g_hash_table_insert(chan_gsource_pairs, ch, gsrc);
-
        signed_client = find_client_by_farpid(client_list, ch->farside_pid);
        if (signed_client != NULL) {
                signed_client->cbch = ch;       
@@ -3532,6 +3532,9 @@
 
 /* 
  * $Log: stonithd.c,v $
+ * Revision 1.93  2006/06/18 14:19:38  sunjd
+ * bug1183: use the new API of heartbeat to avoid message delay; remove 
redundant code
+ *
  * Revision 1.92  2006/06/15 10:45:27  sunjd
  * bug1272: add a channel for callback functions
  *




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

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


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

Reply via email to