]> sourceware.org Git - lvm2.git/commitdiff
change clogd to cmirrord
authorAlasdair Kergon <agk@redhat.com>
Fri, 28 Aug 2009 20:51:40 +0000 (20:51 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 28 Aug 2009 20:51:40 +0000 (20:51 +0000)
make pidfile locn configurable

WHATS_NEW
configure
configure.in
daemons/Makefile.in
daemons/clogd/Makefile.in
daemons/clogd/clogd.c
lib/misc/configure.h.in

index d57fa7b7e54d44ff8dd6b7b43c95165f8d041ecd..f527b0e333f225a5e5999d7736f3832272a7e140 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -5,7 +5,7 @@ Version 2.02.52 -
   Fix pvcreate string termination in duplicate uuid warning message.
   Fix pvcreate on a partition (2.02.51).
   Fix vgcfgrestore error paths when locking fails (2.02.49).
-  Added configure --enable-clogd to conditionally build the cluster log daemon.
+  Added configure --enable-cmirrord to build the cluster mirror log daemon.
   Make lvchange --refresh only take a read lock on volume group.
   Fix bug where non-blocking file locks could be granted in error.
   Make lvm2app pv_t, lv_t, vg_t handle definitions consistent with lvm_t.
index 8d36b447e581a1932b847f0c018f06cf4499faa7..1aa2060b8700e32c04d0d61e38d423227fa3c338 100755 (executable)
--- a/configure
+++ b/configure
@@ -688,13 +688,13 @@ DEBUG
 COPTIMISE_FLAG
 CONFDIR
 CMDLIB
-CLOGD
 CLVMD
 CLUSTER
 CLDWHOLEARCHIVE
 CLDNOWHOLEARCHIVE
 CLDFLAGS
 BUILD_DMEVENTD
+BUILD_CMIRRORD
 APPLIB
 MODPROBE_CMD
 MSGFMT
@@ -814,7 +814,8 @@ with_mirrors
 enable_readline
 enable_realtime
 with_clvmd
-enable_clogd
+enable_cmirrord
+with_cmirrord_pidfile
 enable_debug
 with_optimisation
 enable_profiling
@@ -1502,7 +1503,7 @@ Optional Features:
                           device-mapper is missing from the kernel
   --disable-readline      Disable readline support
   --disable-realtime      Disable realtime clock support
-  --enable-clogd          Enable the cluster log daemon
+  --enable-cmirrord       Enable the cluster mirror log daemon
   --enable-debug          Enable debugging
   --enable-profiling      Gather gcov profiling data
   --disable-devmapper     Disable LVM2 device-mapper interaction
@@ -1545,6 +1546,7 @@ Optional Packages:
                            * all                   (autodetect)
                            * none                  (disable build)
                           TYPE=none
+  --with-cmirrord-pidfile=PATH    cmirrord pidfile [/var/run/cmirrord.pid]
   --with-optimisation=OPT C optimisation flag [OPT=-O2]
   --with-localedir=DIR    Translation files in DIR [PREFIX/share/locale]
   --with-confdir=DIR      Configuration files in DIR [/etc]
@@ -11653,19 +11655,45 @@ $as_echo "Enabling clvmd openais backend" >&6; }
 fi
 
 ################################################################################
-{ $as_echo "$as_me:$LINENO: checking whether to build cluster log daemon" >&5
-$as_echo_n "checking whether to build cluster log daemon... " >&6; }
-# Check whether --enable-clogd was given.
-if test "${enable_clogd+set}" = set; then
-  enableval=$enable_clogd; CLOGD=$enableval
+{ $as_echo "$as_me:$LINENO: checking whether to build cluster mirror log daemon" >&5
+$as_echo_n "checking whether to build cluster mirror log daemon... " >&6; }
+# Check whether --enable-cmirrord was given.
+if test "${enable_cmirrord+set}" = set; then
+  enableval=$enable_cmirrord; CMIRRORD=$enableval
+else
+  CMIRRORD=no
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $CLOGD" >&5
-$as_echo "$CLOGD" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $CMIRRORD" >&5
+$as_echo "$CMIRRORD" >&6; }
+
+BUILD_CMIRRORD=$CMIRRORD
+
+################################################################################
+
 
-if [ "x$CLOGD" = xall -o `expr x"$CLOGD" : '.*corosync.*'` != 0 ]; then
+if test "x$BUILD_CMIRRORD" = xyes; then
+
+# Check whether --with-cmirrord-pidfile was given.
+if test "${with_cmirrord_pidfile+set}" = set; then
+  withval=$with_cmirrord_pidfile;  cat >>confdefs.h <<_ACEOF
+#define CMIRRORD_PIDFILE "$withval"
+_ACEOF
+
+else
+   cat >>confdefs.h <<_ACEOF
+#define CMIRRORD_PIDFILE "/var/run/cmirrord.pid"
+_ACEOF
+
+fi
+
+fi
+
+################################################################################
+if [ "x$BUILD_CMIRRORD" = xyes ]; then
 #
 #       FIXME: ALSO NEED TO CHECK FOR CHECKPOINT MODULE
+#       FIXME: Merge this with the new clvmd logic
 #
 
 pkg_failed=no
index 651ba6a3430af9dbbdded670d311fc3b3283381b..cf74d071392249046795f150d87d9d09204c65a5 100644 (file)
@@ -550,16 +550,30 @@ if test x$CLVMD = xall; then
 fi
 
 ################################################################################
-dnl -- Build cluster log daemon
-AC_MSG_CHECKING(whether to build cluster log daemon)
-AC_ARG_ENABLE(clogd, [  --enable-clogd          Enable the cluster log daemon],
-CLOGD=$enableval)
-AC_MSG_RESULT($CLOGD)
+dnl -- Build cluster mirror log daemon
+AC_MSG_CHECKING(whether to build cluster mirror log daemon)
+AC_ARG_ENABLE(cmirrord, [  --enable-cmirrord       Enable the cluster mirror log daemon],
+CMIRRORD=$enableval, CMIRRORD=no)
+AC_MSG_RESULT($CMIRRORD)
 
+BUILD_CMIRRORD=$CMIRRORD
+
+################################################################################
+dnl -- cmirrord pidfile
+AH_TEMPLATE(CMIRRORD_PIDFILE, [Path to cmirrord pidfile.])
+if test "x$BUILD_CMIRRORD" = xyes; then
+       AC_ARG_WITH(cmirrord-pidfile,
+                   [  --with-cmirrord-pidfile=PATH    cmirrord pidfile [[/var/run/cmirrord.pid]] ],
+                   [ AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE,"$withval") ],
+                   [ AC_DEFINE_UNQUOTED(CMIRRORD_PIDFILE,"/var/run/cmirrord.pid") ])
+fi
+
+################################################################################
 dnl -- Look for corosync libraries if required.
-if [[ "x$CLOGD" = xall -o `expr x"$CLOGD" : '.*corosync.*'` != 0 ]]; then
+if [[ "x$BUILD_CMIRRORD" = xyes ]]; then
 #
 #       FIXME: ALSO NEED TO CHECK FOR CHECKPOINT MODULE
+#       FIXME: Merge this with the new clvmd logic
 #
        PKG_CHECK_MODULES(CPG, libcpg, [],
                [AC_MSG_RESULT([no pkg for libcpg library, using -lcpg]);
@@ -1007,6 +1021,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
 
 ################################################################################
 AC_SUBST(APPLIB)
+AC_SUBST(BUILD_CMIRRORD)
 AC_SUBST(BUILD_DMEVENTD)
 AC_SUBST(CCS_CFLAGS)
 AC_SUBST(CCS_LIBS)
@@ -1017,7 +1032,6 @@ AC_SUBST(CLDNOWHOLEARCHIVE)
 AC_SUBST(CLDWHOLEARCHIVE)
 AC_SUBST(CLUSTER)
 AC_SUBST(CLVMD)
-AC_SUBST(CLOGD)
 AC_SUBST(CMAN_CFLAGS)
 AC_SUBST(CMAN_LIBS)
 AC_SUBST(CMDLIB)
index 4d8d36b49a8a904961d5ad56f4529d6a4d501e40..bcbbfd397c334667027ae178d845e702ceef25fc 100644 (file)
@@ -21,16 +21,16 @@ ifneq ("@CLVMD@", "none")
   SUBDIRS = clvmd
 endif
 
-ifeq ("@CLOGD@", "yes")
-  SUBDIRS += clogd
+ifeq ("@BUILD_CMIRRORD@", "yes")
+  SUBDIRS += cmirrord
 endif
 
-ifeq ("@DMEVENTD@", "yes")
+ifeq ("@BUILD_DMEVENTD@", "yes")
   SUBDIRS += dmeventd
 endif
 
 include $(top_srcdir)/make.tmpl
 
-ifeq ("@DMEVENTD@", "yes")
+ifeq ("@BUILD_DMEVENTD@", "yes")
 device-mapper: dmeventd.device-mapper
 endif
index be4c9236329f8861f23fedec9c59410c7fe80a8f..ce13d0241f718a1f7c579d4e69947dbb976f454e 100644 (file)
@@ -17,22 +17,17 @@ VPATH = @srcdir@
 
 SOURCES = clogd.c cluster.c functions.c link_mon.c local.c logging.c
 
-ifeq ("@DEBUG@", "yes")
-       DEFS += -DDEBUG
-endif
-
-TARGETS = clogd
+TARGETS = cmirrord
 
 include $(top_srcdir)/make.tmpl
 
 LDFLAGS += -L$(usrlibdir)/openais
 LIBS += -lcpg -lSaCkpt -ldevmapper
 
-clogd: $(OBJECTS) $(top_srcdir)/lib/liblvm-internal.a
-       echo $(LIBS)
-       $(CC) -o clogd $(OBJECTS) $(CFLAGS) $(LDFLAGS) \
+cmirrord: $(OBJECTS) $(top_srcdir)/lib/liblvm-internal.a
+       $(CC) -o cmirrord $(OBJECTS) $(CFLAGS) $(LDFLAGS) \
                $(LVMLIBS) $(LMLIBS) $(LIBS)
 
 install: $(TARGETS)
-       $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) clogd \
-               $(usrsbindir)/clogd
+       $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) cmirrord \
+               $(usrsbindir)/cmirrord
index 6a32ed84a10a8f7dffddc42873d08221291e2249..bfb74fadc384e23c68548b533fa00aed398511cd 100644 (file)
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
        /* Parent can now exit, we're ready to handle requests */
        kill(getppid(), SIGTERM);
 
-       LOG_PRINT("Starting clogd:");
+       LOG_PRINT("Starting cmirrord:");
        LOG_PRINT(" Built: "__DATE__" "__TIME__"\n");
        LOG_DBG(" Compiled with debugging.");
 
@@ -233,9 +233,9 @@ static void daemonize(void)
        open("/dev/null", O_WRONLY); /* reopen stdout */
        open("/dev/null", O_WRONLY); /* reopen stderr */
 
-       LOG_OPEN("clogd", LOG_PID, LOG_DAEMON);
+       LOG_OPEN("cmirrord", LOG_PID, LOG_DAEMON);
 
-       if (create_lockfile("/var/run/clogd.pid"))
+       if (create_lockfile(CMIRRORD_PIDFILE))
                exit(EXIT_LOCKFILE);
 
        signal(SIGINT, &sig_handler);
index 955e32ca5e581f678e5c5410ceb24b6dbb713add..cd7858a68d5c521646e6459f51d7db2aaf4cc24a 100644 (file)
@@ -6,6 +6,9 @@
 /* Define to 1 to include built-in support for clustered LVM locking. */
 #undef CLUSTER_LOCKING_INTERNAL
 
+/* Path to cmirrord pidfile. */
+#undef CMIRRORD_PIDFILE
+
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
    */
This page took 0.06287 seconds and 5 git commands to generate.