Gitweb: http://git.fedorahosted.org/git/rgmanager.git?p=rgmanager.git;a=commitdiff;h=31d270c5ebfb4d287c2665062825a4df9d83bacb Commit: 31d270c5ebfb4d287c2665062825a4df9d83bacb Parent: f2f475ccdf38752ea8f137d1c9b7ff149d22c3bd Author: Fabio M. Di Nitto AuthorDate: Wed Jul 8 08:37:31 2009 +0200 Committer: Fabio M. Di Nitto CommitterDate: Wed Jul 8 08:37:31 2009 +0200 build: convert to autoconf/automake/libtool requires: - autoconf 2.63b - automake 1.11 - libtool 2.2.7a - pkgconfig 0.23 - m4 1.4.13 Signed-off-by: Fabio M. Di Nitto --- .gitignore | 49 ++- Makefile | 46 --- Makefile.am | 28 ++ autogen.sh | 4 + configure | 400 ------------------- configure.ac | 267 +++++++++++++ doc/Makefile | 16 - doc/Makefile.am | 10 + make/clean.mk | 7 - make/cobj.mk | 6 - make/defines.mk.input | 50 --- make/install.mk | 27 -- make/man.mk | 18 - make/passthrough.mk | 7 - make/uninstall.mk | 13 - rgmanager/ChangeLog | 634 ------------------------------- rgmanager/Makefile | 4 - rgmanager/Makefile.am | 11 + rgmanager/examples/Makefile.am | 3 + rgmanager/include/Makefile.am | 30 ++ rgmanager/include/reslist.h | 6 +- rgmanager/init.d/Makefile | 20 - rgmanager/man/Makefile | 12 - rgmanager/man/Makefile.am | 12 + rgmanager/src/Makefile | 4 - rgmanager/src/Makefile.am | 3 + rgmanager/src/clulib/Makefile | 41 -- rgmanager/src/clulib/Makefile.am | 42 ++ rgmanager/src/clulib/ckpt_state.c | 2 + rgmanager/src/clulib/cman.c | 2 + rgmanager/src/clulib/daemon_init.c | 2 + rgmanager/src/clulib/fdops.c | 2 + rgmanager/src/clulib/gettid.c | 2 + rgmanager/src/clulib/lock.c | 2 + rgmanager/src/clulib/locktest.c | 2 + rgmanager/src/clulib/logging.c | 2 + rgmanager/src/clulib/members.c | 2 + rgmanager/src/clulib/message.c | 2 + rgmanager/src/clulib/msg_cluster.c | 2 + rgmanager/src/clulib/msg_socket.c | 2 + rgmanager/src/clulib/msgsimple.c | 2 + rgmanager/src/clulib/msgtest.c | 2 + rgmanager/src/clulib/rg_strings.c | 2 + rgmanager/src/clulib/sets.c | 2 + rgmanager/src/clulib/signals.c | 2 + rgmanager/src/clulib/tmgr.c | 2 + rgmanager/src/clulib/vft.c | 2 + rgmanager/src/clulib/wrap_lock.c | 2 + rgmanager/src/daemons/Makefile | 115 ------ rgmanager/src/daemons/Makefile.am | 61 +++ rgmanager/src/daemons/event_config.c | 2 + rgmanager/src/daemons/fo_domain.c | 2 + rgmanager/src/daemons/groups.c | 2 + rgmanager/src/daemons/main.c | 2 + rgmanager/src/daemons/reslist.c | 2 + rgmanager/src/daemons/resrules.c | 2 + rgmanager/src/daemons/restart_counter.c | 1 + rgmanager/src/daemons/restree.c | 2 + rgmanager/src/daemons/rg_event.c | 2 + rgmanager/src/daemons/rg_forward.c | 2 + rgmanager/src/daemons/rg_locks.c | 2 + rgmanager/src/daemons/rg_queue.c | 2 + rgmanager/src/daemons/rg_state.c | 2 + rgmanager/src/daemons/rg_thread.c | 2 + rgmanager/src/daemons/sbuf.c | 2 + rgmanager/src/daemons/service_op.c | 2 + rgmanager/src/daemons/slang_event.c | 2 + rgmanager/src/daemons/test.c | 2 + rgmanager/src/daemons/tests/Makefile.am | 96 +++++ rgmanager/src/daemons/watchdog.c | 2 + rgmanager/src/utils/Makefile | 75 ---- rgmanager/src/utils/Makefile.am | 43 ++ rgmanager/src/utils/cluarp.c | 1 + rgmanager/src/utils/clubufflush.c | 6 +- rgmanager/src/utils/clufindhostname.c | 2 + rgmanager/src/utils/clulog.c | 2 + rgmanager/src/utils/clunfslock | 69 ++++ rgmanager/src/utils/clunfslock.sh | 69 ---- rgmanager/src/utils/clunfsops.c | 3 +- rgmanager/src/utils/clustat.c | 8 +- rgmanager/src/utils/clusvcadm.c | 9 +- scripts/fenceparse | 35 -- scripts/uninstall.pl | 71 ---- 83 files changed, 807 insertions(+), 1705 deletions(-) diff --git a/.gitignore b/.gitignore index 4ca135d..dd0e4da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,37 @@ -make/defines.mk -.configure.sh -*.d +*.swp +Makefile.in +aclocal.m4 +autoconf +autoheader +autom4te.cache +automake +compile +configure +config.guess +config.log +config.sub +config.status +Makefile +depcomp +install-sh +libtoolize +ltmain.sh +libtool +make/stamp-h1 +m4 +make/clusterautoconfig.h* +missing +*.pc +.deps +.libs *.o -*.a -*.so* -*.lcrso -*.po -.*.*o.cmd -.tmp_versions -*.ko -Module.symvers -modules.order -*.mod.c +*.la +*.lo +rgmanager/src/clulib/msgtest +rgmanager/src/daemons/rg_test +rgmanager/src/daemons/rgmanager +rgmanager/src/utils/clubufflush +rgmanager/src/utils/clufindhostname +rgmanager/src/utils/clulog +rgmanager/src/utils/clustat +rgmanager/src/utils/clusvcadm diff --git a/Makefile b/Makefile deleted file mode 100644 index c3e6c96..0000000 --- a/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -include make/defines.mk - -REALSUBDIRS = rgmanager doc - -SUBDIRS = $(REALSUBDIRS) - -all: ${SUBDIRS} - -${SUBDIRS}: - [ -n "${without_$@}" ] || ${MAKE} -C $@ all - -rgmanager: - -oldconfig: - @if [ -f $(OBJDIR)/.configure.sh ]; then \ - sh $(OBJDIR)/.configure.sh; \ - else \ - echo "Unable to find old configuration data"; \ - fi - -install: - set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done - install -d ${logdir} - install -d ${DESTDIR}/var/lib/cluster - install -d ${DESTDIR}/var/run/cluster - -uninstall: - set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done - rmdir ${logdir} || :; - rmdir ${DESTDIR}/var/lib/cluster || :; - rmdir ${DESTDIR}/var/run/cluster || :; - -clean: - set -e && for i in ${REALSUBDIRS}; do \ - contrib_code=1 \ - legacy_code=1 \ - ${MAKE} -C $$i $@;\ - done - -distclean: clean - rm -f make/defines.mk - rm -f .configure.sh - rm -f *tar.gz - rm -rf build - -.PHONY: ${REALSUBDIRS} diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..fb5a608 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,28 @@ +EXTRA_DIST = autogen.sh + +AUTOMAKE_OPTIONS = foreign + +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure depcomp \ + config.guess config.sub missing install-sh \ + autoheader automake autoconf libtool libtoolize \ + ltmain.sh compile make/clusterautoconfig.h.in \ + make/clusterautoconfig.h.in~ + +noinst_HEADERS = make/copyright.cf + +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = rgmanager doc + +install-exec-local: + $(INSTALL) -d $(DESTDIR)/$(LOGDIR) + $(INSTALL) -d $(DESTDIR)/$(CLUSTERVARRUN) + $(INSTALL) -d $(DESTDIR)/$(CLUSTERVARLIB) + +uninstall-local: + rmdir $(DESTDIR)/$(LOGDIR) || :; + rmdir $(DESTDIR)/$(CLUSTERVARRUN) || :; + rmdir $(DESTDIR)/$(CLUSTERVARLIB) || :; + +maintainer-clean-local: + rm -rf m4 diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..3c5e1d9 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. +mkdir -p m4 +autoreconf -i -v && echo Now run ./configure and make diff --git a/configure b/configure deleted file mode 100755 index 1ea68e7..0000000 --- a/configure +++ /dev/null @@ -1,400 +0,0 @@ -#!/usr/bin/perl -w - -use warnings; -use Getopt::Long; -use Cwd 'abs_path'; -use File::Basename; - -print "\nConfiguring Makefiles for your system...\n"; - -# Set a bunch of variables - -my @invoke = @ARGV; - -my $ret = 0; - -my %options = ( - help => \$help, - cc => \$cc, - debug => \$debug, - cflags => \$cflags, - extracflags => \$extracflags, - ldflags => \$ldflags, - extraldflags => \$extraldflags, - objdir => \$objdir, - incdir => \$incdir, - libdir => \$libdir, - ccsincdir => \$ccsincdir, - ccslibdir => \$ccslibdir, - cmanincdir => \$cmanincdir, - cmanlibdir => \$cmanlibdir, - dlmincdir => \$dlmincdir, - dlmlibdir => \$dlmlibdir, - logtincdir => \$logtincdir, - logtlibdir => \$logtlibdir, - ncursesincdir => \$ncursesincdir, - ncurseslibdir => \$ncurseslibdir, - slangincdir => \$slangincdir, - slanglibdir => \$slanglibdir, - readlineincdir => \$readlineincdir, - readlinelibdir => \$readlinelibdir, - mandir => \$mandir, - prefix => \$prefix, - sbindir => \$sbindir, - initddir => \$initddir, - sharedir => \$sharedir, - docdir => \$docdir, - logdir => \$logdir, - syslogfacility => \$syslogfacility, - sysloglevel => \$sysloglevel, - confdir => \$confdir, - conffile => \$conffile, - enable_crack_of_the_day => \$enable_crack_of_the_day, - enable_legacy_code => \$enable_legacy_code, - release_version => \$release_version, -); - -my $err = &GetOptions (\%options, - 'help', - 'cc=s', - 'debug', - 'cflags=s', - 'extracflags=s', - 'ldflags=s', - 'extraldflags=s', - 'objdir=s', - 'incdir=s', - 'libdir=s', - 'ccsincdir=s', - 'ccslibdir=s', - 'cmanincdir=s', - 'cmanlibdir=s', - 'dlmincdir=s', - 'dlmlibdir=s', - 'logtincdir=s', - 'logtlibdir=s', - 'ncursesincdir=s', - 'ncurseslibdir=s', - 'slangincdir=s', - 'slanglibdir=s', - 'readlineincdir=s', - 'readlinelibdir=s', - 'mandir=s', - 'prefix=s', - 'sbindir=s', - 'initddir=s', - 'sharedir=s', - 'docdir=s', - 'logdir=s', - 'syslogfacility=s', - 'sysloglevel=s', - 'confdir=s', - 'conffile=s', - 'release_version=s', - 'enable_crack_of_the_day', - 'enable_legacy_code'); - -if(!$err) { - $ret = 1; - print "*** ERROR: Invalid option detected ***\n"; -} - -# Check for the --help flag -if ($help || !$err) { - $_ = $0; - s/.*\.\/(.*)/$1/; - print "Usage: $_ [flags]\n"; - print "--help\t\tPrints this usage information\n\n"; - print "install flags:\n"; - print "--prefix=\tthe base directory to install into. (Default: /usr)\n"; - print "--sbindir=\tthe base directory for system binaries. (Default: {prefix}/sbin)\n"; - print "--initddir=\tthe base directory for init.d scripts. (Default: /etc/init.d)\n"; - print "--libdir=\tthe base directory for libraries. (Default: {prefix}/lib)\n"; - print "--sharedir=\tthe base directory for misc cluster files. (Default: {prefix}/share/cluster)\n"; - print "--docdir=\tthe base directory for misc cluster documentation files. (Default: {prefix}/share/doc/cluster)\n"; - print "--logdir=\tthe base directory for cluster logging files. (Default: /var/log/cluster/)\n"; - print "--syslogfacility=\tset the default syslog facility. (Default: LOG_LOCAL4)\n"; - print "--sysloglevel=\tset the default syslog level. (Default: LOG_INFO)\n"; - print "--confdir=\tthe cluster config directory. (Default: /etc/cluster)\n"; - print "--conffile=\tthe cluster config file. (Default: cluster.conf)\n"; - print "--mandir=\tthe base directory for man pages. (Default: {prefix}/share/man)\n"; - print "\nbuild flags:\n"; - print "--cc=\t\tcompiler to use. (Default: gcc)\n"; - print "--debug\t\tEnable debugging build. Changes default CFLAGS to -Wall -O0 -DDEBUG -g.\n"; - print "--cflags=\toverride default CFLAGS settings. (Default: -Wall -O2 -g)\n"; - print "--extracflags=\tadd extra compiler options to default CFLAGS setting. (Default: none)\n"; - print "--ldflags=\toverride default LDFLAGS settings. (Default: none)\n"; - print "--extraldflags=\tadd extra linking options to default LDFLAGS settings. (Default: none)\n"; - print "--objdir=\tspecify directory where to store object files. (Defaults: current build dir)\n"; - print "--incdir=\tthe base directory for include files. (Default: {prefix}/include)\n"; - print "--ccsincdir=\tthe base directory for ccs include files. (Default: {incdir})\n"; - print "--ccslibdir=\tthe base directory for ccs libraries. (Default: {libdir})\n"; - print "--cmanincdir=\tthe base directory for cman include files. (Default: {incdir})\n"; - print "--cmanlibdir=\tthe base directory for cman libraries. (Default: {libdir})\n"; - print "--dlmincdir=\tthe base directory for dlm include files. (Default: {incdir})\n"; - print "--dlmlibdir=\tthe base directory for dlm libraries. (Default: {libdir})\n"; - print "--logtincdir=\tthe base directory for logthread include files. (Default: {incdir})\n"; - print "--logtlibdir=\tthe base directory for logthread libraries. (Default: {libdir})\n"; - print "--ncursesincdir=\tthe base directory for ncurses include files. (Default: {incdir})\n"; - print "--ncurseslibdir=\tthe base directory for ncurses libraries. (Default: {libdir})\n"; - print "--slangincdir=\tthe base directory for S-Lang include files. (Default: {incdir})\n"; - print "--slanglibdir=\tthe base directory for S-Lang libraries. (Default: {libdir})\n"; - print "--readlineincdir=\tthe base directory for readline include files. (Default: {incdir})\n"; - print "--readlinelibdir=\tthe base directory for readline libraries. (Default: {libdir})\n"; - print "--enable_crack_of_the_day\tEnable build of highly experimental features that rely on code that is not yet available for general use. (Default: no)\n"; - print "--enable_legacy_code\tEnable build of old/obsolete/unsupported code/tools. (Default: no)\n"; - exit $ret; -} - -sub symlinks { - my $dir = shift; - my $pattern = shift; - @args = "find $dir -type f -name $pattern"; - open (IFILE, "@args |"); - while () { - chomp; - s|\./||g; - s|.*make\/defines.mk||g; - $dirname = dirname($_); - $filename = basename($_); - system("mkdir -p $objdir/$dirname"); - symlink("${cdir}/$_","$objdir/$dirname/$filename"); - } - close IFILE; - return 0; -} - -$pwd = `pwd`; -chomp($pwd); - -if (!$cc) { - $cc="gcc"; -} -if (!$cflags) { - $cflags="-Wall -Wformat=2 -MMD"; - if (!$debug) { - $cflags="${cflags} -O2"; - } else { - $cflags="${cflags} -O0 -DDEBUG"; - } - $cflags="${cflags} -g"; -} -if ($extracflags) { - $cflags="${cflags} ${extracflags}"; -} -if (!$ldflags) { - $ldflags=""; -} -if ($extraldflags) { - $ldflags="${ldflags} ${extraldflags}"; -} -if (!$prefix) { - $prefix="/usr"; -} - -print "\nChecking tree: "; -if (!$objdir) { - $objdir="${pwd}"; -} -$objdir = abs_path( $objdir ); -$cdir = dirname ( abs_path( $0 ) ); -unless ("$cdir" eq "$objdir") { - chdir "$cdir"; -} - -if (! -d "$objdir/make") { - print "setting up $objdir\n"; - mkdir "$objdir"; - symlinks(".","Makefile"); - symlinks(".","*.mk"); -} else { - print "nothing to do\n"; -} - -if (!$incdir) { - $incdir="${prefix}/include"; -} -if (!$libdir) { - $libdir="${prefix}/lib"; -} -if (!$ccsincdir) { - $ccsincdir="${incdir}"; -} -if (!$ccslibdir) { - $ccslibdir="${libdir}"; -} -if (!$cmanincdir) { - $cmanincdir="${incdir}"; -} -if (!$cmanlibdir) { - $cmanlibdir="${libdir}"; -} -if (!$dlmincdir) { - $dlmincdir="${incdir}"; -} -if (!$dlmlibdir) { - $dlmlibdir="${libdir}"; -} -if (!$logtincdir) { - $logtincdir="${cdir}/common/liblogthread"; -} -if (!$logtlibdir) { - $logtlibdir="${objdir}/common/liblogthread"; -} -if (!$readlineincdir) { - $readlineincdir="${incdir}"; -} -if (!$readlinelibdir) { - $readlinelibdir="${libdir}"; -} -if (!$ncursesincdir) { - $ncursesincdir="${incdir}"; -} -if (!$ncurseslibdir) { - $ncurseslibdir="${libdir}"; -} -if (!$slangincdir) { - $slangincdir="${incdir}"; - if (! -f "$slangincdir/slang.h") { - $slangincdir="${incdir}/slang"; - } -} -if (!$slanglibdir) { - $slanglibdir="${libdir}"; -} -if (!$mandir) { - $mandir="${prefix}/share/man"; -} -if (!$sbindir) { - $sbindir="${prefix}/sbin"; -} -if (!$initddir) { - $initddir="/etc/init.d"; -} -if (!$sharedir) { - $sharedir="${prefix}/share/cluster"; -} -if (!$docdir) { - $docdir="${prefix}/share/doc/cluster"; -} -if (!$logdir) { - $logdir="/var/log/cluster"; -} -if (!$syslogfacility) { - $syslogfacility="LOG_LOCAL4"; -} -if (!$sysloglevel) { - $sysloglevel="LOG_INFO"; -} -if (!$confdir) { - $confdir="/etc/cluster"; -} -if (!$conffile) { - $conffile="cluster.conf"; -} -if (!$enable_crack_of_the_day) { - $enable_crack_of_the_day=""; -} else { - print "\n********************************************************************************************\n"; - print "WARNING: *you* have explicitly enabled all possible experimental features under development!\n"; - print " This code will have no mercy for your data and your machines. You have been warned!\n"; - print "\n********************************************************************************************\n"; - $cflags="${cflags} -DEXPERIMENTAL_BUILD"; -} -if (!$enable_legacy_code) { - $enable_legacy_code=""; -} else { - print "\n********************************************************************************************\n"; - print "WARNING: *you* have explicitly enabled the build of old/obsoleted/unsupported code/tools\n"; - print " This code is provided *only* for backward compatibility\n"; - print "\n********************************************************************************************\n"; - $cflags="${cflags} -DLEGACY_CODE"; -} -if (defined($release_version) && not length $release_version) { - $release_version=""; -} - -open IFILE, "${objdir}/make/defines.mk" or die "Can't redirect stdout"; - -print OFILE "# This file was generated by configure from defines.mk.input\n"; - -while () { - chomp; - $_ =~ s/\@SRCDIR\@/$cdir/; - $_ =~ s/\@CC\@/$cc/; - $_ =~ s/\@CFLAGS\@/$cflags/; - $_ =~ s/\@LDFLAGS\@/$ldflags/; - $_ =~ s/\@OBJDIR\@/$objdir/; - $_ =~ s/\@INCDIR\@/$incdir/; - $_ =~ s/\@LIBDIR\@/$libdir/; - $_ =~ s/\@CCSINCDIR\@/$ccsincdir/; - $_ =~ s/\@CCSLIBDIR\@/$ccslibdir/; - $_ =~ s/\@CMANINCDIR\@/$cmanincdir/; - $_ =~ s/\@CMANLIBDIR\@/$cmanlibdir/; - $_ =~ s/\@DLMINCDIR\@/$dlmincdir/; - $_ =~ s/\@DLMLIBDIR\@/$dlmlibdir/; - $_ =~ s/\@LOGTINCDIR\@/$logtincdir/; - $_ =~ s/\@LOGTLIBDIR\@/$logtlibdir/; - $_ =~ s/\@READLINEINCDIR\@/$readlineincdir/; - $_ =~ s/\@READLINELIBDIR\@/$readlinelibdir/; - $_ =~ s/\@NCURSESINCDIR\@/$ncursesincdir/; - $_ =~ s/\@NCURSESLIBDIR\@/$ncurseslibdir/; - $_ =~ s/\@SLANGINCDIR\@/$slangincdir/; - $_ =~ s/\@SLANGLIBDIR\@/$slanglibdir/; - $_ =~ s/\@MANDIR\@/$mandir/; - $_ =~ s/\@SBINDIR\@/$sbindir/; - $_ =~ s/\@INITDDIR\@/$initddir/; - $_ =~ s/\@SHAREDIR\@/$sharedir/; - $_ =~ s/\@DOCDIR\@/$docdir/; - $_ =~ s/\@LOGDIR\@/$logdir/; - $_ =~ s/\@SYSLOGFACILITY\@/$syslogfacility/; - $_ =~ s/\@SYSLOGLEVEL\@/$sysloglevel/; - $_ =~ s/\@CONFDIR\@/$confdir/; - $_ =~ s/\@CONFFILE\@/$conffile/; - $_ =~ s/\@ENABLE_CRACK_OF_THE_DAY\@/$enable_crack_of_the_day/; - $_ =~ s/\@ENABLE_LEGACY_CODE\@/$enable_legacy_code/; - - print OFILE "$_\n"; -} - -close IFILE; - -if (not defined($release_version)) { - - my $current_version; - if ( -f 'make/official_release_version' ) { - open OFFICIAL_VERSION, '<', "make/official_release_version"; - while () { - if ($_ =~ /VERSION/) { - $current_version = $_; - } - } - close OFFICIAL_VERSION; - } - - if (not defined($release_version)) { - if (not defined($current_version)) { - $release_version = `date +%s`; - chomp $release_version; - } else { - $release_version = $current_version; - $release_version =~ s/.*"(.*)"\n/$1/; - } - } -} - -print OFILE "RELEASE_VERSION = $release_version\n"; -print OFILE "CFLAGS += -DRELEASE_VERSION=\\\"$release_version\\\"\n"; - -close OFILE; - -open OFILE, ">${objdir}/.configure.sh.tmp" or die "Can't redirect stdout"; -print OFILE "#!/bin/bash\n"; -print OFILE "$0 @invoke \$@\n"; -print OFILE "exit \$?\n"; -close OFILE; - -system("mv ${objdir}/.configure.sh.tmp ${objdir}/.configure.sh"); - -print "Completed Makefile configuration\n\n"; diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f5b1637 --- /dev/null +++ b/configure.ac @@ -0,0 +1,267 @@ + +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.63b]) +AC_INIT([rgmanager], [master], [linux-cluster@redhat.com]) +AM_INIT_AUTOMAKE([-Wno-portability]) +LT_PREREQ([2.2.7]) +LT_INIT + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_SRCDIR([rgmanager/include/signals.h]) +AC_CONFIG_HEADERS([make/clusterautoconfig.h]) + +AC_CANONICAL_HOST +AC_PROG_LIBTOOL + +AC_LANG([C]) + +# Sanitize path + +if test "$prefix" = "NONE"; then + prefix="/usr" + if test "$localstatedir" = "\${prefix}/var"; then + localstatedir="/var" + fi + if test "$sysconfdir" = "\${prefix}/etc"; then + sysconfdir="/etc" + fi + if test "$libdir" = "\${exec_prefix}/lib"; then + if test -e /usr/lib64; then + libdir="/usr/lib64" + else + libdir="/usr/lib" + fi + fi +fi + +case $exec_prefix in + NONE) exec_prefix=$prefix;; + prefix) exec_prefix=$prefix;; +esac + +# Checks for programs. + +# check stolen from gnulib/m4/gnu-make.m4 +if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then + AC_MSG_ERROR([you don't seem to have GNU make; it is required]) +fi + +AC_PROG_AWK +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_LN_S +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +## local helper functions + +# this function checks if CC support options passed as +# args. Global CFLAGS are ignored during this test. +cc_supports_flag() { + local CFLAGS="$@" + AC_MSG_CHECKING([whether $CC supports "$@"]) + AC_COMPILE_IFELSE([int main(){return 0;}] , + [RC=0; AC_MSG_RESULT([yes])], + [RC=1; AC_MSG_RESULT([no])]) + return $RC +} + +# this function tests if a library has a certain function +# by using AC_CHECK_LIB but restores the original LIBS global +# envvar. This is required to avoid libtool to link everything +# with everything. +check_lib_no_libs() { + AC_CHECK_LIB([$1], [$2],, + [AC_MSG_ERROR([Unable to find $1 library])]) + LIBS=$ac_check_lib_save_LIBS +} + +PKG_CHECK_MODULES([ccs],[libccs]) +PKG_CHECK_MODULES([cman],[libcman]) +PKG_CHECK_MODULES([dlm],[libdlm]) +PKG_CHECK_MODULES([logt],[liblogthread]) +PKG_CHECK_MODULES([xml],[libxml-2.0]) + +# old versions of ncurses don't ship pkg-config files +PKG_CHECK_MODULES([ncurses],[ncurses],, + [check_lib_no_libs ncurses printw]) + +if test -z "$ncurses_CFLAGS" && test -z "$ncurses_LIBS"; then + ncurses_LIBS=-lncurses +fi + +# external libs (no pkgconfig) +check_lib_no_libs pthread pthread_mutex_lock + +AC_CHECK_HEADERS([slang/slang.h], [slang_in_slang=yes]) +if test x"${slang_in_slang}" = xyes; then + slang_CFLAGS="-I${oldincludedir}/slang" +else + AC_CHECK_HEADERS([slang.h], [], + [AC_MSG_ERROR([Unable to find slang development files])]) +fi +slang_LIBS="-lslang" + +check_lib_no_libs slang SLmemcmp + +# Checks for header files. +AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UID_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T + + +# Checks for library functions. +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_CHECK_FUNCS([bzero dup2 gethostbyaddr gethostbyname gettimeofday memmove memset select socket strcasecmp strchr strdup strerror strncasecmp strrchr strstr]) + +# local options +AC_ARG_ENABLE([debug], + [ --enable-debug enable debug build. ], + [ default="no" ]) + +AC_ARG_WITH([default-config-dir], + [ --default-config-dir=DIR + cluster config directory. ], + [ DEFAULT_CONFIG_DIR="$withval" ], + [ DEFAULT_CONFIG_DIR="$sysconfdir/cluster" ]) + +AC_ARG_WITH([default-config-file], + [ --default-config-file=FILE + cluster config file. ], + [ DEFAULT_CONFIG_FILE="$withval" ], + [ DEFAULT_CONFIG_FILE="cluster.conf" ]) + +AC_ARG_WITH([syslogfacility], + [ --syslogfacility=FACILITY + cluster default syslog facility. ], + [ SYSLOGFACILITY="$withval" ], + [ SYSLOGFACILITY="LOG_LOCAL4" ]) + +AC_ARG_WITH([sysloglevel], + [ --sysloglevel=LEVEL + cluster default syslog level. ], + [ SYSLOGLEVEL="$withval" ], + [ SYSLOGLEVEL="LOG_INFO" ]) + +## random vars + +LOGDIR=${localstatedir}/log/cluster +CLUSTERVARRUN=${localstatedir}/run/cluster +CLUSTERVARLIB=${localstatedir}/lib/cluster +CLUSTERDATA=${datadir}/cluster + +## do subst +AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_DIR], "$(eval echo ${DEFAULT_CONFIG_DIR})", + [Default config directory]) + +AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], "$(eval echo ${DEFAULT_CONFIG_FILE})", + [Default config file]) + +AC_SUBST([LOGDIR]) +AC_DEFINE_UNQUOTED([LOGDIR], "$(eval echo ${LOGDIR})", + [Default logging directory]) + +AC_SUBST([CLUSTERVARRUN]) +AC_DEFINE_UNQUOTED([CLUSTERVARRUN], "$(eval echo ${CLUSTERVARRUN})", + [Default cluster var/run directory]) + +AC_SUBST([CLUSTERVARLIB]) + +AC_DEFINE_UNQUOTED([CLUSTERDATA], "$(eval echo ${CLUSTERDATA})", + [Default cluster agents directory]) + +AC_DEFINE_UNQUOTED([SYSLOGFACILITY], $(eval echo ${SYSLOGFACILITY}), + [Default syslog facility]) + +AC_DEFINE_UNQUOTED([SYSLOGLEVEL], $(eval echo ${SYSLOGLEVEL}), + [Default syslog level]) + +AC_SUBST([slang_CFLAGS]) +AC_SUBST([slang_LIBS]) + +## *FLAGS handling + +ENV_CFLAGS="$CFLAGS" +ENV_CPPFLAGS="$CPPFLAGS" +ENV_LDFLAGS="$LDFLAGS" + +# debug build stuff +if test "x${enable_debug}" = xyes; then + AC_DEFINE_UNQUOTED([DEBUG], [1], [Compiling Debugging code]) + OPT_CFLAGS="-O0" +else + OPT_CFLAGS="-O2" +fi + +# gdb flags +if test "x${GCC}" = xyes; then + GDB_FLAGS="-ggdb3" +else + GDB_FLAGS="-g" +fi + +# extra warnings +EXTRA_WARNINGS="" + +WARNLIST=" + all + shadow + missing-prototypes + missing-declarations + strict-prototypes + declaration-after-statement + pointer-arith + write-strings + cast-align + bad-function-cast + missing-format-attribute + format=2 + format-security + format-nonliteral + no-long-long + unsigned-char + gnu89-inline + no-strict-aliasing + " + +for j in $WARNLIST; do + if cc_supports_flag -W$j; then + EXTRA_WARNINGS="$EXTRA_WARNINGS -W$j"; + fi +done + +CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS \ + $EXTRA_WARNINGS $WERROR_CFLAGS" +CPPFLAGS="-I\$(top_builddir)/make -I\$(top_srcdir)/make -I. $ENV_CPPFLAGS" +LDFLAGS="$ENV_LDFLAGS" + +AC_CONFIG_FILES([Makefile + rgmanager/Makefile + rgmanager/src/Makefile + rgmanager/src/clulib/Makefile + rgmanager/src/daemons/Makefile + rgmanager/src/daemons/tests/Makefile + rgmanager/src/utils/Makefile + rgmanager/include/Makefile + rgmanager/examples/Makefile + rgmanager/man/Makefile + doc/Makefile + ]) + +AC_OUTPUT diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 24192ba..0000000 --- a/doc/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -DOCS = gfs2.txt \ - journaling.txt \ - min-gfs.txt \ - usage.txt \ - COPYING.applications \ - COPYING.libraries \ - COPYRIGHT \ - README.licence - -all: - -clean: - -include ../make/defines.mk -include $(OBJDIR)/make/install.mk -include $(OBJDIR)/make/uninstall.mk diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..2e6a2ec --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,10 @@ +MAINTAINERCLEANFILES = Makefile.in + +dist_doc_DATA = gfs2.txt \ + journaling.txt \ + min-gfs.txt \ + usage.txt \ + COPYING.applications \ + COPYING.libraries \ + COPYRIGHT \ + README.licence diff --git a/make/clean.mk b/make/clean.mk deleted file mode 100644 index b31a3fa..0000000 --- a/make/clean.mk +++ /dev/null @@ -1,7 +0,0 @@ -generalclean: - rm -rf *~* *.o *.a *.so *.so.* a.out *.po *.s *.d *.pyc - rm -rf core core.* .depend cscope.* *.orig *.rej - rm -rf linux .*.o.cmd .*.ko.cmd *.mod.c .tmp_versions - rm -rf Module.symvers Module.markers .*.o.d modules.order - rm -rf ${TARGET} ${TARGETS} ${TARGET}_test - rm -rf ${TARGET1} ${TARGET2} ${TARGET3} ${TARGET4} ${TARGET5} ${TARGET6} diff --git a/make/cobj.mk b/make/cobj.mk deleted file mode 100644 index dd86cfb..0000000 --- a/make/cobj.mk +++ /dev/null @@ -1,6 +0,0 @@ -%.o: $(S)/%.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(REENT_CFLAGS) -c -o $@ $< - -# used by rgmanager/src/daemons -%-noccs.o: $(S)/%.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(NOCCS_CFLAGS) -c -o $@ $< diff --git a/make/defines.mk.input b/make/defines.mk.input deleted file mode 100644 index 85e5726..0000000 --- a/make/defines.mk.input +++ /dev/null @@ -1,50 +0,0 @@ -# Install Locations -sbindir ?= ${DESTDIR}@SBINDIR@ -initddir ?= ${DESTDIR}@INITDDIR@ -libdir ?= ${DESTDIR}@LIBDIR@ -sharedir ?= ${DESTDIR}@SHAREDIR@ -docdir ?= ${DESTDIR}@DOCDIR@ -logdir ?= ${DESTDIR}@LOGDIR@ -mandir ?= ${DESTDIR}@MANDIR@ -incdir ?= ${DESTDIR}@INCDIR@ - -# Build information - -# C Compiler defaults -CC = @CC@ -AR = ar -RANLIB = ranlib - -CFLAGS += @CFLAGS@ -I@SRCDIR@/make -CFLAGS += -DDEFAULT_CONFIG_DIR=\"@CONFDIR@\" -DDEFAULT_CONFIG_FILE=\"@CONFFILE@\" -CFLAGS += -DLOGDIR=\"@LOGDIR@\" -DSYSLOGFACILITY=@SYSLOGFACILITY@ -DSYSLOGLEVEL=@SYSLOGLEVEL@ -LDFLAGS += @LDFLAGS@ - -SRCDIR = @SRCDIR@ -OBJDIR = @OBJDIR@ - -ccsincdir ?= @CCSINCDIR@ -ccslibdir ?= @CCSLIBDIR@ -cmanincdir ?= @CMANINCDIR@ -cmanlibdir ?= @CMANLIBDIR@ -dlmincdir ?= @DLMINCDIR@ -dlmlibdir ?= @DLMLIBDIR@ -logtincdir ?= @LOGTINCDIR@ -logtlibdir ?= @LOGTLIBDIR@ -readlineincdir ?= @READLINEINCDIR@ -readlinelibdir ?= @READLINELIBDIR@ -ncursesincdir ?= @NCURSESINCDIR@ -ncurseslibdir ?= @NCURSESLIBDIR@ -slangincdir ?= @SLANGINCDIR@ -slanglibdir ?= @SLANGLIBDIR@ -experimental_build ?= @ENABLE_CRACK_OF_THE_DAY@ -legacy_code ?= @ENABLE_LEGACY_CODE@ - -THISDIR = $(shell echo $(CURDIR) | sed -e 's|$(OBJDIR)/||g') -S=$(SRCDIR)/$(THISDIR) - -CONFDIR=@CONFDIR@ -CONFFILE=@CONFFILE@ - -UNINSTALL = perl @SRCDIR@/scripts/uninstall.pl -FENCEPARSE = bash @SRCDIR@/scripts/fenceparse diff --git a/make/install.mk b/make/install.mk deleted file mode 100644 index fb93131..0000000 --- a/make/install.mk +++ /dev/null @@ -1,27 +0,0 @@ -install: -ifdef SBINDIRT - install -d ${sbindir} - install -m755 ${SBINDIRT} ${sbindir} -endif -ifdef SBINSYMT - install -d ${sbindir} - cp -a ${SBINSYMT} ${sbindir} -endif -ifdef INITDT - install -d ${initddir} - set -e; \ - for i in ${INITDT}; do \ - if [ -f $$i ]; then \ - install -m755 $$i ${initddir}; \ - else \ - install -m755 $(S)/$$i ${initddir}; \ - fi; \ - done -endif -ifdef DOCS - install -d ${docdir} - set -e; \ - for i in ${DOCS}; do \ - install -m644 $(S)/$$i ${docdir}; \ - done -endif diff --git a/make/man.mk b/make/man.mk deleted file mode 100644 index 26f6401..0000000 --- a/make/man.mk +++ /dev/null @@ -1,18 +0,0 @@ -all: - -install: - set -e; \ - for i in ${TARGET}; do \ - p=`echo $$i | sed -e 's#.*\.##g'`; \ - install -d ${mandir}/man$$p; \ - install -m644 $(S)/$$i ${mandir}/man$$p; \ - done - -uninstall: - set -e; \ - for i in ${TARGET}; do \ - p=`echo $$i | sed -e 's#.*\.##g'`; \ - ${UNINSTALL} $$i ${mandir}/man$$p; \ - done - -clean: diff --git a/make/official_release_version b/make/official_release_version deleted file mode 100644 index e69de29..0000000 diff --git a/make/passthrough.mk b/make/passthrough.mk deleted file mode 100644 index 979a86c..0000000 --- a/make/passthrough.mk +++ /dev/null @@ -1,7 +0,0 @@ -all: ${SUBDIRS} - -%: - set -e && \ - for i in ${SUBDIRS}; do \ - ${MAKE} -C $$i $@; \ - done diff --git a/make/uninstall.mk b/make/uninstall.mk deleted file mode 100644 index a8f5b3a..0000000 --- a/make/uninstall.mk +++ /dev/null @@ -1,13 +0,0 @@ -uninstall: -ifdef SBINDIRT - ${UNINSTALL} ${SBINDIRT} ${sbindir} -endif -ifdef SBINSYMT - ${UNINSTALL} ${SBINSYMT} ${sbindir} -endif -ifdef INITDT - ${UNINSTALL} ${INITDT} ${initddir} -endif -ifdef DOCS - ${UNINSTALL} ${DOCS} ${docdir} -endif diff --git a/rgmanager/ChangeLog b/rgmanager/ChangeLog deleted file mode 100644 index 917500f..0000000 --- a/rgmanager/ChangeLog +++ /dev/null @@ -1,634 +0,0 @@ -2008-04-16 Fabio M. Di Nitto - * src/utils/clustat.c: Fix variable init - -2008-03-04 Lon Hohberger - * src/resources/ASEHAagent.sh, Makefile: Add Sybase failover agent - * src/resources/oracledb.sh, Makefile: Add Oracle 10g failover agent - -2008-02-26 Lon Hohberger - * src/resources/ip.sh: Fix netmask handling in ip.sh - * src/utils/clustat.c: Don't show estranged nodes if they're down -2008-02-01 Lon Hohberger - * src/daemons/rg_state.c, slang_event.c, groups.c, restart_counter.c, - include/restart_counter.h, resgroup.h, - src/resources/default_event_script.sl: Allow restart counters to - correctly work with central_processing. (#400211 / #431130) - -2008-01-25 Lon Hohberger - * src/daemons/rg_thread.c: Fix case that broke 'clusvcadm -e - -n ' case #430220 - * src/daemons/rg_state.c: Don't enable migrate-to-self (#430272) - -2008-01-02 Fabio M. Di Nitto - * src/resources/ocf-shellfuncs: Add interpreter. - -2007-12-30 Fabio M. Di Nitto - * src/daemons/rg_state.c, include/resgroup.h, src/clulib/alloc.c: - Fix building when -DDEBUG is defined. - -2007-12-24 Fabio M. Di Nitto - * src/clulib/vft.c: Change ifdef to fix build on parisc. - -2007-12-19 Lon Hohberger - * include/res-ocf.h: Fix typo - * src/daemons/restree.c: Export reference counts to resource agents. - * src/resources/clusterfs.sh: Use reference counts to ensure we - don't unmount a GFS file system if it's in use by multiple services - on the same node. #254111 - * src/resources/service.sh, default_event_script.sl: Add support for - "soft" dependencies if central_processing is enabled - -2007-12-14 Lon Hohberger - (Misc central_events fixes) - * Add return code for inability to run because of exclusive - tag - * Only initialize state once - * Fix master-node failover. - * Correctly return node after enable if request was forwarded - -2007-12-12 Lon Hohberger - * Misc changes; add missing ds.h - * src/resources/default*.sl: Make clusvcadm -r go to a different - node. Don't notice() that we're starting a service if it's - disabled. - * src/daemons/groups.c: Make clustat not interfere with startup - when central processing is enabled - * src/daemons/slang_event.c: Make clusvcadm correctly report - service owner after relocate/restart/enable requests. - -2007-11-30 Lon Hohberger - * Commit RIND / S-Lang script engine [untested] - -[RHEL5 merged ChangeLog Entries] -2007-11-30 Lon Hohberger - * src/resources/clusterfs.sh: Retry mount up to 3 times to avoid - race condition during another process mounting a GFS volume - * src/resources/vm.sh, service.sh: Add defaults for values. - Make vm.sh work with more service attrs (max restarts) - * src/utils/clustat.c: Make output of clustat terminal-width - dependent - -2007-11-26 Lon Hohberger - * include/reslist.h: Add restart counters to resource node structure - (intended for top-level resources, i.e. services, vms...) - * include/restart_counter.h: Add header file for restart counter - * src/daemons/Makefile: Fix build to include restart counters - * src/daemons/restart_counter.c: Implement restart counters #247139 - * src/daemons/fo_domain.c, groups.c, restart_counter.c, resrules.c, - restree.c, test.c: Glue for restart counters. - * src/daemons/reslist.c: Glue for restart counters. Make expand_time - parser more robust to allow things like '1h30m' as a time value. - * src/daemons/main.c: Mark quorum disk offline in the correct - place to avoid extraneous log messages - * src/daemons/rg_state.c: Allow marking service as stopped if - stuck in recover state. Make service which failed to start - go to stopped state. Glue for restart counters. - * src/resources/service.sh, vm.sh: Add parameters for restart - counters #247139 - -2007-11-14 Lon Hohberger - * src/utils/clulog.c: Make clulog honor rgmanager log levels - (#289501) - * src/clulib/vft.c: Fix #303981 - crash on rgmanager restart in some - cases - * man/clusvcadm.8: Remove references to clushutdown from man page; - resolves #324151 - * src/resources/netfs.sh: Apply patch from Marco Ceci to fix #358161 - * src/resources/vm.sh: Make default migration policy live instead - of pause for Xen virtual machines. Also make it configurable instead - of static. Resolves #345871 - -2007-11-13 Lon Hohberger - * src/resources/clusterfs.sh: Add support for self_fence operation - to clusterfs resource agent - * src/resources/service.sh: Add default values to service.sh - -2007-10-26 Lon Hohberger - * src/daemons/main.c, src/utils/clustat.c, clusvcadm.c: - Fix #354391 - -2007-09-25 Lon Hohberger - * src/daemons/restree.c: Apply patch to fix side case re: 229650 - Patch from Simone Gotti. Resolves: #229650 -[End RHEL5 merged changes] - -2007-08-30 Lon Hohberger - * src/daemons/restree.c, rg_state.c: Fix tree-restart bug - This is another part of #229650 - -2007-08-22 Fabio M. Di Nitto - * include/list.h: Fix build with gcc-4.2. - -2007-08-15 Lon Hohberger - * src/utils/clustat.c: Remove uninitialized var & fix logic / - spotted by Ryan McCabe - -2007-08-09 Fabio M. Di Nitto - * rgmanager/src/clulib/alloc.c: Undefine DEBUG when building on - PARISC. __builtin_address needs the same love as IA64. - -2007-08-02 Lon Hohberger - * general: More fixes around #248727 - * include/reslist.h, src/daemons/restree.c: Make last-value be - returned or resources which have been checked recently - * src/daemons/groups.c: Make VMs use migrate semantics instead of - relocate semantics when employing failover domain rules - * src/daemons/nodeevent.c: Fix VMs ending up on wrong nodes when - simultaneous boot occurs - * src/daemons/rg_forward.c: Fix erroneous timeout - * src/daemons/rg_state.c: Handle RG_STATE_MIGRATE in svc_advise_* - Handle certain migration failures. - * src/resources/vm.sh: Handle certain migration failures - -2007-07-31 Lon Hohberger - * general: Make VMs not change state when added/removed from the - cluster config or bounce services/VMs when minor config changes - are made. (#248727) - * include/res-ocf.h: Add reconfigure operation - * include/reslist.h: Add flags allowing reconfigurable options in - resource agent metadata, and per-agent flags which allow resources - to be added w/o initialization / removed w/o kill. - * src/clulib/rg_strings.c: Add string definition for reconfigure op - * src/daemons/groups.c: Allow no-init-on-add and no-kill-on-delete - flags to work - * src/daemons/reslist.c: Allow resource comparison to take into - account reconfig flags and return a new value if the resource is - reconfigurable - * src/daemons/resrules.c: Code to support new flags - * src/daemons/restree.c: Code to support reconfiguration operation - * src/daemons/test.c: Code to support testing new reconfig ops and - behaviors - * src/resources/*: Add new flags to service and VM resource agents. - -2007-07-23 Lon Hohberger - * general: make threads exit with pthread_exit() so we can wrap/track them. - Add internal statedump (SIGUSR1) support. - * src/clulib/msg_cluster.c: Fix rare deadlock condition. Add dump support. - * src/clulib/tmgr.c: Add thread wrappers so we can report threads in - internal state dumps. - * src/clulib/vft.c: Fix rare crash if vf_resolve_views gets called with - NULL. Add dump support. - * src/daemons/main.c: Fix minor memory leak in membership_update(). Fix - crash-on-exit race. Don't exit if someone requests foreground mode. - * src/daemons/rg_forward.c: Clean up forwarding logic and handle missed - case (forward-to-self -> ERROR!) - * src/daemons/rg_state.c: Move closing / free of contexts out of - send_ret/send_response to the caller (where they belong). Don't let - people relocate disabled services. - * src/daemons/rg_thread.c: Don't loop forever if the thread exits before - we notice that it's started. - * src/daemons/clusvcadm.c: Fix error codes if you try to relocate when - rgmanager isn't running - -2007-07-12 Marek Grac - * src/resources/Makefile: Fix #245178 - install RA for named - -2007-07-10 Lon Hohberger - * src/daemons/rg_thread.c, groups.c: Make status queue max 1 instead - of unbounded (resolves: 247488) - -2007-06-29 Lon Hohberger - * src/daemons/groups.c, rg_state.c: Make all test cases for #237144 - work correctly - -2007-06-27 Lon Hohberger - * Merge from RHEL5 branch. - * src/daemons/vm.sh: Un-break migrate (#231692). Make status - checks happen every 30 seconds instead of 30 minutes. - * include/resgroup.h: Move inline recovery flags to a header file, - add RG_STATUS_INQUIRY for locating virtual machines which may have - migrated. - * include/reslist.h: Change res_exec() back to using agent_op_str() - inline so we can squelch errors while performing RG_STATUS_INQUIRY - * src/clulib/rg_strings.c: Add new strings for new error code / - request types - * src/daemons/groups.c: Change group_migrate() to use the correct - calling semantics - * src/daemons/main.c, nodeevent.c: Clean up cases which could cause - #244143 - * src/daemons/resrules.c: Clear up noise - * src/daemons/restree.c: Squelch errors during RG_STATUS_INQUIRY - Patch up inline service recovery (#229650) - * src/daemons/rg_state.c: Don't let migrations or relocations to a - node running exclusive services occur in the first place and return - a useful error. (goes with #237144). Locate virtual machines (or - generally, services with the 'migrate' ability) elsewhere in the - cluster prior to trying to start one. Detect if someone migrates - such a service without using the cluster tools (#232300) - * src/daemons/test.c: Make rg_test do the right thing for migrate - operations - -2007-06-21 Fabio M. Di Nitto - * rgmanager/src/clulib/alloc.c: Undefine DEBUG when building on IA64. - The __builtin_address functionality should be taken from libunwind - but porting requires some work. For now use this workaround and - also make sure to wrap STACKSIZE withing DEBUG. - -2007-06-14 Lon Hohberger - * include/resgroup.h: Fix size incompatibility on 32/64 bit mixed - clusters. Put in stubs for intelligent handling of state sizes - during a cluster upgrade. - -2007-06-14 Marek Grac - * src/daemons/main.c, rg_state.c, rg_thread.c, - src/utils/clusvcadm.c - * #211469 - RFE: Flag (-F) for clusvcadm to respect failover domain - * 'clusvcadm -e service00' works same as in RHEL4 (differs from RHEL5.0) - * -F for freeze was changed to -Z - -2007-06-13 Lon Hohberger - * src/daemons/restree.c: Fix #229650 uninitialized bug - -2007-05-31 Lon Hohberger - * src/daemons/resrules.c: Fix #234249 - ignore obvious backup files - in /usr/share/cluster when processing resource rules - * src/daemons/restree.c, src/daemons/groups.c, include/reslist.h: - Implement independent subtrees, per bug #229650 - -2007-05-22 Lon Hohberger - * src/resources/SAPInstance, SAPDatabase: Add primary attrs - -2007-05-09 Lon Hohberger - * src/resources/Makefile: Install SAP agents - -2007-05-08 Lon Hohberger - * src/resources/SAPInstance, SAPDatabase: Add SAP resource agents - from Alexander Krauth - -2007-04-27 Lon Hohberger - * include/resgroup.h, src/clulib/rg_strings.c src/daemons/groups.c, - rg_state.c, rg_thread.c, src/utils/clustat.c, clusvcadm.c: Apply - patch to implement service freeze/unfreeze from Simone Gotti - * src/daemons/sbuf.c: Add simple buffer handlers for future use - by svc_status_inquiry - -2007-04-27 Fabio M. Di Nitto - * src/clulib/vft.c: Change ifdef to fix build on parisc. - -2007-04-26 Lon Hohberger - * src/daemons/reslist.c: Try all direct ancestors while - performing run-time inheritance resolution #231521 - -2007-04-26 Fabio M. Di Nitto - * src/daemons/Makefile: use resrules-noccs in dtest build - target. - -2007-04-19 Lon Hohberger - * src/daemons/groups.c, rg_state.c: Apply patch from Andrey - Mirkin to fix bug #237144; prevents exclusive services from - being accidentally (or intentionally) being started on the - same node - * src/resources/clusterfs.sh: Apply patch from Simone - Gotti to fix logging errors in clusterfs.sh - * src/daemons/main.c: Fix qdiskd being treated as an online - cluster node - -2007-04-12 Lon Hohberger - * src/daemons/main.c: Fix watchdog race condition causing - reboot; patch from Andrey Mirkin; bugzilla #236204 - -2007-03-27 Lon Hohberger - * Merge patch from Crosswalk development team: - * Scott Cannata - * Henry Harris - * Leonard Maiorani - -===== - -2006-10-25 Lon Hohberger - * src/resources/clusterfs.sh: Fix unmounting problem (#212074) - -2006-10-23 Lon Hohberger - * src/resources/xenvm.sh: Gone; replaced with vm.sh. - * The C code parts: Fix deadlocks incurred while testing - rgmanager on larger node counts. #211701 - -2006-10-06 Lon Hohberger - * src/daemons/main.c: Fix #202492: provide rgmanager's view of - who is running rgmanager to clustat. - * src/daemons/groups.c: Fix tiny memory leak during configuration - changes - * include/resgroup.h: #202492: Flip unused RG_STATUS_INQUIRY to - RG_STATUS_NODE. - * src/utils/clustat.c: #202492: Send RG_STATUS_NODE to clurgmgrd - in order to obtain rgmanager "group" status information - -2006-09-27 Lon Hohberger - * src/daemons/rg_state.c: Fix #208011 - failed->disabled state - transition. Fix node ID type. - * include/members.h: Add a third state to note that a node does - not need to be fenced as a result of rgmanager crashing. Add protos - for memb_set_state and member_online functions. - * include/reslist.h: Fix type error; node IDs are 32-bit ints, not - 64-bit ints. - * src/clulib/members.c: Add member_set_state/online functions for - quick checks and sets of the protected member list. Zero out - the node structure prior to calling cman_get_nodeid so that we - don't get ENOENT (fixed clustat bug where clustat didn't report - the "local" flag). Fix node ID type. - * src/daemons/fo_domain.c: Fix node ID type, fix shadow declaration - of member_online - * src/daemons/groups.c: Unfix logic error that wasn't broken in the - first place. - * src/daemons/main.c: Fix node ID types. Add fourth ("clean") - param to node_event* to decide whether a node death is clean or not. - Nodes get marked clean if we get an RG_EXITING message, otherwise, - they are unclean, and we wait for fencing. - * src/daemons/nodeevent.c: Add fourth param to node_event* to help - decide if we need to wait for a node to be fenced or not. Fix - node ID type. - * src/utils/clustat.c: Fix logic error preventing nodes from properly - being flagged. Apply patch from Fabio M. Di Nitto to fix bug where - clustat -s foo wasn't getting expanded to service:foo - * src/daemons/rg_forward.c, rg_thread.c: Make forwarding of enable - to specified target node work (#202498) - -2006-09-01 Lon Hohberger - * include/resgroup.h: Add proto for rg_strerror - * include/vf.h: Add proto for vf_invalidate (flushes vf cache) - * src/clulib/rg_strings.c: Add rg_strerror function, define - human-readable strings for rgmanager error values - * src/clulib/vft.c: Add vf_invalidate (separate from vf_shutdown) - * src/daemons/groups.c: Fix obvious logic error - * src/daemons/main.c: Fix rg_doall() message during loss of quorum. - Invalidate local VF cache and kill resource configurations on - loss of quorum (#202497). Send RG_EQUORUM back to clustat/clusvcadm - so that they report why they can't get information. Don't queue - status checks if we've lost quorum. Add command line parameter to - disable internal crash watchdog - * src/utils/clustat.c, clusvcadm.c: Handle SIGPIPE, and produce - useful errors if possible. - -2006-08-31 Marek Grác - * src/daemons/restree.c: Fix #203720. Do not run backup copies (ends - with ~) of resource agents. - * src/resources/apache.*, mysql.*: Add Apache & MySQL resource agents - * src/resources/utils/*: Add utility scripts for resource agents - -2006-08-21 Lon Hohberger - * src/daemons/main.c: Fix #202500 - simultaneous starts confuse - rgmanager. This happened due to the fact that rgmanager was not - correctly determining port listening status of other nodes on the - first pass, and subsequent attempts to determine status of other - nodes were not tried. - -2006-08-18 Lon Hohberger - * include/resgroup.h: Change ordering and add magic field to - rgmanager state field (warning: breaks compatibility from 08/08 CVS!) - * src/clulib/ckpt_state.c, src/daemons/rg_state.c: Fix bug - preventing correct operation of ckpt operation after initial boot. - Get rid of debug info. - * src/daemons/groups,c, main.c: Fix #202499 - shutdown while handling - transitions sometimes allows services to restart (due to not locking - RGs locally) - * src/resources/clusterfs.sh, fs.sh, nfsclient.sh: Add proper - warning messages if status check fails - * src/resources/ra-api-1-modified.dtd: Allow 'migrate' option - * include/clulog.h, src/daemons/clulog.c: Fix default log levels so - that they're LOG_NOTICE, and only one default is used (#200776) - -2006-08-08 Lon Hohberger - * src/clulib/members.c: Fix gained/lost list creation so that the - count is actually nonzero (#201713) - * src/daemons/main.c: Fix typo in debug information. Kill CMAN handle - before doing a member list update. Don't call memb_online; just - check the cn_member field (optimization). Don't process node event - until the node actually closes port (#201713). - * src/utils/clusvcadm.c: Fix relocation issues (#201711). - -2006-08-07 Lon Hohberger - * src/clulib/ckpt_state.c: Preliminary implementation of replacement - for VF using AIS CKPT B.02.01 (w/ built-in test program) - * include/cman-private.h: Clean up APIs (cman APIs return - cman_handle_t, which is void*, should be using void ** all over) - * include/message.h: Bump context count to 128, add destination - node ID in header of packets. - * src/clulib/alloc.c: If we alloc the same size, return the same - block - * src/clulib/cman.c: API cleanups - * src/clulib/message.c: Add error checking to msg_print - * src/clulib/msg_cluster.c: Check destination in header before - processing message remove dup #define for MAX_CONTEXTS, add - proto_error() macro for displaying protocol errors. Use 'max' - instead of 'fd' for select(). Use correct var when assigning - contexts. Fix CMAN handles. Return correct size from msg_send() - requests. - * src/clulib/msgtest.c: Fix CMAN handles - * src/clulib/vft.c: Don't handle VF_CURRENT inside comms thread - * src/daemons/main.c: Check to see if nodes are listening on our - port before we consider them running. Handle VF_CURRENT requests - from other nodes. Fail if we can't determine local node ID - * src/daemons/rg_forward.c: Give 10 minutes for responses to - forwarded requests. - * src/daemons/rg_state.c: Shorten RG state names. Fix 'Uncertain' - output line. - * src/utils/clustat.c: Fix ccs_member_list() function. - -2006-05-23 Lon Hohberger - * src/daemons/members.c: Zap pad fields on copy-out - * src/daemons/main.c: Give notice if skipping an event because of - locked services. Call the self-watchdog init function - * src/daemons/watchdog.c: Add Stanko Kupcevic's self-watchdog from - CVS head (fixes #193247) - * src/daemons/groups.c: Add debug messages. Actually count - resgroups during node transition handling - * src/daemons/rg_state.c: allow failover of stopping services if - the owner died (#193255) - * src/utils/clustat.c: fix typo, misc. usability problems (#192999) - -2006-05-16 Lon Hohberger - * src/resources/nfsclient.sh: Fix 189218 - nfsclient not matching - wildcards correctly when checking status. Allow disabling of - recovery for services where the nfs clients are ordered (this will - cause a full service restart, but works) - * src/resources/clusterfs.sh, fs.sh, svclib_nfslock, service.sh: - Implement rudimentary atomic bomb-style NFS lock reclaim handling - Needs compatible and correctly configured version of nfs-utils - installed and running on the system. For clusterfs.sh, ensure - that we flush buffers during service tear-down - regardless of - whether or not we unmount the file system. - * src/utils/clunfslock.sh: HA-callout program (/usr/sbin/clunfslock) - for use with the rpc.statd -H parameter. Copies the client to all - cluster-managed mounted file systems so that it will get lock - reclaim notification on failover. - -2006-05-09 Lon Hohberger - * include/list.h: Prevent dereferencing curr if it's null for some - reason - * include/resgroup.h: Clean up alignment, add rgmanager lock/unlock - message types - * src/daemons/Makefile: Add nodeevent.o to the build for rgmanager - * src/clulib/msgsimple.c: Misc code path cleanups - * src/clulib/vft.c: Add local reads for fast clustat operation. - * src/daemons/groups.c: Count all resource groups for all nodes - in one pass, rather than one node per pass. Split queueing of - status checks off so we never block the main thread. Mark services - which have autostart=0 in the config as "disabled" to help remove - confusion between "disabled", "stopped", and the no-longer-needed - "stopped but behave like disabled" states. bz #182454 / - #190234 / #190408 - * src/daemons/fo_domain.c: Add patch from Josef Whiter to - implement no-failback option for a given FO domain - bz #189841 - * src/daemons/main.c: Queue node events for another thread to - handle, so we never block the main thread. Also, implement - cluster-wide service lock/unlock feature from clumanager 1.2.x - - bz #175010 - * src/daemons/nodeevent.c: Split out node event queueing / handling - in to a separate thread so the main thread does not block - * src/daemons/rg_state.c: Return error codes if resource groups - are locked. - * src/daemons/rg_thread.c: Fix assertion failure causing segfault - in extremely rare cases. Quash the rg queue during shutdown. - - bz #181539 - * src/daemons/rg_state.c: Add fast local service state query to - reduce unnecessary lock contention - * src/daemons/groups.c: Handle request for expedited information - from clustat. - * src/daemons/main.c: Pass arg1 to send_rg_states() to enable fast - clustat operation. - * src/resources/fs.sh: Implement user/group quota support if - enabled in the file system options - * src/utils/clustat.c: Misc. error handling. Add single service / - member output and add -Q to the help information. #185952. - Added -f flag. - * src/utils/clusvcadm.c: Implement client-side of #175010 - * src/utils/clustat.c: show transition time in clustat -x - - bz #191398 - * src/resources/fs.sh: enable user/group quotas if enabled in the - options attribute - bz #191182 - * init.d/rgmanager: fix typo - bz #191205 - - -------------- - -2005-03-21 Lon Hohberger - * init.d/rgmanager, Makefile: Fix up init script and add Makefile - so that the init script is properly installed #142754 - * src/daemons/*: Fixes for #150344, #151187: Relocate to same node - returns failure, hang during shutdown if user relocate is in-flight. - Fix service state getting stuck in "recoverable" on fail-to-start - scenarios where other nodes failed (or no other node was available) - Rename "resourcegroup" to "service" to be consistent with UI - * src/resources/fs.sh, clusterfs.sh: Fix #151077: Force unmount broken - * src/resources/netfs.sh: Fix #151091: netfs status broken - * src/resources/resourcegroup.sh, service.sh: Remove resourcegroup, - rename to service.sh - -2005-03-14 Lon Hohberger - * src/resources/clusterfs.sh, fs.sh: Make clusterfs actually work. - Clean up fs.sh + clusterfs.sh "status" when mount reports none/ - devpets/usbdev/etc. - * src/daemons/test.c: Add a 'rules' test function for printing - resource rules to stdout. - * src/daemons/reslist.c: Fix 151095 - -2005-03-07 Lon Hohberger - * include/resgroup.h: Add STOP_USER so we can handle user - STOP (instead of just DISABLE) requests. #150333 - * src/resources/fs.sh: umount should umount mount points, not - devices. Handle symlinks to file system block devices. #150481 - * src/clulib/rg_strings.c: Add user stop string. - * src/clulib/gettid.c: errno fix from trunk - * src/clulib/vft.c: Connect timeout extension for VF - * src/daemons/main.c: Separate connect + login. GuLM doesn't know - about SGs. - * src/daemons/rg_state.c: Change stop handling. Add generic recover - function. - * src/daemons/rg_thread.c: Add support for RESTART, USER_STOP. - #150330, #150333 - * src/utils/clusvcadm.c: Use USER_STOP to signal a user-called stop. - #150333 - -2005-03-02 Lon Hohberger - * include/clulog.h: Change default log level to INFO - * include/resgroup.h: Add proto for "best_target_node" - * src/clulib/clulog.c: Change log facility to LOG_DAEMON to match - other cluster daemons (e.g. lock_gulmd) - * src/daemons/groups.c: Add best_target_node, count_resource_groups. - Implement missing autostart-disable feature and requested exclusive - resource group feature. Store configuration view number so we can - tell when the configuration changes. - * src/daemons/main.c: Print node state transition messages before - calling node_event(). Use do_status_checks() so we don't try to - check services we're not running. Bump periodic status event - queueing to 10 seconds instead of 5. Poll ccsd for config updates - since we have no other way to find them. Fix bug preventing - status checks when clustat -i 1 is running. - * src/daemons/rg_state.c: Fix handle_relocate_req so that it uses - best_target_node() correctly. Leave services which failed on all - current nodes as 'stopped', so the next node transition will cause - us to try to restart it automagically. Consider recovery policy - when taking recovery action. - * src/daemons/rg_thread.c: Use recovery routine instead of start. - * src/daemons/restree.c: Fix tree delta updates. - * src/resources/resourcegroup.sh: Add 'exclusive' parameter. Change - 'autostart' to a boolean instead of string. Add recovery policy - parameter. - * src/utils/clusvcadm.c: Make "relocate to node X" work. - -2005-02-28 Lon Hohberger - * errors.txt: Remove random whitespace at the bottom. - * include/resgroup.h: Add do_status_checks proto - * include/rg_queue.h: Remove __ definitions so as not to conflict - with glibc internals. - * include/vf.h: Increase VF_COORD_TIMEOUT to something reasonable. - * src/daemons/groups.c: Add do_status_checks(). We were previously - queueing status checks for RGs that we didn't own. Not useful. - * src/daemons/main.c: Fix for #149410. - * src/daemons/rg_state.c: Fix various failover service problems. - * src/resources/script.sh: Remove "recover" from generic script - wrapper. - -======================================================================= - -2004-09-23 Lon Hohberger - * include/reslist.h: Add needstart/needstop/common flags for - reconfiguration. Added RS_CONDSTART/CONDSTOP to perform "stop - if needed/start if needed" operations after a resource [group] - reconfiguration. Cleaned up structures. Added NO_CCS define for - testing. - * src/daemons/fo_domain.c: Added NO_CCS defines for testing. - * src/daemons/main.c: Added reconfigure() stub function. Added - testing support. - * src/daemons/reslist.c: Added comparsion + primary-attr functions - for resources. Add printout of needstart/stop in resource dump. - * src/daemons/restree.c: Added resource list comparsion + - resource tree comparison functions. Added condstart/stop to ops - list. Added CONDSTART/CONDSTOP handling in res_op. - * src/daemons/rg_locks.c: Added NO_CCS support for testing. - -2004-09-13 Lon Hohberger - * include/resgroup.h: Add a default check interval. - * include/reslist.h: Add a recover operation, and put operations - and checks together in each instantiated resource structure. - * src/daemons/groups.c: Don't use the old rg_status() func -- - its internals have changed. - * src/daemons/reslist.c: Duplicate the action structure of a - parent resource type into an instantiated resource. - * src/daemons/resrules.c: Find the actions with the correct - path. - * src/daemons/restree.c: Add depth parameter to res_exec. Add - do_status - find the highest check/status level to perform given - the elapsed time since another status operation was performed. - Add a reference count each time a resource is started on a node. - * src/daemons/rg_thread.c: Implement periodic status checks. - Currently (in contrast to clumanager 1.2), these status checks - are automatic and not configurable. - * src/resources/*: Misc updates re: check intervals, new - parameters, etc. - -2004-09-07 Lon Hohberger - * src/resources/group.sh: Add 'autostart' parameter to group - entity - * src/daemons/*: Add support for OCF 'action' specifications. - -2004-08-30 Lon Hohberger - * src/resources/*: Add status/monitor actions to metadata - * include/list.h: Update to fix compiler warnings. This is not - complete; it's better to add a 'field' to structures requiring - list specs. - * src/clulib/vft.c: Remove unnecessary pthread locks. - * src/daemons/*: Misc. code cleanups. - -2004-08-12 Lon Hohberger - * global: prepare for RPM build diff --git a/rgmanager/Makefile b/rgmanager/Makefile deleted file mode 100644 index 8f730e3..0000000 --- a/rgmanager/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include ../make/defines.mk -include $(OBJDIR)/make/passthrough.mk - -SUBDIRS=src man init.d diff --git a/rgmanager/Makefile.am b/rgmanager/Makefile.am new file mode 100644 index 0000000..97d7e39 --- /dev/null +++ b/rgmanager/Makefile.am @@ -0,0 +1,11 @@ +MAINTAINERCLEANFILES = Makefile.in + +# init.d +SUBDIRS = src \ + include \ + examples \ + man + +dist_doc_DATA = errors.txt \ + event-script.txt \ + README diff --git a/rgmanager/examples/Makefile.am b/rgmanager/examples/Makefile.am new file mode 100644 index 0000000..54a87eb --- /dev/null +++ b/rgmanager/examples/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +dist_doc_DATA = cluster.conf diff --git a/rgmanager/include/Makefile.am b/rgmanager/include/Makefile.am new file mode 100644 index 0000000..8ce6042 --- /dev/null +++ b/rgmanager/include/Makefile.am @@ -0,0 +1,30 @@ +MAINTAINERCLEANFILES = Makefile.in + +noinst_HEADERS = cman-private.h \ + daemon_init.h \ + ds.h \ + event.h \ + fdops.h \ + findproc.h \ + fo_domain.h \ + gettid.h \ + groups.h \ + list.h \ + lock.h \ + logging.h \ + members.h \ + message.h \ + msgsimple.h \ + platform.h \ + pthread_dbg.h \ + resgroup.h \ + reslist.h \ + res-ocf.h \ + restart_counter.h \ + rg_locks.h \ + rg_queue.h \ + rg_types.h \ + rmtab.h \ + sets.h \ + signals.h \ + vf.h diff --git a/rgmanager/include/reslist.h b/rgmanager/include/reslist.h index 20f205d..5600cf5 100644 --- a/rgmanager/include/reslist.h +++ b/rgmanager/include/reslist.h @@ -35,11 +35,7 @@ #define RES_STARTED (1) #define RES_FAILED (2) -#ifndef SHAREDIR -#define SHAREDIR "/usr/share/rgmanager" -#endif - -#define RESOURCE_ROOTDIR SHAREDIR +#define RESOURCE_ROOTDIR CLUSTERDATA #define RESOURCE_TREE_ROOT "/cluster/rm" #define RESOURCE_BASE RESOURCE_TREE_ROOT "/resources" #define RESOURCE_ROOT_FMT RESOURCE_TREE_ROOT "/%s[%d]" diff --git a/rgmanager/init.d/Makefile b/rgmanager/init.d/Makefile deleted file mode 100644 index 4c9a44f..0000000 --- a/rgmanager/init.d/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -TARGET= rgmanager - -INITDT=$(TARGET) - -all: $(TARGET) - -include ../../make/defines.mk -include $(OBJDIR)/make/clean.mk -include $(OBJDIR)/make/install.mk -include $(OBJDIR)/make/uninstall.mk - -$(TARGET): $(S)/$(TARGET).in - cat $(S)/$(TARGET).in | sed \ - -e 's#@SBINDIR@#${sbindir}#g' \ - -e 's#@INITDDIR@#${initddir}#g' \ - > $(TARGET) - -clean: generalclean - -check: diff --git a/rgmanager/man/Makefile b/rgmanager/man/Makefile deleted file mode 100644 index d965432..0000000 --- a/rgmanager/man/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -TARGET= clubufflush.8 \ - clufindhostname.8 \ - clulog.8 \ - clurgmgrd.8 \ - clurmtabd.8 \ - clustat.8 \ - clusvcadm.8 - -include ../../make/defines.mk -include $(OBJDIR)/make/man.mk - -check: diff --git a/rgmanager/man/Makefile.am b/rgmanager/man/Makefile.am new file mode 100644 index 0000000..63ffcdd --- /dev/null +++ b/rgmanager/man/Makefile.am @@ -0,0 +1,12 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = cluarp.8 \ + clunfsops.8 + +dist_man_MANS = clubufflush.8 \ + clufindhostname.8 \ + clulog.8 \ + clurgmgrd.8 \ + clurmtabd.8 \ + clustat.8 \ + clusvcadm.8 diff --git a/rgmanager/src/Makefile b/rgmanager/src/Makefile deleted file mode 100644 index 94f3bce..0000000 --- a/rgmanager/src/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -include ../../make/defines.mk -include $(OBJDIR)/make/passthrough.mk - -SUBDIRS=clulib daemons utils diff --git a/rgmanager/src/Makefile.am b/rgmanager/src/Makefile.am new file mode 100644 index 0000000..534b029 --- /dev/null +++ b/rgmanager/src/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = clulib daemons utils diff --git a/rgmanager/src/clulib/Makefile b/rgmanager/src/clulib/Makefile deleted file mode 100644 index 52cd438..0000000 --- a/rgmanager/src/clulib/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -TARGET1= libclulib.a -TARGET2= msgtest - -all: ${TARGET1} ${TARGET2} - -include ../../../make/defines.mk -include $(OBJDIR)/make/cobj.mk -include $(OBJDIR)/make/clean.mk -include $(OBJDIR)/make/install.mk -include $(OBJDIR)/make/uninstall.mk - -OBJS1= logging.o daemon_init.o signals.o msgsimple.o \ - gettid.o rg_strings.o message.o members.o fdops.o \ - lock.o cman.o vft.o msg_cluster.o msg_socket.o \ - wrap_lock.o sets.o - -OBJS2= msgtest.o - -CFLAGS += -Werror -Wstrict-prototypes -Wshadow -fPIC -D_GNU_SOURCE -CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} -CFLAGS += -I${logtincdir} -CFLAGS += -I$(S)/../../include -CFLAGS += -I${incdir} - -LDFLAGS += -L${cmanlibdir} -lcman -LDFLAGS += -L. -lclulib -LDFLAGS += -lpthread -LDFLAGS += -L${logtlibdir} -llogthread -LDFLAGS += -L${libdir} - -${TARGET1}: ${OBJS1} - ${AR} cru $@ $^ - ${RANLIB} $@ - -${TARGET2}: ${OBJS2} ${TARGET1} - $(CC) -o $@ $^ $(LDFLAGS) - -clean: generalclean - --include $(OBJS1:.o=.d) --include $(OBJS2:.o=.d) diff --git a/rgmanager/src/clulib/Makefile.am b/rgmanager/src/clulib/Makefile.am new file mode 100644 index 0000000..13d112c --- /dev/null +++ b/rgmanager/src/clulib/Makefile.am @@ -0,0 +1,42 @@ +MAINTAINERCLEANFILES = Makefile.in + +noinst_LTLIBRARIES = libclulib.la + +EXTRA_DIST = ckpt_state.c \ + locktest.c \ + tmgr.c + +libclulib_la_SOURCES = cman.c \ + daemon_init.c \ + fdops.c \ + gettid.c \ + lock.c \ + logging.c \ + members.c \ + message.c \ + msg_cluster.c \ + msgsimple.c \ + msg_socket.c \ + rg_strings.c \ + sets.c \ + signals.c \ + vft.c \ + wrap_lock.c + +libclulib_la_CPPFLAGS = -D_GNU_SOURCE \ + -I$(top_srcdir)/rgmanager/include + +libclulib_la_CFLAGS = $(cman_CFLAGS) $(logt_CFLAGS) + +libclulib_la_LDFLAGS = $(cman_LIBS) $(logt_LIBS) -lpthread + +noinst_PROGRAMS = msgtest + +msgtest_CPPFLAGS = -D_GNU_SOURCE \ + -I$(top_srcdir)/rgmanager/include + +msgtest_CFLAGS = $(cman_CFLAGS) + +msgtest_LDFLAGS = $(cman_LIBS) -lpthread + +msgtest_LDADD = $(top_builddir)/rgmanager/src/clulib/libclulib.la diff --git a/rgmanager/src/clulib/ckpt_state.c b/rgmanager/src/clulib/ckpt_state.c index fd85aee..27891d0 100644 --- a/rgmanager/src/clulib/ckpt_state.c +++ b/rgmanager/src/clulib/ckpt_state.c @@ -2,6 +2,8 @@ /** @file * Distributed states using saCkpt interface */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/cman.c b/rgmanager/src/clulib/cman.c index 841e43c..4f11290 100644 --- a/rgmanager/src/clulib/cman.c +++ b/rgmanager/src/clulib/cman.c @@ -1,6 +1,8 @@ /** pthread mutex wrapper for a global CMAN handle */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/daemon_init.c b/rgmanager/src/clulib/daemon_init.c index e9adeed..5d1fc64 100644 --- a/rgmanager/src/clulib/daemon_init.c +++ b/rgmanager/src/clulib/daemon_init.c @@ -12,6 +12,8 @@ * * Also need to add file locking for the pid file. */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/fdops.c b/rgmanager/src/clulib/fdops.c index c7857c6..f8f76f9 100644 --- a/rgmanager/src/clulib/fdops.c +++ b/rgmanager/src/clulib/fdops.c @@ -2,6 +2,8 @@ * Wrapper functions around read/write/select to retry in the event * of interrupts. */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/gettid.c b/rgmanager/src/clulib/gettid.c index ba571c6..c699467 100644 --- a/rgmanager/src/clulib/gettid.c +++ b/rgmanager/src/clulib/gettid.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/lock.c b/rgmanager/src/clulib/lock.c index be542c1..6784a16 100644 --- a/rgmanager/src/clulib/lock.c +++ b/rgmanager/src/clulib/lock.c @@ -1,6 +1,8 @@ /** @file * Locking. */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/locktest.c b/rgmanager/src/clulib/locktest.c index c0d37b7..8dbd9c7 100644 --- a/rgmanager/src/clulib/locktest.c +++ b/rgmanager/src/clulib/locktest.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/logging.c b/rgmanager/src/clulib/logging.c index 51c28b9..4707951 100644 --- a/rgmanager/src/clulib/logging.c +++ b/rgmanager/src/clulib/logging.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #define SYSLOG_NAMES diff --git a/rgmanager/src/clulib/members.c b/rgmanager/src/clulib/members.c index 5f98708..96f9c19 100644 --- a/rgmanager/src/clulib/members.c +++ b/rgmanager/src/clulib/members.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/message.c b/rgmanager/src/clulib/message.c index 3eb7b2f..237cf33 100644 --- a/rgmanager/src/clulib/message.c +++ b/rgmanager/src/clulib/message.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #define _MESSAGE_BUILD #include #include diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c index 136b376..8a0422d 100644 --- a/rgmanager/src/clulib/msg_cluster.c +++ b/rgmanager/src/clulib/msg_cluster.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #define _MESSAGE_BUILD #include #include diff --git a/rgmanager/src/clulib/msg_socket.c b/rgmanager/src/clulib/msg_socket.c index 130cbd7..7c8ba2e 100644 --- a/rgmanager/src/clulib/msg_socket.c +++ b/rgmanager/src/clulib/msg_socket.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #define _MESSAGE_BUILD #include #include diff --git a/rgmanager/src/clulib/msgsimple.c b/rgmanager/src/clulib/msgsimple.c index 0681619..764e32c 100644 --- a/rgmanager/src/clulib/msgsimple.c +++ b/rgmanager/src/clulib/msgsimple.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/msgtest.c b/rgmanager/src/clulib/msgtest.c index 4b46d6c..cd90848 100644 --- a/rgmanager/src/clulib/msgtest.c +++ b/rgmanager/src/clulib/msgtest.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/rg_strings.c b/rgmanager/src/clulib/rg_strings.c index 35c570d..895cd0a 100644 --- a/rgmanager/src/clulib/rg_strings.c +++ b/rgmanager/src/clulib/rg_strings.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include diff --git a/rgmanager/src/clulib/sets.c b/rgmanager/src/clulib/sets.c index f4873c4..2ef6621 100644 --- a/rgmanager/src/clulib/sets.c +++ b/rgmanager/src/clulib/sets.c @@ -3,6 +3,8 @@ (designed for integer types; a la int, uint64_t, etc...) @author Lon Hohberger */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/signals.c b/rgmanager/src/clulib/signals.c index 1d49ee5..ceb1beb 100644 --- a/rgmanager/src/clulib/signals.c +++ b/rgmanager/src/clulib/signals.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/tmgr.c b/rgmanager/src/clulib/tmgr.c index a86d258..eed2646 100644 --- a/rgmanager/src/clulib/tmgr.c +++ b/rgmanager/src/clulib/tmgr.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #ifdef WRAP_THREADS #include #include diff --git a/rgmanager/src/clulib/vft.c b/rgmanager/src/clulib/vft.c index eefba2f..7be816a 100644 --- a/rgmanager/src/clulib/vft.c +++ b/rgmanager/src/clulib/vft.c @@ -8,6 +8,8 @@ * model like NFS and have clients restate their resource group states * after a server failure. */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/clulib/wrap_lock.c b/rgmanager/src/clulib/wrap_lock.c index 0bd47e6..ccb08ab 100644 --- a/rgmanager/src/clulib/wrap_lock.c +++ b/rgmanager/src/clulib/wrap_lock.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #ifdef WRAP_LOCKS #include #include diff --git a/rgmanager/src/daemons/Makefile b/rgmanager/src/daemons/Makefile deleted file mode 100644 index 0d42a26..0000000 --- a/rgmanager/src/daemons/Makefile +++ /dev/null @@ -1,115 +0,0 @@ -TARGET1= rgmanager -TARGET2= rg_test -TARGET3= dtest -TARGET4= clurgmgrd - -SBINDIRT=$(TARGET1) $(TARGET2) -SBINSYMT=$(TARGET4) - -all: depends ${TARGET1} ${TARGET2} ${TARGET4} - -include ../../../make/defines.mk -include $(OBJDIR)/make/cobj.mk -include $(OBJDIR)/make/clean.mk -include $(OBJDIR)/make/install.mk -include $(OBJDIR)/make/uninstall.mk - -OBJS1= fo_domain.o \ - groups.o \ - main.o \ - reslist.o \ - resrules.o \ - restree.o \ - restart_counter.o \ - rg_event.o \ - rg_forward.o \ - rg_locks.o \ - rg_queue.o \ - rg_state.o \ - rg_thread.o \ - service_op.o \ - slang_event.o \ - event_config.o \ - watchdog.o - -OBJS2= test-noccs.o - -OBJS3= dtest-noccs.o - -SHAREDOBJS= fo_domain-noccs.o \ - restart_counter.o \ - reslist-noccs.o \ - resrules-noccs.o \ - restree-noccs.o \ - rg_locks-noccs.o \ - event_config-noccs.o - -CFLAGS += -DSHAREDIR=\"${sharedir}\" -CFLAGS += -Werror -Wstrict-prototypes -Wshadow -fPIC -CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} -I${logtincdir} -CFLAGS += `xml2-config --cflags` -I${readlineincdir} -I${slangincdir} -CFLAGS += -I$(S)/../../include -CFLAGS += -I${incdir} - -NOCCS_CFLAGS += -DNO_CCS - -LDFLAGS += -L../clulib -lclulib -LDFLAGS += -L${libdir} - -CCS_LDFLAGS += -L${ccslibdir} -lccs -CMAN_LDFLAGS += -L${cmanlibdir} -lcman -LOGSYS_LDFLAGS += -L${logtlibdir} -llogthread -DLM_LDFLAGS += -L${dlmlibdir} -ldlm -XML2_LDFLAGS += `xml2-config --libs` -SLANG_LDFLAGS += -L${slanglibdir} -lslang -EXTRA_LDFLAGS += -lpthread -READLINE_LDFLAGS += -L${readlinelibdir} -lreadline - -LDDEPS += ../clulib/libclulib.a - -${TARGET1}: ${OBJS1} ${LDDEPS} - $(CC) -o $@ $^ $(CCS_LDFLAGS) $(CMAN_LDFLAGS) \ - $(DLM_LDFLAGS) $(XML2_LDFLAGS) \ - $(SLANG_LDFLAGS) $(EXTRA_LDFLAGS) \ - $(LOGSYS_LDFLAGS) $(LD_FLAGS) - -# -# Our test program links against the local allocator so that -# we can see if our program is leaking memory during XML parsing, tree -# delta calculations, building/teardown of resource lists, etc. -# If it's leaking memory, the 'make check' will fail. Also, we can -# use it to test known-good configurations for regressions. -# -# The data in the 'tests' directory is hand-crafted; so running 'gentests.sh' -# will require that the developer hand-verify the correctness of the -# resulting output prior to committing back to CVS. -# -# This is NOT meant to be an installed binary. Rather, RPMs and/or other -# packages should run 'make check' as part of the build process. -# -${TARGET2}: ${SHAREDOBJS} ${OBJS2} ${LDDEPS} - $(CC) -o $@ $^ $(CMAN_LDFLAGS) $(EXTRA_LDFLAGS) \ - $(XML2_LDFLAGS) $(LOGSYS_LDFLAGS) $(LDFLAGS) - -${TARGET3}: ${SHAREDOBJS} ${OBJS3} ${LDDEPS} - $(CC) -o $@ $^ $(CCS_LDFLAGS) $(CMAN_LDFLAGS) \ - $(EXTRA_LDFLAGS) $(XML2_LDFLAGS) \ - $(READLINE_LDFLAGS) $(LOGSYS_LDFLAGS) $(LDFLAGS) - -${TARGET4}: ${TARGET1} - ln -sf ${TARGET1} ${TARGET4} - -check: rg_test - cd tests && ./runtests.sh - -depends: - $(MAKE) -C ../clulib all - -clean: generalclean - rm -f tests/*.out* - --include $(OBJS1:.o=.d) --include $(OBJS2:.o=.d) --include $(OBJS3:.o=.d) --include $(OBJS4:.o=.d) --include $(SHAREDOBJS:.o=.d) diff --git a/rgmanager/src/daemons/Makefile.am b/rgmanager/src/daemons/Makefile.am new file mode 100644 index 0000000..5e45e31 --- /dev/null +++ b/rgmanager/src/daemons/Makefile.am @@ -0,0 +1,61 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = tests + +sbin_PROGRAMS = rgmanager \ + rg_test + +rgmanager_SOURCES = fo_domain.c \ + groups.c \ + main.c \ + reslist.c \ + resrules.c \ + restree.c \ + restart_counter.c \ + rg_event.c \ + rg_forward.c \ + rg_locks.c \ + rg_queue.c \ + rg_state.c \ + rg_thread.c \ + service_op.c \ + slang_event.c \ + event_config.c \ + watchdog.c + +rgmanager_CPPFLAGS = -I$(top_srcdir)/rgmanager/include + +rgmanager_CFLAGS = $(ccs_CFLAGS) $(cman_CFLAGS) $(dlm_CFLAGS) \ + $(xml_CFLAGS) $(slang_CFLAGS) $(logt_CFLAGS) + +rgmanager_LDFLAGS = $(ccs_LIBS) $(cman_LIBS) $(dlm_LIBS) \ + $(xml_LIBS) $(slang_LIBS) $(logt_LIBS) \ + -lpthread + +rgmanager_LDADD = $(top_builddir)/rgmanager/src/clulib/libclulib.la + +rg_test_SOURCES = fo_domain.c \ + restart_counter.c \ + reslist.c \ + resrules.c \ + restree.c \ + rg_locks.c \ + event_config.c \ + test.c + +rg_test_CPPFLAGS = -DNO_CCS \ + -I$(top_srcdir)/rgmanager/include + +rg_test_CFLAGS = $(cman_CFLAGS) $(xml_CFLAGS) $(logt_CFLAGS) + +rg_test_LDFLAGS = $(cman_LIBS) $(xml_LIBS) $(logt_LIBS) \ + -lpthread + +rg_test_LDADD = $(top_builddir)/rgmanager/src/clulib/libclulib.la + +# this fails because it expects RAs in the tree. Needs fixing +#check-local: rg_test +# cd tests && bash ./runtests.sh + +clean-local: + rm -f tests/*.out* diff --git a/rgmanager/src/daemons/event_config.c b/rgmanager/src/daemons/event_config.c index 3523a6d..8dc6193 100644 --- a/rgmanager/src/daemons/event_config.c +++ b/rgmanager/src/daemons/event_config.c @@ -1,6 +1,8 @@ /** @file * CCS event parsing, based on failover domain parsing */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/fo_domain.c b/rgmanager/src/daemons/fo_domain.c index 08590d2..3955158 100644 --- a/rgmanager/src/daemons/fo_domain.c +++ b/rgmanager/src/daemons/fo_domain.c @@ -5,6 +5,8 @@ * April 2006 - Nofailback option added to restrict failover behavior in ordered * + restricted failover domains by Josef Whiter */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c index 1d58041..573a973 100644 --- a/rgmanager/src/daemons/groups.c +++ b/rgmanager/src/daemons/groups.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + //#define DEBUG #include #include diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c index 88970f1..c47a326 100644 --- a/rgmanager/src/daemons/main.c +++ b/rgmanager/src/daemons/main.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/reslist.c b/rgmanager/src/daemons/reslist.c index 96336e4..b77d545 100644 --- a/rgmanager/src/daemons/reslist.c +++ b/rgmanager/src/daemons/reslist.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/resrules.c b/rgmanager/src/daemons/resrules.c index 7c68ce0..d197685 100644 --- a/rgmanager/src/daemons/resrules.c +++ b/rgmanager/src/daemons/resrules.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/restart_counter.c b/rgmanager/src/daemons/restart_counter.c index 8789987..5e70387 100644 --- a/rgmanager/src/daemons/restart_counter.c +++ b/rgmanager/src/daemons/restart_counter.c @@ -1,4 +1,5 @@ /* Time-based restart counters for rgmanager */ +#include "clusterautoconfig.h" #include #include diff --git a/rgmanager/src/daemons/restree.c b/rgmanager/src/daemons/restree.c index 5afbc5c..4c8225a 100644 --- a/rgmanager/src/daemons/restree.c +++ b/rgmanager/src/daemons/restree.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/rg_event.c b/rgmanager/src/daemons/rg_event.c index d03f4e3..cded743 100644 --- a/rgmanager/src/daemons/rg_event.c +++ b/rgmanager/src/daemons/rg_event.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/rg_forward.c b/rgmanager/src/daemons/rg_forward.c index bb42922..72920f0 100644 --- a/rgmanager/src/daemons/rg_forward.c +++ b/rgmanager/src/daemons/rg_forward.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + //#define DEBUG #include #include diff --git a/rgmanager/src/daemons/rg_locks.c b/rgmanager/src/daemons/rg_locks.c index f2d1050..937c8d9 100644 --- a/rgmanager/src/daemons/rg_locks.c +++ b/rgmanager/src/daemons/rg_locks.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/rg_queue.c b/rgmanager/src/daemons/rg_queue.c index 758f5e4..96b343e 100644 --- a/rgmanager/src/daemons/rg_queue.c +++ b/rgmanager/src/daemons/rg_queue.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c index 16204e1..7eea6ba 100644 --- a/rgmanager/src/daemons/rg_state.c +++ b/rgmanager/src/daemons/rg_state.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/rg_thread.c b/rgmanager/src/daemons/rg_thread.c index 5d22968..fa166c2 100644 --- a/rgmanager/src/daemons/rg_thread.c +++ b/rgmanager/src/daemons/rg_thread.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/sbuf.c b/rgmanager/src/daemons/sbuf.c index d98617f..09d75a3 100644 --- a/rgmanager/src/daemons/sbuf.c +++ b/rgmanager/src/daemons/sbuf.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/service_op.c b/rgmanager/src/daemons/service_op.c index aa36f41..fe94916 100644 --- a/rgmanager/src/daemons/service_op.c +++ b/rgmanager/src/daemons/service_op.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/slang_event.c b/rgmanager/src/daemons/slang_event.c index 3f93039..2a2d509 100644 --- a/rgmanager/src/daemons/slang_event.c +++ b/rgmanager/src/daemons/slang_event.c @@ -1,6 +1,8 @@ /** @file S/Lang event handling & intrinsic functions + vars */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/test.c b/rgmanager/src/daemons/test.c index 3c487c9..b4f41df 100644 --- a/rgmanager/src/daemons/test.c +++ b/rgmanager/src/daemons/test.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/daemons/tests/Makefile.am b/rgmanager/src/daemons/tests/Makefile.am new file mode 100644 index 0000000..f03e71d --- /dev/null +++ b/rgmanager/src/daemons/tests/Makefile.am @@ -0,0 +1,96 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = delta-test001-test002.expected \ + delta-test002-test003.expected \ + delta-test003-test004.expected \ + delta-test004-test005.expected \ + delta-test005-test006.expected \ + delta-test006-test007.expected \ + delta-test007-test008.expected \ + delta-test008-test009.expected \ + delta-test009-test010.expected \ + delta-test010-test011.expected \ + delta-test011-test012.expected \ + delta-test012-test013.expected \ + delta-test013-test014.expected \ + delta-test014-test015.expected \ + delta-test015-test016.expected \ + delta-test016-test017.expected \ + deptest1.conf \ + deptest1.in \ + deptest2.conf \ + deptest2.in \ + gentests.sh \ + runtests.sh \ + test001.conf \ + test001.expected \ + test001.start.expected \ + test001.stop.expected \ + test002.conf \ + test002.expected \ + test002.start.expected \ + test002.stop.expected \ + test003.conf \ + test003.expected \ + test003.start.expected \ + test003.stop.expected \ + test004.conf \ + test004.expected \ + test004.start.expected \ + test004.stop.expected \ + test005.conf \ + test005.expected \ + test005.start.expected \ + test005.stop.expected \ + test006.conf \ + test006.expected \ + test006.start.expected \ + test006.stop.expected \ + test007.conf \ + test007.expected \ + test007.start.expected \ + test007.stop.expected \ + test008.conf \ + test008.expected \ + test008.start.expected \ + test008.stop.expected \ + test009.conf \ + test009.expected \ + test009.start.expected \ + test009.stop.expected \ + test010.conf \ + test010.expected \ + test010.start.expected \ + test010.stop.expected \ + test011.conf \ + test011.expected \ + test011.start.expected \ + test011.stop.expected \ + test012.conf \ + test012.expected \ + test012.start.expected \ + test012.stop.expected \ + test013.conf \ + test013.expected \ + test013.start.expected \ + test013.stop.expected \ + test014.conf \ + test014.expected \ + test014.start.expected \ + test014.stop.expected \ + test015.conf \ + test015.expected \ + test015.start.expected \ + test015.stop.expected \ + test016.conf \ + test016.expected \ + test016.start.expected \ + test016.stop.expected \ + test017.conf \ + test017.expected \ + test017.start.expected \ + test017.stop.expected \ + test018.conf \ + test018.start.expected \ + test018.stop.expected \ + testlist diff --git a/rgmanager/src/daemons/watchdog.c b/rgmanager/src/daemons/watchdog.c index 6efd655..24789a8 100644 --- a/rgmanager/src/daemons/watchdog.c +++ b/rgmanager/src/daemons/watchdog.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/utils/Makefile b/rgmanager/src/utils/Makefile deleted file mode 100644 index 0e01c73..0000000 --- a/rgmanager/src/utils/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -TARGET1= clubufflush -TARGET2= clufindhostname -TARGET3= clustat -TARGET4= clusvcadm -TARGET5= clulog -TARGET6= clunfslock - -SBINDIRT=$(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5) $(TARGET6) - -all: depends ${TARGET1} ${TARGET2} ${TARGET3} ${TARGET4} ${TARGET5} ${TARGET6} - -include ../../../make/defines.mk -include $(OBJDIR)/make/cobj.mk -include $(OBJDIR)/make/clean.mk -include $(OBJDIR)/make/install.mk -include $(OBJDIR)/make/uninstall.mk - -DISABLEDTARGETS= cluarp - -CFLAGS += -Werror -Wstrict-prototypes -Wshadow -fPIC -D_GNU_SOURCE -CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} -CFLAGS += -I${logtincdir} -I${ncursesincdir} -CFLAGS += -I$(S)/../../include -CFLAGS += -I${incdir} - -LDFLAGS += -L../clulib -lclulib -LDFLAGS += -L${libdir} - -LDDEPS += ../clulib/libclulib.a - -CCS_LDFLAGS += -L${ccslibdir} -lccs -CMAN_LDFLAGS += -L${cmanlibdir} -lcman -LOGSYS_LDFLAGS += -L${logtlibdir} -llogthread -NCURSES_LDFLAGS += -L${ncurseslibdir} -lncurses -PTHREAD_LDFLAGS += -lpthread - -OBJS1= $(TARGET1).o -OBJS2= $(TARGET2).o -OBJS3= $(TARGET3).o -OBJS4= $(TARGET4).o -OBJS5= $(TARGET5).o - -${TARGET1}: ${OBJS1} ${LDDEPS} - $(CC) -o $@ $^ $(LDFLAGS) - -${TARGET2}: ${OBJS2} ${LDDEPS} - $(CC) -o $@ $^ $(LDFLAGS) - -${TARGET3}: ${OBJS3} ${LDDEPS} - $(CC) -o $@ $^ $(CCS_LDFLAGS) $(CMAN_LDFLAGS) \ - $(NCURSES_LDFLAGS) $(PTHREAD_LDFLAGS) \ - $(LOGSYS_LDFLAGS) $(LDFLAGS) - -${TARGET4}: ${OBJS4} ${LDDEPS} - $(CC) -o $@ $^ $(CMAN_LDFLAGS) $(PTHREAD_LDFLAGS) \ - $(LOGSYS_LDFLAGS) $(LDFLAGS) - -${TARGET5}: ${OBJS5} ${LDDEPS} - $(CC) -o $@ $^ $(CCS_LDFLAGS) \ - $(LOGSYS_LDFLAGS) $(LDFLAGS) - -${TARGET6}: - cp $(S)/${TARGET6}.sh ${TARGET6} - chmod 755 ${TARGET6} - -depends: - $(MAKE) -C ../clulib all - -clean: generalclean - --include $(OBJS1:.o=.d) --include $(OBJS2:.o=.d) --include $(OBJS3:.o=.d) --include $(OBJS4:.o=.d) --include $(OBJS5:.o=.d) diff --git a/rgmanager/src/utils/Makefile.am b/rgmanager/src/utils/Makefile.am new file mode 100644 index 0000000..268b6f1 --- /dev/null +++ b/rgmanager/src/utils/Makefile.am @@ -0,0 +1,43 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = cluarp.c \ + clunfsops.c \ + clunfslock + +noinst_HEADER = syscall.h + +sbin_PROGRAMS = clubufflush \ + clufindhostname \ + clustat \ + clusvcadm \ + clulog + +sbin_SCRIPTS = clunfslock + +AM_CPPFLAGS = -I$(top_srcdir)/rgmanager/include + +clulib = $(top_builddir)/rgmanager/src/clulib/libclulib.la + +clubufflush_LDADD = $(clulib) + +clufindhostname_LDADD = $(clulib) + +clustat_CFLAGS = $(ccs_CFLAGS) $(cman_CFLAGS) $(ncurses_CFLAGS) \ + $(logt_CFLAGS) + +clustat_LDFLAGS = $(ccs_LIBS) $(cman_LIBS) $(ncurses_LIBS) \ + $(logt_LIBS) -lpthread + +clustat_LDADD = $(clulib) + +clusvcadm_CFLAGS = $(cman_CFLAGS) $(logt_CFLAGS) + +clusvcadm_LDFLAGS = $(cman_LIBS) $(logt_LIBS) -lpthread + +clusvcadm_LDADD = $(clulib) + +clulog_CFLAGS = $(ccs_CFLAGS) $(logt_CFLAGS) + +clulog_LIBS = $(ccs_LIBS) $(logt_LIBS) + +clulog_LDADD = $(clulib) diff --git a/rgmanager/src/utils/cluarp.c b/rgmanager/src/utils/cluarp.c index 08f123e..f22fa60 100644 --- a/rgmanager/src/utils/cluarp.c +++ b/rgmanager/src/utils/cluarp.c @@ -1,6 +1,7 @@ /** @file * Utility to generate a gratuitous ARP request on a given interface. */ +#include "clusterautoconfig.h" #include #include diff --git a/rgmanager/src/utils/clubufflush.c b/rgmanager/src/utils/clubufflush.c index 3eaed48..92fc042 100644 --- a/rgmanager/src/utils/clubufflush.c +++ b/rgmanager/src/utils/clubufflush.c @@ -5,11 +5,7 @@ * * invalidatebuffers.c */ - -/* - * Version string that is filled in by CVS - */ -static const char *version __attribute__ ((unused)) = "$Revision$"; +#include "clusterautoconfig.h" /* * System includes diff --git a/rgmanager/src/utils/clufindhostname.c b/rgmanager/src/utils/clufindhostname.c index 42e1691..72fde04 100644 --- a/rgmanager/src/utils/clufindhostname.c +++ b/rgmanager/src/utils/clufindhostname.c @@ -4,6 +4,8 @@ * Author: Richard Rabbat * IPv6 support added 7/2006 */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/utils/clulog.c b/rgmanager/src/utils/clulog.c index 627c5b0..c65c909 100644 --- a/rgmanager/src/utils/clulog.c +++ b/rgmanager/src/utils/clulog.c @@ -4,6 +4,8 @@ * Author: Lon Hohberger * Based on original code by: Jeff Moyer */ +#include "clusterautoconfig.h" + #include #include #include diff --git a/rgmanager/src/utils/clunfslock b/rgmanager/src/utils/clunfslock new file mode 100644 index 0000000..67b2d6d --- /dev/null +++ b/rgmanager/src/utils/clunfslock @@ -0,0 +1,69 @@ +#!/bin/bash +# +# rpc.statd -H $0 to enable. This provides the HA-callout capability +# for RHCS-managed NFS services. Note that you must edit +# /etc/sysconfig/nfs in order to make this work; clumanager/rgmanager +# will not interfere with a running nfs statd. +# +# Arg 3 (server as known to client) does not work; it's always 127.0.0.1 +# so we traverse all cluster mount points. +# + +clustered_mounts() +{ + declare dev mp + + while read dev mp; do + if [ "${dev:0:4}" != "/dev" ]; then + continue + fi + + # XXX Need clumanager to create this on mount + if [ -d "$mp/.clumanager" ]; then + echo $dev $mp + fi + done < <(cat /proc/mounts | awk '{print $1,$2}') +} + + +add-client() +{ + declare dev mp + + while read dev mp; do + [ -d "$mp/.clumanager/statd/sm" ] || \ + mkdir -p $mp/.clumanager/statd/sm + touch $mp/.clumanager/statd/sm/$1 + done < <(clustered_mounts) +} + + +del-client() +{ + while read $dev $mp; do + [ -d "$mp/.clumanager/statd/sm" ] || \ + mkdir -p $mp/.clumanager/statd/sm + rm -f $mp/.clumanager/statd/sm/$1 + done < <(clustered_mounts) +} + +case "$1" in + add-client) + : + ;; + del-client) + : + ;; + *) + echo "Usage: $0 [server]" + exit 0 +esac + + +if [ -z "$2" ]; then + echo "Usage: $0 [server]" + exit 1 +fi + +$1 $2 $3 +exit 0 diff --git a/rgmanager/src/utils/clunfslock.sh b/rgmanager/src/utils/clunfslock.sh deleted file mode 100644 index 67b2d6d..0000000 --- a/rgmanager/src/utils/clunfslock.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# -# rpc.statd -H $0 to enable. This provides the HA-callout capability -# for RHCS-managed NFS services. Note that you must edit -# /etc/sysconfig/nfs in order to make this work; clumanager/rgmanager -# will not interfere with a running nfs statd. -# -# Arg 3 (server as known to client) does not work; it's always 127.0.0.1 -# so we traverse all cluster mount points. -# - -clustered_mounts() -{ - declare dev mp - - while read dev mp; do - if [ "${dev:0:4}" != "/dev" ]; then - continue - fi - - # XXX Need clumanager to create this on mount - if [ -d "$mp/.clumanager" ]; then - echo $dev $mp - fi - done < <(cat /proc/mounts | awk '{print $1,$2}') -} - - -add-client() -{ - declare dev mp - - while read dev mp; do - [ -d "$mp/.clumanager/statd/sm" ] || \ - mkdir -p $mp/.clumanager/statd/sm - touch $mp/.clumanager/statd/sm/$1 - done < <(clustered_mounts) -} - - -del-client() -{ - while read $dev $mp; do - [ -d "$mp/.clumanager/statd/sm" ] || \ - mkdir -p $mp/.clumanager/statd/sm - rm -f $mp/.clumanager/statd/sm/$1 - done < <(clustered_mounts) -} - -case "$1" in - add-client) - : - ;; - del-client) - : - ;; - *) - echo "Usage: $0 [server]" - exit 0 -esac - - -if [ -z "$2" ]; then - echo "Usage: $0 [server]" - exit 1 -fi - -$1 $2 $3 -exit 0 diff --git a/rgmanager/src/utils/clunfsops.c b/rgmanager/src/utils/clunfsops.c index 2a2d16a..27d8042 100644 --- a/rgmanager/src/utils/clunfsops.c +++ b/rgmanager/src/utils/clunfsops.c @@ -7,7 +7,8 @@ * File Origin - this command was reverse-engineered by starting with the * GPL syscall interfaces defined in . */ - +#include "clusterautoconfig.h" + #ifdef X86_64 #define __ASM_SYSTEM_H #define __ASM_X86_64_PROCESSOR_H diff --git a/rgmanager/src/utils/clustat.c b/rgmanager/src/utils/clustat.c index f638727..9905510 100644 --- a/rgmanager/src/utils/clustat.c +++ b/rgmanager/src/utils/clustat.c @@ -1,3 +1,5 @@ +#include "clusterautoconfig.h" + #include #include #include @@ -12,10 +14,6 @@ #include #include -#ifdef HAVE_CONFIG_H -#include -#endif - #define FLAG_UP 0x1 #define FLAG_LOCAL 0x2 #define FLAG_RGMGR 0x4 @@ -1076,7 +1074,7 @@ main(int argc, char **argv) goto cleanup; case VERSION_ONLY: printf("%s version %s\n", basename(argv[0]), - RELEASE_VERSION); + VERSION); if (!ch) break; goto cleanup; diff --git a/rgmanager/src/utils/clusvcadm.c b/rgmanager/src/utils/clusvcadm.c index 8fe7599..e977b3d 100644 --- a/rgmanager/src/utils/clusvcadm.c +++ b/rgmanager/src/utils/clusvcadm.c @@ -2,6 +2,8 @@ * The New And Improved Cluster Service Admin Utility. * TODO Clean up the code. */ +#include "clusterautoconfig.h" + #include #include #include @@ -15,11 +17,6 @@ #include #include -#ifdef HAVE_CONFIG_H -#include -#endif - - static void build_message(SmMessageSt *msgp, int action, char *svcName, int target, int arg1, int arg2) @@ -297,7 +294,7 @@ main(int argc, char **argv) node_specified = 1; break; case 'v': - printf("%s\n", RELEASE_VERSION); + printf("%s\n", VERSION); return 0; case 'Z': actionstr = "freezing"; diff --git a/scripts/fenceparse b/scripts/fenceparse deleted file mode 100644 index 8b00698..0000000 --- a/scripts/fenceparse +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -e - -definefile="$1" -define="$2" -release="$3" -srcdir="$4" -infile="$5" - -definedata="$(cat $definefile | grep "^\#define $define" | sed -e 's/.*'$define' //')" - -realinfile="$(ls $srcdir/$infile.*)" - -interpreter="$(cat $realinfile | head -n 1 | awk -F "/" '{print $NF}')" -interpreter="$(echo $interpreter)" - -case "$interpreter" in - perl) - start="\$" - end=";" - ;; - *) - start="" - end="" - ;; -esac - -awk "{print}(\$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $realinfile -echo ${start}RELEASE_VERSION=\"${release}\"${end} -echo ${start}REDHAT_COPYRIGHT=${definedata}${end} -echo ${start}BUILD_DATE=\"\(built $(date)\)\"${end} -awk -v p=0 "(\$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $realinfile - -exit 0 diff --git a/scripts/uninstall.pl b/scripts/uninstall.pl deleted file mode 100644 index 4326e85..0000000 --- a/scripts/uninstall.pl +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl - -## Description: Basically the reverse of the install program, except it -## only supports a list of files and a directory as arguments - -$| = 1; - -use Getopt::Std; - -# list all valid options here. User will get errors if invalid options are -# specified on the command line -getopts('hD'); - -$args = 1; - -# We need at least two arguments to uninstall -if(!defined($ARGV[1])) { - $args = 0; -} - -# if the user set the help flag or didn't provide enough args, print help -# and die. -if(defined($opt_h) || ($args == 0)) { - $msg = "usage: $0 [OPTIONS] TARGET DIRECTORY\n"; - $msg = $msg . "\t-D\tRemove specified directory if empty\n"; - $msg = $msg . "\t-h\tDisplay this help message\n"; - die $msg; -} - -# find out how many command line arguments we have -$length = $#ARGV; -# We need a special case if there is only one file specified -if($length > 1) { - @filelist = @ARGV; - $#filelist = $length - 1; -} -else { - @filelist = @ARGV[0]; -} - -# the last argument is the directory -$dir = @ARGV[$length]; - -# prepend the directory name to all files in the filelist -$i = 0; -print "Attempting to remove the following files from directory $dir/:\n"; -while($i < $length) { - print "@filelist[$i] "; - @filelist[$i] = "$dir/" . @filelist[$i]; - $i++; -} -print "\n"; - -#print "Files:@filelist\n"; -#print "Directory: $dir\n"; - -# delete the files in filelist -$unlinked = unlink @filelist; -if($unlinked < $length) { - print "Error! Unable to remove all files in $dir:\n\tYou may have to manually delete some of them.\n" -} -# if user specifed they want the directory deleted, try to delete it. Print -# error message if not able to delete directory, including error. -if(defined($opt_D)) { - $result = rmdir($dir); - if($result == FALSE) { - print "Error! Unable to remove directory $dir/:\n\t$!\n"; - } -} - -