Skip to contentSkip to conversation

Cluster Project branch, master, updated. cluster-2.99.05-47-gcfbf8e8

Cluster-devel [email protected] 1 participant 1 message Jul 3, 2008

lore
Share & tools
lore
#0 lore raw

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=cfbf8e8fd634667de2b02344fadb6452080556af

The branch, master has been updated

       via  cfbf8e8fd634667de2b02344fadb6452080556af (commit)
      from  58302ba8a4b0da965f0827f048070b8c514070c2 (commit)

Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.

- Log ----------------------------------------------------------------- commit cfbf8e8fd634667de2b02344fadb6452080556af

Author: Christine Caulfield <[email protected]>
Date:   Thu Jul 3 14:11:43 2008 +0100

[CMAN] Fix logging options

Fix up the logging for the cman plugin so that it consistently honours both settings in cluster.conf and 'cman_tool join -d'.

This has exposed a couple of bugs in openais which should be addressed shortly.

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

Summary of changes:

 cman/daemon/ais.c            |   28 +++---------
 cman/daemon/barrier.c        |    1 +
 cman/daemon/cman-preconfig.c |   98 ++++++++++++++++++++++++++++++-----------
 cman/daemon/cman.h           |    3 +
 cman/daemon/cmanconfig.c     |    3 +-
 cman/daemon/cnxman-private.h |    3 -
 cman/daemon/commands.c       |    1 +
 cman/daemon/logging.c        |    1 +
 cman/daemon/logging.h        |    4 +-
 9 files changed, 88 insertions(+), 54 deletions(-)
cman/daemon/ais.c +7 -21
index 6c05397..65ebc2e 100644
@@ -145,42 +145,28 @@ static int cman_exec_init_fn(struct objdb_iface_ver0 *objdb)
 	unsigned int object_handle;
 	char pipe_msg[256];
 
-	if (getenv("CMAN_DEBUGLOG"))
-		debug_mask = atoi(getenv("CMAN_DEBUGLOG"));
-
-	set_debuglog(debug_mask);
-
-	/* We need to set this up to internal defaults too early */
-	openlog("openais", LOG_CONS|LOG_PID, SYSLOGFACILITY);
-
-	/* Enable stderr logging if requested by cman_tool */
-	if (debug_mask) {
-		logsys_config_subsys_set("CMAN", LOGSYS_TAG_LOG, LOG_DEBUG);
-	}
-
 	if (getenv("CMAN_PIPE"))
                 startup_pipe = atoi(getenv("CMAN_PIPE"));
 
-	P_DAEMON("CMAN starting");
-
         /* Get our config variables */
 	objdb->object_find_reset(OBJECT_PARENT_HANDLE);
 	objdb->object_find(OBJECT_PARENT_HANDLE,
 		"cluster", strlen("cluster"), &cluster_parent_handle);
 
+	objdb->object_find_reset(cluster_parent_handle);
 	if (objdb->object_find(cluster_parent_handle, "cman", strlen("cman"), &object_handle) == 0)
 	{
 		objdb_get_int(objdb, object_handle, "quorum_dev_poll", &quorumdev_poll);
 		objdb_get_int(objdb, object_handle, "shutdown_timeout", &shutdown_timeout);
 		objdb_get_int(objdb, object_handle, "ccsd_poll", &ccsd_poll_interval);
+		objdb_get_int(objdb, object_handle, "debug_mask", &debug_mask);
 
-		/* Only use the CCS version of this if it was not overridden on the command-line */
-		if (!getenv("CMAN_DEBUGLOG"))
-		{
-			objdb_get_int(objdb, object_handle, "debug_mask", &debug_mask);
-			set_debuglog(debug_mask);
-		}
+		/* All other debugging options should already have been set in preconfig */
+		set_debuglog(debug_mask);
 	}
+	log_printf(LOG_DEBUG, "CC: debug message");
+	log_printf(LOG_INFO, "CC: info message");
+	P_DAEMON(CMAN_NAME " starting");
 
 	/* Open local sockets and initialise I/O queues */
 	read_cman_config(objdb, &config_version);
cman/daemon/barrier.c +1 -0
index 3242e03..63c2c64 100644
@@ -27,6 +27,7 @@
 #include "commands.h"
 #include "logging.h"
 #include "barrier.h"
+#include "cman.h"
 #include "ais.h"
 
 extern int we_are_a_cluster_member;
cman/daemon/cman-preconfig.c +71 -27

149 lines not on this page · raw message

cman/daemon/cman.h +3 -0
index e0203a4..748602a 100644
@@ -1,3 +1,6 @@
 /* General cman bits */
 extern int write_cman_pipe(char *message);
 extern void close_cman_pipe(void);
+
+/* How we announce ourself in syslog */
+#define CMAN_NAME "CMAN"
cman/daemon/cmanconfig.c +2 -1
index 294724e..98b615b 100644
@@ -16,11 +16,12 @@
 #include "cnxman-private.h"
 #include "logging.h"
 #include "commands.h"
+#include "cman.h"
 #include "cmanconfig.h"
 LOGSYS_DECLARE_SUBSYS (CMAN_NAME, LOG_INFO);
 #include "nodelist.h"
 #include "ais.h"
-#include "cman.h"
+
 
 /* Local vars - things we get from ccs */
        int two_node;
cman/daemon/cnxman-private.h +0 -3
index 83d40de..aa012bb 100644
@@ -8,9 +8,6 @@
 #define CNXMAN_MINOR_VERSION 1
 #define CNXMAN_PATCH_VERSION 0
 
-/* How we announce ourself in syslog */
-#define CMAN_NAME "CMAN"
-
 struct cman_timer
 {
 	struct list list;
cman/daemon/commands.c +1 -0
index 7b9fd75..ebc0253 100644
@@ -28,6 +28,7 @@
 #include <openais/service/timer.h>
 #include <openais/totem/aispoll.h>
 #include "list.h"
+#include "cman.h"
 #include "cnxman-socket.h"
 #include "cnxman-private.h"
 #include "daemon.h"
cman/daemon/logging.c +1 -0
index eb488d7..727c4ad 100644
@@ -10,6 +10,7 @@
 
 #include <openais/service/logsys.h>
 #include "list.h"
+#include "cman.h"
 #include "cnxman-socket.h"
 #include "cnxman-private.h"
 #include "logging.h"
cman/daemon/logging.h +2 -2
index 6a25e76..f2d84cd 100644
@@ -11,7 +11,7 @@ extern void set_debuglog(int subsystems);
 
 extern int subsys_mask;
 
-#define P_BARRIER(fmt, args...) if (subsys_mask & CMAN_DEBUG_BARRIER) log_printf(logsys_mkpri(LOG_LEVEL_DEBUG, logsys_subsys_id), "barrier: " fmt, ## args)
-#define P_MEMB(fmt, args...)    if (subsys_mask & CMAN_DEBUG_MEMB) log_printf(LOG_LEVEL_DEBUG , "memb: " fmt, ## args)
+#define P_BARRIER(fmt, args...) if (subsys_mask & CMAN_DEBUG_BARRIER) log_printf(LOG_LEVEL_DEBUG, "barrier: " fmt, ## args)
+#define P_MEMB(fmt, args...)    if (subsys_mask & CMAN_DEBUG_MEMB) log_printf(LOG_LEVEL_DEBUG, "memb: " fmt, ## args)
 #define P_DAEMON(fmt, args...)  if (subsys_mask & CMAN_DEBUG_DAEMON) log_printf(LOG_LEVEL_DEBUG , "daemon: " fmt, ## args)
 #define P_AIS(fmt, args...)     if (subsys_mask & CMAN_DEBUG_AIS) log_printf(LOG_LEVEL_DEBUG, "ais " fmt, ## args)

hooks/post-receive
--
Cluster Project