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: lib by sunjd from ([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
4. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 28 Mar 2006 18:31:10 -0700 (MST)
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_lrm.c
Log Message:
remove a useless log
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_lrm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- mgmt_lrm.c 2 Mar 2006 14:01:59 -0000 1.3
+++ mgmt_lrm.c 29 Mar 2006 01:31:09 -0000 1.4
@@ -49,8 +49,6 @@
int ret;
int i, max_try = 5;
- mgmt_log(LOG_INFO,"init_lrm");
-
lrm = ll_lrm_new("lrm");
for (i = 0; i < max_try ; i++) {
ret = lrm->lrm_ops->signon(lrm,"mgmtd");
------------------------------
Message: 2
Date: Tue, 28 Mar 2006 19:31:13 -0700 (MST)
From: [email protected]
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/plugins/lrm
Modified Files:
raexecstonith.c
Log Message:
tweak log and correct a typo
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/lrm/raexecstonith.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- raexecstonith.c 7 Mar 2006 10:09:57 -0000 1.14
+++ raexecstonith.c 29 Mar 2006 02:31:13 -0000 1.15
@@ -300,9 +300,8 @@
Stonith * stonith_obj = NULL;
if ( provider != NULL ) {
- cl_log(LOG_ERR, "stonithRA plugin: now donnot take the provider"
- " into account.");
- return NULL;
+ cl_log(LOG_NOTICE, "stonithRA plugin: provider attribution "
+ "isnot needed and will be ignored.");
}
stonith_obj = stonith_new(rsc_type);
@@ -323,20 +322,22 @@
}
/*
- * Currently should return *providers = NULL, but rmain the old code for
+ * Currently should return *providers = NULL, but remain the old code for
* possible unsing in the future
*/
static int
get_providers(const char* class_path, const char* op_type, GList ** providers)
{
if ( providers == NULL ) {
- cl_log(LOG_ERR, "Parameter error: get_providers");
+ cl_log(LOG_ERR, "%s:%d: Parameter error: providers==NULL"
+ , __FUNCTION__, __LINE__);
return -2;
}
if ( *providers != NULL ) {
- cl_log(LOG_ERR, "Parameter error: get_providers."\
- "will cause memory leak.");
+ cl_log(LOG_ERR, "%s:%d: Parameter error: *providers==NULL."
+ "This will cause memory leak."
+ , __FUNCTION__, __LINE__);
*providers = NULL;
}
------------------------------
Message: 3
Date: Tue, 28 Mar 2006 23:11:53 -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_verify.c
Log Message:
Add the ability to save the CIB used (so we can repeat the operation
with exactly the same input)
Fudge an apparent memory "leak" somewhere (potentially) in the messaging
layer (see bug 1162)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_verify.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- crm_verify.c 8 Feb 2006 12:34:25 -0000 1.4
+++ crm_verify.c 29 Mar 2006 06:11:52 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Id: crm_verify.c,v 1.4 2006/02/08 12:34:25 andrew Exp $ */
+/* $Id: crm_verify.c,v 1.5 2006/03/29 06:11:52 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -38,7 +38,7 @@
#include <crm/cib.h>
#include <clplumbing/lsb_exitcodes.h>
-#define OPTARGS "V?X:L"
+#define OPTARGS "V?X:LS:"
#ifdef HAVE_GETOPT_H
# include <getopt.h>
@@ -48,6 +48,7 @@
#include <crm/pengine/pe_utils.h>
gboolean USE_LIVE_CIB = FALSE;
+char *cib_save = NULL;
const char *crm_system_name = NULL;
void usage(const char *cmd, int exit_status);
extern void cleanup_calculations(pe_working_set_t *data_set);
@@ -90,6 +91,7 @@
static struct option long_options[] = {
/* Top-level Options */
{"xml-file", 1, 0, 'X'},
+ {"save-xml", 1, 0, 'S'},
{"live-check", 0, 0, 'L'},
{"help", 0, 0, '?'},
@@ -120,6 +122,9 @@
case 'X':
xml_file = crm_strdup(optarg);
break;
+ case 'S':
+ cib_save = crm_strdup(optarg);
+ break;
case 'V':
alter_debug(DEBUG_INC);
break;
@@ -155,20 +160,24 @@
crm_info("=#=#=#=#= Getting XML =#=#=#=#=");
- crm_zero_mem_stats(NULL);
-
if(USE_LIVE_CIB) {
cib_conn = cib_new();
rc = cib_conn->cmds->signon(
cib_conn, crm_system_name, cib_command_synchronous);
}
+ crm_zero_mem_stats(NULL);
+
if(USE_LIVE_CIB) {
if(rc == cib_ok) {
+ int options = cib_scope_local|cib_sync_call;
crm_info("Reading XML from: live cluster");
- cib_object = get_cib_copy(cib_conn);
-
- } else {
+ rc = cib_conn->cmds->query(
+ cib_conn, NULL, &cib_object, options);
+ }
+
+
+ if(rc != cib_ok) {
fprintf(stderr, "Live CIB query failed: %s\n",
cib_error2string(rc));
return 3;
@@ -177,7 +186,7 @@
fprintf(stderr, "Live CIB query failed: empty
result\n");
return 3;
}
-
+
} else if(xml_file != NULL) {
FILE *xml_strm = fopen(xml_file, "r");
crm_info("Reading XML from: %s", xml_file);
@@ -187,11 +196,15 @@
cib_object = stdin2xml();
}
- CRM_DEV_ASSERT(cib_object != NULL);
- if(cib_object == NULL) {
- fprintf(stderr, "No config supplied\n");
- return 3;
+ CRM_CHECK(cib_object != NULL,
+ fprintf(stderr, "No config supplied\n");
+ return 3;
+ );
+
+ if(cib_save != NULL) {
+ write_xml_file(cib_object, cib_save);
}
+
#if 0
status = get_object_root(XML_CIB_TAG_STATUS, cib_object);
xml_child_iter(status, node_state, XML_CIB_TAG_STATE,
@@ -210,6 +223,18 @@
cleanup_calculations(&data_set);
+ if(USE_LIVE_CIB) {
+ /* Calling msg2ipcchan() seems to initialize something
+ * which isn't free'd when we disconnect and free the
+ * CIB connection.
+ * Fake this extra free and move along.
+ */
+ volatile cl_mem_stats_t *active_stats = cl_malloc_getstats();
+ active_stats->numfree++;
+ }
+
+ CRM_CHECK(crm_mem_stats(NULL) == FALSE, ; );
+
if(was_config_error) {
fprintf(stderr, "Errors found during check: config not
valid\n");
if(crm_log_level < LOG_WARNING) {
@@ -230,9 +255,6 @@
cib_delete(cib_conn);
}
- crm_mem_stats(NULL);
- CRM_DEV_ASSERT(crm_mem_stats(NULL) == FALSE);
-
return 0;
}
------------------------------
Message: 4
Date: Tue, 28 Mar 2006 23:12:29 -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/tengine
Modified Files:
events.c
Log Message:
Logging tweak
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/events.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- events.c 28 Mar 2006 08:35:18 -0000 1.7
+++ events.c 29 Mar 2006 06:12:28 -0000 1.8
@@ -1,4 +1,4 @@
-/* $Id: events.c,v 1.7 2006/03/28 08:35:18 andrew Exp $ */
+/* $Id: events.c,v 1.8 2006/03/29 06:12:28 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -172,6 +172,7 @@
match_graph_event(
crm_action_t *action, crm_data_t *event, const char *event_node)
{
+ int log_level_fail = LOG_ERR;
int target_rc = 0;
const char *target_rc_s = NULL;
const char *allow_fail = NULL;
@@ -278,12 +279,18 @@
case LRM_OP_DONE:
break;
case LRM_OP_ERROR:
+ /* This is the code we use for direct nack's */
+ if(op_rc_i == 99) {
+ log_level_fail = LOG_WARNING;
+ }
+ /* fall through */
case LRM_OP_TIMEOUT:
case LRM_OP_NOTSUPPORTED:
action->failed = TRUE;
- crm_err("Action %s on %s failed (rc: %d vs. %d): %s",
- update_event, this_uname, target_rc, op_rc_i,
- op_status2text(op_status_i));
+ crm_log_maybe(log_level_fail,
+ "Action %s on %s failed (rc: %d vs. %d): %s",
+ update_event, this_uname, target_rc,
+ op_rc_i, op_status2text(op_status_i));
break;
case LRM_OP_CANCELLED:
/* do nothing?? */
------------------------------
_______________________________________________
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 78
********************************************