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 andrew from
([email protected])
2. Linux-HA CVS: lib by alan from ([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Fri, 3 Feb 2006 02:00:31 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/crm/common
Modified Files:
xml.c
Log Message:
Tweak
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/xml.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- xml.c 2 Feb 2006 08:58:58 -0000 1.55
+++ xml.c 3 Feb 2006 09:00:31 -0000 1.56
@@ -1,4 +1,4 @@
-/* $Id: xml.c,v 1.55 2006/02/02 08:58:58 andrew Exp $ */
+/* $Id: xml.c,v 1.56 2006/02/03 09:00:31 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -994,7 +994,9 @@
const char *
crm_element_name(const crm_data_t *data)
{
+#if CRM_DEV_BUILD
crm_validate_data(data);
+#endif
return cl_get_string(data, F_XML_TAGNAME);
}
------------------------------
Message: 2
Date: Fri, 3 Feb 2006 07:08:50 -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/clplumbing
Modified Files:
longclock.c
Log Message:
Put in code to detect times(2) jumping back. According to POSIX, this should
never happen...
Also made a few minor improvements to the code.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/longclock.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- longclock.c 1 Jun 2005 03:34:32 -0000 1.15
+++ longclock.c 3 Feb 2006 14:08:49 -0000 1.16
@@ -1,4 +1,4 @@
-/* $Id: longclock.c,v 1.15 2005/06/01 03:34:32 alan Exp $ */
+/* $Id: longclock.c,v 1.16 2006/02/03 14:08:49 alan Exp $ */
/*
* Longclock operations
*
@@ -25,18 +25,12 @@
#include <unistd.h>
#include <sys/times.h>
#include <clplumbing/longclock.h>
-
-#ifndef CLOCK_T_IS_LONG_ENOUGH
-static unsigned long lasttimes = 0L;
-static unsigned long wrapcount = 0;
-static longclock_t lc_wrapcount;
-#endif
+#include <clplumbing/cl_log.h>
static unsigned Hz = 0;
static longclock_t Lc_Hz;
static double d_Hz;
-#define WRAPSHIFT (8*sizeof(clock_t))
const longclock_t zero_longclock = 0UL;
@@ -79,12 +73,23 @@
#else /* clock_t is shorter than 64 bits */
+#define BITSPERBYTE 8
+#define WRAPSHIFT (BITSPERBYTE*sizeof(clock_t))
+#define MAXIMUMULONG ((unsigned long)~(0UL))
+#define ENDTIMES ((MAXIMUMULONG/100UL)*95UL)
+
longclock_t
time_longclock(void)
{
+ static gboolean calledbefore = FALSE;
+ static unsigned long lasttimes = 0L;
+ static unsigned long wrapcount = 0L;
+ static longclock_t lc_wrapcount = 0L;
+ static unsigned long callcount = 0L;
unsigned long timesval;
+ ++callcount;
/*
* times(2) really returns an unsigned value ...
*
@@ -92,23 +97,27 @@
* the only possibility for an error would be if the address of
* longclock_dummy_tms_struct was invalid. Since it's a
compiler-generated
* address, we assume that errors are impossible. And, unfortunately,
it is
- * theoretically possible for the correct return from times(2) to be
exactly
+ * quite possible for the correct return from times(2) to be exactly
* (clock_t)-1. Sigh...
*
*/
timesval = (unsigned long) times(&longclock_dummy_tms_struct);
- if (!lasttimes) {
- lasttimes = timesval;
- }
-
-
- if (timesval < lasttimes) {
+ if (calledbefore && timesval < lasttimes) {
++wrapcount;
lc_wrapcount = ((longclock_t)wrapcount) << WRAPSHIFT;
+ if (lasttimes < (unsigned long)ENDTIMES) {
+ /* This means it jumped by an improbably long amount...
*/
+ cl_log(LOG_CRIT
+ , "%s: clock_t from times(2) appears to have
jumped backwards!"
+ , __FUNCTION__);
+ cl_log(LOG_CRIT
+ , "%s: old value was %lu, new value is %lu,
callcount %lu"
+ , __FUNCTION__, lasttimes, timesval, callcount);
+ }
}
-
lasttimes = timesval;
+ calledbefore = TRUE;
return (lc_wrapcount | (longclock_t)timesval);
}
#endif /* ! CLOCK_T_IS_LONG_ENOUGH */
------------------------------
Message: 3
Date: Fri, 3 Feb 2006 08:01:40 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/crmd
Modified Files:
control.c crmd_utils.h subsystems.c pengine.c tengine.c
Log Message:
Fix for 1060: The transition wont complete until the node leaves and the
node wont leave until the TE exits (which wont happen until the transition
completes). So force the child to exit.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/crmd_utils.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- crmd_utils.h 10 Jan 2006 13:46:42 -0000 1.21
+++ crmd_utils.h 3 Feb 2006 15:01:39 -0000 1.22
@@ -1,4 +1,4 @@
-/* $Id: crmd_utils.h,v 1.21 2006/01/10 13:46:42 andrew Exp $ */
+/* $Id: crmd_utils.h,v 1.22 2006/02/03 15:01:39 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -54,7 +54,8 @@
extern void create_node_entry(
const char *uuid, const char *uname, const char *type);
-extern gboolean stop_subsystem (struct crm_subsystem_s *centry);
+extern gboolean stop_subsystem (
+ struct crm_subsystem_s *centry, gboolean force_quit);
extern gboolean start_subsystem(struct crm_subsystem_s *centry);
extern lrm_op_t *copy_lrm_op(const lrm_op_t *op);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/subsystems.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -3 -r1.89 -r1.90
--- subsystems.c 12 Jan 2006 15:10:42 -0000 1.89
+++ subsystems.c 3 Feb 2006 15:01:39 -0000 1.90
@@ -93,7 +93,7 @@
};
gboolean
-stop_subsystem(struct crm_subsystem_s* the_subsystem)
+stop_subsystem(struct crm_subsystem_s* the_subsystem, gboolean force_quit)
{
IPC_Channel *client_channel = the_subsystem->ipc;
crm_debug_2("Stopping sub-system \"%s\"", the_subsystem->name);
@@ -101,7 +101,8 @@
if (the_subsystem->pid <= 0) {
crm_debug_2("Client %s not running", the_subsystem->name);
-
+ return FALSE;
+
} else if(FALSE == is_set(
fsa_input_register, the_subsystem->flag_connected)) {
/* running but not yet connected */
@@ -115,6 +116,10 @@
|| client_channel->ops->get_chan_status(
client_channel) != IPC_CONNECT) {
crm_debug("Client %s has already quit", the_subsystem->name);
+
+ } else if(force_quit) {
+ CL_KILL(the_subsystem->pid, -SIGKILL);
+ the_subsystem->pid = -1;
} else {
HA_Message *quit = create_request(
@@ -176,6 +181,8 @@
default: /* Parent */
NewTrackedProc(pid, 0, PT_LOGNORMAL,
the_subsystem, &crmd_managed_child_ops);
+ crm_debug_2("Client %s is has pid: %d",
+ the_subsystem->name, pid);
the_subsystem->pid = pid;
return TRUE;
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/pengine.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- pengine.c 3 Feb 2006 08:29:22 -0000 1.37
+++ pengine.c 3 Feb 2006 15:01:39 -0000 1.38
@@ -71,9 +71,7 @@
long long start_actions = A_PE_START;
if(action & stop_actions) {
- if(stop_subsystem(this_subsys) == FALSE) {
- register_fsa_error(C_FSA_INTERNAL, I_FAIL, NULL);
- }
+ stop_subsystem(this_subsys, FALSE);
}
if(action & start_actions) {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/tengine.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- tengine.c 10 Jan 2006 13:46:42 -0000 1.25
+++ tengine.c 3 Feb 2006 15:01:39 -0000 1.26
@@ -72,9 +72,7 @@
/* } */
if(action & stop_actions) {
- if(stop_subsystem(this_subsys) == FALSE) {
- register_fsa_error(C_FSA_INTERNAL, I_FAIL, NULL);
- }
+ stop_subsystem(this_subsys, FALSE);
}
if(action & start_actions) {
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 27, Issue 21
********************************************