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: include by sunjd from
([email protected])
2. Linux-HA CVS: lrm by sunjd from ([email protected])
3. Linux-HA CVS: mgmt by zhenh from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 18 Jun 2006 23:17:42 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by sunjd from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : sunjd
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include/fencing
Modified Files:
stonithd_msg.h
Log Message:
fix the duplicate names
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/fencing/stonithd_msg.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- stonithd_msg.h 15 Jun 2006 10:34:52 -0000 1.10
+++ stonithd_msg.h 19 Jun 2006 05:17:41 -0000 1.11
@@ -28,9 +28,9 @@
/* define the field name for messages stonithd used */
#define F_STONITHD_TYPE "stonithd"
-#define F_STONITHD_APIREQ "apireq" /* api request */
-#define F_STONITHD_APIRPL "apirpl" /* api reply */
-#define F_STONITHD_APIRET "apiret" /* api reply */
+#define F_STONITHD_APIREQ "reqest" /* api request */
+#define F_STONITHD_APIRPL "reply" /* api reply */
+#define F_STONITHD_APIRET "apiret" /* api return code */
#define F_STONITHD_CNAME "cname" /* client name */
#define F_STONITHD_CPID "cpid" /* client pid */
#define F_STONITHD_CEUID "ceuid" /* client executing uid */
------------------------------
Message: 2
Date: Sun, 18 Jun 2006 23:49:43 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lrm by sunjd from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : sunjd
Host :
Project : linux-ha
Module : lrm
Dir : linux-ha/lrm/lrmd
Modified Files:
lrmd.c
Log Message:
(bug1204)set child number limit as 16; degrade some related logs
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/lrmd/lrmd.c,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -3 -r1.224 -r1.225
--- lrmd.c 9 Jun 2006 06:28:19 -0000 1.224
+++ lrmd.c 19 Jun 2006 05:49:42 -0000 1.225
@@ -1,4 +1,4 @@
-/* $Id: lrmd.c,v 1.224 2006/06/09 06:28:19 sunjd Exp $ */
+/* $Id: lrmd.c,v 1.225 2006/06/19 05:49:42 sunjd Exp $ */
/*
* Local Resource Manager Daemon
*
@@ -308,6 +308,7 @@
static void hash_to_str(GHashTable * , GString *);
static void hash_to_str_foreach(gpointer key, gpointer value, gpointer
userdata);
static void warning_on_active_rsc(gpointer key, gpointer value, gpointer
user_data);
+static void check_queue_duration(lrmd_op_t* op);
/*
* following functions are used to monitor the exit of ra proc
@@ -359,6 +360,8 @@
static gboolean shutdown_in_progress = FALSE;
static unsigned long apphb_interval = 2000; /* Millisecond */
static gboolean reg_to_apphbd = FALSE;
+static int MAX_CHILD_NUMBER = 16;
+static int child_number = 0;
/*
* Daemon functions
@@ -2524,7 +2527,7 @@
rsc->op_list = g_list_append(rsc->op_list, op);
if (g_list_length(rsc->op_list) >= 4) {
- lrmd_log(LOG_ERR
+ lrmd_log(LOG_WARNING
, "%s: Operations list for %s is
suspicously"
" long [%d]"
, __FUNCTION__, rsc->id
@@ -3048,6 +3051,17 @@
, op_info(op));
break;
}
+
+ if (child_number >= MAX_CHILD_NUMBER) {
+ lrmd_log(LOG_NOTICE
+ , "Because the child number reachs the maximum"
+ " %d, the operations are postponed to execute"
+ " behind and including this: %s "
+ , MAX_CHILD_NUMBER
+ , op_info(op));
+ break;
+ }
+
if ( HA_OK != perform_ra_op(op)) {
lrmd_log(LOG_ERR
, "unable to perform_ra_op on %s"
@@ -3104,7 +3118,6 @@
const char* op_type = NULL;
GHashTable* params = NULL;
GHashTable* op_params = NULL;
- unsigned long t_stay_in_list = 0;
lrmd_rsc_t* rsc = NULL;
ra_pipe_op_t * rapop;
@@ -3129,19 +3142,8 @@
params = merge_str_tables(rsc->params,op_params);
free_str_table(op_params);
ha_msg_mod_str_table(op->msg, F_LRM_PARAM, params);
+ check_queue_duration(op);
- op->t_perform = time_longclock();
- t_stay_in_list = longclockto_ms(op->t_perform - op->t_addtolist);
- if ( t_stay_in_list > WARNINGTIME_IN_LIST)
- {
- lrmd_log(LOG_ERR
- , "perform_ra_op: the operation %s stayed in operation "
- "list for %lu ms (longer than %d ms)"
- , op_info(op), t_stay_in_list
- , WARNINGTIME_IN_LIST
- );
- dump_data_for_debug();
- }
if(HA_OK != ha_msg_value_int(op->msg, F_LRM_TIMEOUT, &timeout)){
timeout = 0;
lrmd_log(LOG_ERR,"perform_ra_op: failed to get timeout from "
@@ -3161,6 +3163,7 @@
return HA_FAIL;
default: /* Parent */
+ child_number++;
NewTrackedProc(pid, 1, PT_LOGNONE, op,
&ManagedChildTrackOps);
close(stdout_fd[1]);
@@ -3246,6 +3249,11 @@
int ret;
int op_status;
+ if (--child_number < 0) {
+ lrmd_log(LOG_ERR, "%s:%d: child number is less than zero: %d"
+ , __FUNCTION__, __LINE__, child_number);
+ }
+
CHECK_ALLOCATED(p, "ProcTrack p", );
op = p->privatedata;
lrmd_debug2(LOG_DEBUG, "on_ra_proc_finished: accessing the op whose "
@@ -3802,8 +3810,30 @@
, (char *)key, (char *)value);
str = g_string_append(str, buffer_tmp);
}
+
+static void
+check_queue_duration(lrmd_op_t* op)
+{
+ unsigned long t_stay_in_list = 0;
+ CHECK_ALLOCATED(op, "op", );
+ op->t_perform = time_longclock();
+ t_stay_in_list = longclockto_ms(op->t_perform - op->t_addtolist);
+ if ( t_stay_in_list > WARNINGTIME_IN_LIST)
+ {
+ lrmd_log(LOG_WARNING
+ , "perform_ra_op: the operation %s stayed in operation "
+ "list for %lu ms (longer than %d ms)"
+ , op_info(op), t_stay_in_list
+ , WARNINGTIME_IN_LIST
+ );
+ dump_data_for_debug();
+ }
+}
/*
* $Log: lrmd.c,v $
+ * Revision 1.225 2006/06/19 05:49:42 sunjd
+ * (bug1204)set child number limit as 16; degrade some related logs
+ *
* Revision 1.224 2006/06/09 06:28:19 sunjd
* bug1301
*
------------------------------
Message: 3
Date: Mon, 19 Jun 2006 02:02:44 -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:
cleanup a container resource == cleanup all children of it
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- haclient.py.in 18 Jun 2006 12:00:23 -0000 1.65
+++ haclient.py.in 19 Jun 2006 08:02:43 -0000 1.66
@@ -1318,7 +1318,7 @@
self.set_action_sensitive('cleanuprsc',
manager.connected
- and self.cur_type in [_("native")])
+ and self.cur_type in all_rsc_type)
self.set_action_sensitive('startrsc',
manager.connected
@@ -1507,7 +1507,11 @@
manager.do_cmd("move_rsc\n%s\ndown"%self.cur_name)
def on_item_cleanup(self, action) :
- manager.do_cmd("cleanup_rsc\n"+self.cur_name)
+ if self.cur_type == _("native") :
+ manager.do_cmd("cleanup_rsc\n"+self.cur_name)
+ elif self.cur_type in [_("group"),_("clone"),_("master")] :
+ for rsc in manager.get_rsc_sub_rsc(self.cur_name) :
+ manager.do_cmd("cleanup_rsc\n"+rsc)
def load_icon(self, name, file) :
icons = gtk.IconFactory()
------------------------------
_______________________________________________
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 59
********************************************