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 davidlee from
([email protected])
2. Linux-HA CVS: crm by andrew from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
4. Linux-HA CVS: include by andrew from
([email protected])
5. Linux-HA CVS: lib by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Fri, 17 Mar 2006 08:08:52 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by davidlee from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : davidlee
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/crm/common
Modified Files:
xml.c
Log Message:
Fix a compiler warning on some platforms
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/xml.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- xml.c 11 Mar 2006 18:59:47 -0000 1.59
+++ xml.c 17 Mar 2006 15:08:52 -0000 1.60
@@ -1,4 +1,4 @@
-/* $Id: xml.c,v 1.59 2006/03/11 18:59:47 andrew Exp $ */
+/* $Id: xml.c,v 1.60 2006/03/17 15:08:52 davidlee Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -1133,7 +1133,7 @@
default:
if('a' <= ch && ch <= 'z') {
} else if('A' <= ch && ch <= 'Z') {
- } else if(isdigit(ch)) {
+ } else if(isdigit((int) ch)) {
} else if(ch == '_') {
} else if(ch == '-') {
} else {
------------------------------
Message: 2
Date: Fri, 17 Mar 2006 10:55:52 -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/admin
Added Files:
crm_primitive.py.in
Log Message:
A script for creating primitive resources
------------------------------
Message: 3
Date: Fri, 17 Mar 2006 10:57:13 -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/admin
Modified Files:
crm_resource.c
Log Message:
Exit if the connection to the CIB or CRMd cant be established
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_resource.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- crm_resource.c 11 Mar 2006 19:20:01 -0000 1.16
+++ crm_resource.c 17 Mar 2006 17:57:13 -0000 1.17
@@ -1,4 +1,4 @@
-/* $Id: crm_resource.c,v 1.16 2006/03/11 19:20:01 andrew Exp $ */
+/* $Id: crm_resource.c,v 1.17 2006/03/17 17:57:13 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -615,18 +615,17 @@
our_pid[10] = '\0';
}
- if(rc != cib_ok) {
- fprintf(stderr, "Error signing on to the CIB service: %s\n",
- cib_error2string(rc));
- return rc;
- }
-
if(rsc_cmd == 'L' || rsc_cmd == 'W' || rsc_cmd == 'D' || rsc_cmd == 'Q'
|| rsc_cmd == 'p' || rsc_cmd == 'M' || rsc_cmd == 'U'
|| rsc_cmd == 'G' || rsc_cmd == 'g') {
cib_conn = cib_new();
rc = cib_conn->cmds->signon(
cib_conn, crm_system_name, cib_command_synchronous);
+ if(rc != cib_ok) {
+ fprintf(stderr, "Error signing on to the CIB service:
%s\n",
+ cib_error2string(rc));
+ return rc;
+ }
set_working_set_defaults(&data_set);
if(rsc_cmd != 'D' && rsc_cmd != 'U') {
@@ -642,6 +641,12 @@
src = init_client_ipc_comms(CRM_SYSTEM_CRMD, crmd_msg_callback,
NULL, &crmd_channel);
+ if(src == NULL) {
+ fprintf(stderr,
+ "Error signing on to the CRMd service\n");
+ return 1;
+ }
+
send_hello_message(
crmd_channel, our_pid, crm_system_name, "0", "1");
@@ -752,6 +757,7 @@
} else if(rsc_cmd == 'C') {
delete_lrm_rsc(crmd_channel, host_uname, rsc_id);
+ sleep(10);
refresh_lrm(crmd_channel, host_uname);
} else {
------------------------------
Message: 4
Date: Fri, 17 Mar 2006 10:59:32 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include/crm
Modified Files:
crm.h
Log Message:
Code for non-destructivly producing a core file when non-fatal asserts
are tirggered.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/crm.h,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -3 -r1.87 -r1.88
--- crm.h 21 Feb 2006 14:41:31 -0000 1.87
+++ crm.h 17 Mar 2006 17:59:32 -0000 1.88
@@ -1,4 +1,4 @@
-/* $Id: crm.h,v 1.87 2006/02/21 14:41:31 andrew Exp $ */
+/* $Id: crm.h,v 1.88 2006/03/17 17:59:32 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -54,24 +54,21 @@
#include <crm/common/util.h>
#define CRM_ASSERT(expr) if((expr) == FALSE) { \
- do_crm_log(LOG_CRIT, __FILE__, __PRETTY_FUNCTION__, \
- "Triggered dev assert at %s:%d : %s", \
- __FILE__, __LINE__, #expr); \
- abort(); \
- }
+ crm_abort(__FILE__, __PRETTY_FUNCTION__, __LINE__, #expr, FALSE); \
+}
extern gboolean crm_assert_failed;
-#define CRM_DEV_ASSERT(expr) crm_assert_failed = FALSE;
\
+#define CRM_DEV_ASSERT(expr) \
+ crm_assert_failed = FALSE; \
if((expr) == FALSE) { \
crm_assert_failed = TRUE; \
- do_crm_log(CRM_DEV_BUILD?LOG_CRIT:LOG_ERR, \
- __FILE__, __PRETTY_FUNCTION__, \
- "Triggered dev assert at %s:%d : %s", \
- __FILE__, __LINE__, #expr); \
- if(CRM_DEV_BUILD) { \
- abort(); \
- } \
+ crm_abort(__FILE__,__PRETTY_FUNCTION__,__LINE__, #expr, TRUE); \
+ }
+
+#define CRM_CHECK(expr, failure_action) if((expr) == FALSE) { \
+ crm_abort(__FILE__,__PRETTY_FUNCTION__,__LINE__, #expr, TRUE); \
+ failure_action; \
}
/* Clean these up at some point, some probably should be runtime options */
------------------------------
Message: 5
Date: Fri, 17 Mar 2006 10:59:33 -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:
utils.c
Log Message:
Code for non-destructivly producing a core file when non-fatal asserts
are tirggered.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/crm/common/utils.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- utils.c 16 Mar 2006 23:35:25 -0000 1.34
+++ utils.c 17 Mar 2006 17:59:32 -0000 1.35
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.34 2006/03/16 23:35:25 andrew Exp $ */
+/* $Id: utils.c,v 1.35 2006/03/17 17:59:32 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -1184,3 +1184,37 @@
active_stats->arena = 0;
}
+
+void
+crm_abort(const char *file, const char *function, int line,
+ const char *assert_condition, gboolean do_fork)
+{
+ int pid = 0;
+
+ if(do_fork) {
+ pid=fork();
+ }
+
+ switch(pid) {
+ case -1:
+ crm_err("Cannot fork!");
+ return;
+
+ default: /* Parent */
+ crm_debug("Child %d forked to record assert failure",
pid);
+ return;
+
+ case 0: /* Child */
+ break;
+ }
+
+ /* create a new process group to avoid
+ * being interupted by heartbeat
+ */
+ setpgid(0, 0);
+ do_crm_log(LOG_ERR, file, function,
+ "Triggered %sfatal assert at %s:%d : %s",
+ do_fork?"non-":"", file, line, assert_condition);
+
+ abort();
+}
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 28, Issue 36
********************************************