commit cluster-glue for openSUSE:Factory

Hello community, here is the log from the commit of package cluster-glue for openSUSE:Factory checked in at Tue Oct 27 17:20:57 CET 2009. -------- --- cluster-glue/cluster-glue.changes 2009-08-03 10:17:00.000000000 +0200 +++ /mounts/work_src_done/STABLE/cluster-glue/cluster-glue.changes 2009-08-24 10:30:47.000000000 +0200 @@ -2 +2 @@ -Mon Aug 3 10:08:17 CEST 2009 - abeekhof@suse.de +Mon Aug 24 10:27:23 CEST 2009 - abeekhof@suse.de @@ -4 +4,37 @@ -- Don't use macros for the group names +- Use the hacluster/haclient user/group instead of daemon on Fedora + and derivatives + +------------------------------------------------------------------- +Mon Aug 17 15:36:51 CEST 2009 - abeekhof@suse.de + +- Include relevant Obsoletes: directives for upgrading + +------------------------------------------------------------------- +Fri Aug 14 19:36:46 CEST 2009 - abeekhof@suse.de + +- Remove bogus conflicts on heartbeat +- Upstream version cs: 10b6d4ec44a1 + + Prefer glibtool over libtool for BSD and friends + + Medium: logd: add init script and example configuration file. + + High: logd: Fix init script. Remove apphbd references. + + logd: configuration file is optional. + + logd: print status on finished operations. + + High: sbd: actually install the binary. + + Medium: stonith: remove references to heartbeat artifacts. + +------------------------------------------------------------------- +Wed Aug 12 12:03:48 CEST 2009 - abeekhof@suse.de + +- Fix building on Fedora and derivatives + +------------------------------------------------------------------- +Tue Aug 11 13:04:20 CEST 2009 - abeekhof@suse.de + +- Upstream version cs: aa5b5e48df62 + + Med: hb_report: report on more packages and with more state. + + The -E option to lrmadmin does not take an argument + + Provide a default value for docdir and ensure it is expanded + + Low: clplumbing: fix a potential resource leak in cl_random (bnc#525393). + + Med: hb_report: Include dlm_tool debugging information if available. + + hb_report: Include more possible error output. + + Ensure hb_report is built/packaged calling whatdependson for head-i586 New: ---- cluster-glue-Fedora_11.spec cluster-glue-RHEL_5.spec cluster-glue.Fedora.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cluster-glue-Fedora_11.spec ++++++ # # spec file for package cluster-glue (Version 1.0) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define gname haclient %define uname hacluster %define nogroup nobody # When downloading directly from Mercurial, it will automatically add this prefix # Invoking 'hg archive' wont but you can add one with: hg archive -t tgz -p "Reusable-Cluster-Components-" -r $upstreamversion $upstreamversion.tar.gz %define upstreamprefix Reusable-Cluster-Components- %define upstreamversion 75cab275433e Name: cluster-glue Summary: Reusable cluster components Version: 1.0 Release: 1 License: GPL v2 or later ; LGPL v2.1 or later Url: http://www.clusterlabs.org Group: System Environment/Base Source0: cluster-glue.tar.gz Obsoletes: heartbeat-common ## Setup/build bits BuildRoot: %{_tmppath}/%{name}-%{version}-build # Build dependencies BuildRequires: autoconf automake libtool pkgconfig which BuildRequires: bzip2-devel glib2-devel libxml2-devel python-devel BuildRequires: OpenIPMI-devel openssl-devel %if 0%{?fedora} BuildRequires: chrpath libcurl-devel libnet-devel %endif %if 0%{?fedora} || 0%{?centos} > 4 || 0%{?rhel} > 4 BuildRequires: libtool-ltdl-devel openhpi-devel BuildRequires: net-snmp-devel >= 5.4 %else BuildRequires: gcc-c++ %endif %if 0%{?fedora} < 12 BuildRequires: e2fsprogs-devel %else BuildRequires: libuuid-devel %endif %prep %setup -q -n cluster-glue ./autogen.sh %{configure} CFLAGS="${CFLAGS} $(echo '%{optflags}')" \ --enable-fatal-warnings=no \ --with-daemon-group=%{gname} \ --with-daemon-user=%{uname} \ --localstatedir=%{_var} \ --libdir=%{_libdir} %build make %{_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} ## tree fix up # Dont package static libs find %{buildroot} -name '*.a' -exec rm {} \; find %{buildroot} -name '*.la' -exec rm {} \; find %{buildroot} -type f -exec chrpath -d {} >/dev/null 2>&1 \; %clean rm -rf %{buildroot} # cluster-glue %description A collection of common tools that are useful for writing cluster managers such as Pacemaker. Provides a local resource manager that understands the OCF and LSB standards, and an interface to common STONITH devices. %files %defattr(-,root,root) %dir %{_datadir}/heartbeat %{_sysconfdir}/init.d/logd %{_datadir}/heartbeat/ha_cf_support.sh %{_datadir}/heartbeat/openais_conf_support.sh %{_datadir}/heartbeat/utillib.sh %{_sbindir}/ha_logger %{_sbindir}/hb_report %{_sbindir}/lrmadmin %{_sbindir}/meatclient %{_sbindir}/stonith %{_sbindir}/sbd %dir %{_libdir}/heartbeat %dir %{_libdir}/heartbeat/plugins %dir %{_libdir}/heartbeat/plugins/RAExec %dir %{_libdir}/heartbeat/plugins/InterfaceMgr %{_libdir}/heartbeat/lrmd %{_libdir}/heartbeat/ha_logd %{_libdir}/heartbeat/plugins/RAExec/*.so %{_libdir}/heartbeat/plugins/InterfaceMgr/*.so %dir %{_libdir}/stonith %dir %{_libdir}/stonith/plugins %dir %{_libdir}/stonith/plugins/stonith2 %{_libdir}/stonith/plugins/external %{_libdir}/stonith/plugins/stonith2/*.so %{_libdir}/stonith/plugins/stonith2/*.py* %{_libdir}/stonith/plugins/xen0-ha-dom0-stonith-helper %dir %{_var}/lib/heartbeat %dir %{_var}/lib/heartbeat/cores %dir %attr (0700, root, root) %{_var}/lib/heartbeat/cores/root %dir %attr (0700, nobody, %{nogroup}) %{_var}/lib/heartbeat/cores/nobody %dir %attr (0700, %{uname}, %{gname}) %{_var}/lib/heartbeat/cores/%{uname} %if 0%{?fedora} %doc %{_docdir}/glue/stonith %else %doc %{_docdir}/stonith %endif %doc %{_mandir}/man8/* %doc %{_mandir}/man1/* %doc AUTHORS %doc COPYING # cluster-glue-libs %package -n cluster-glue-libs License: GPLv2+ and LGPLv2+ Summary: Reusable cluster libraries Group: Development/Libraries Requires: %{name} = %{version}-%{release} # Directives to allow upgrade from combined heartbeat packages in Fedora11 Provides: heartbeat-stonith = 3.0.0-1 Provides: heartbeat-pils = 3.0.0-1 Obsoletes: heartbeat-stonith < 3.0.0-1 Obsoletes: heartbeat-pils < 3.0.0-1 Obsoletes: libheartbeat2 %description -n cluster-glue-libs A collection of libraries that are useful for writing cluster managers such as Pacemaker. %pre getent group %{gname} >/dev/null || groupadd -r %{gname} getent passwd %{uname} >/dev/null || \ useradd -r -g %{gname} -d %{_var}/lib/heartbeat/cores/hacluster -s /sbin/nologin \ -c "cluster user" %{uname} exit 0 %post -n cluster-glue-libs -p /sbin/ldconfig %postun -n cluster-glue-libs -p /sbin/ldconfig %files -n cluster-glue-libs %defattr(-,root,root) %{_libdir}/lib*.so.* %doc AUTHORS %doc COPYING.LIB # cluster-glue-libs-devel %package -n cluster-glue-libs-devel License: GPLv2+ and LGPLv2+ Summary: Headers and libraries for writing cluster managers Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: cluster-glue-libs = %{version}-%{release} Obsoletes: libheartbeat-devel %description -n cluster-glue-libs-devel Headers and shared libraries for a useful for writing cluster managers such as Pacemaker. %files -n cluster-glue-libs-devel %defattr(-,root,root) %dir %{_libdir}/glue %dir %{_libdir}/glue/plugins %dir %{_libdir}/glue/plugins/test %dir %{_libdir}/heartbeat %dir %{_datadir}/glue %{_libdir}/lib*.so %{_libdir}/heartbeat/ipctest %{_libdir}/heartbeat/ipctransientclient %{_libdir}/heartbeat/ipctransientserver %{_libdir}/heartbeat/transient-test.sh %{_libdir}/heartbeat/base64_md5_test %{_libdir}/heartbeat/logtest %{_includedir}/clplumbing %{_includedir}/heartbeat %{_includedir}/stonith %{_includedir}/pils %{_datadir}/glue/lrmtest %{_libdir}/glue/plugins/test/test.so %doc AUTHORS %doc COPYING %doc COPYING.LIB %changelog cluster-glue-RHEL_5.spec: same change cluster-glue.Fedora.spec: same change ++++++ cluster-glue.spec ++++++ --- /var/tmp/diff_new_pack.FgcHOv/_old 2009-10-27 17:18:47.000000000 +0100 +++ /var/tmp/diff_new_pack.FgcHOv/_new 2009-10-27 17:18:47.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package cluster-glue (Version 0.9) +# spec file for package cluster-glue (Version 1.0) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,12 +20,10 @@ %define uid 90 %define gname haclient %define uname hacluster -%define nogroup nobody -%define nogroup nogroup Name: cluster-glue Summary: Reusable cluster components -Version: 0.9 +Version: 1.0 Release: 1 License: GPL v2 or later ; LGPL v2.1 or later Url: http://www.linux-ha.org @@ -34,9 +32,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build AutoReqProv: on BuildRequires: autoconf automake e2fsprogs-devel glib2-devel libtool libxml2-devel pkgconfig python-devel -BuildRequires: libcurl-devel libnet net-snmp-devel -# OpenIPMI-devel openhpi-devel +BuildRequires: OpenIPMI-devel libnet net-snmp-devel openhpi-devel +Obsoletes: heartbeat-common Requires(pre): /usr/sbin/groupadd /usr/bin/getent /usr/sbin/useradd +# SLES10 needs tcpd-devel but doesn't have libcurl +%if 0%{?suse_version} < 1020 +BuildRequires: tcpd-devel +%else +BuildRequires: libcurl-devel +%endif %description A collection of common tools derived from the Heartbeat project that are @@ -48,6 +52,7 @@ License: GPL v2 only ; GPL v2 or later ; LGPL v2.1 or later Summary: The Pacemaker scalable High-Availability cluster resource manager Group: Productivity/Clustering/HA +Obsoletes: libheartbeat2 Requires: %{name} = %{version}-%{release} %description -n libglue1 @@ -60,6 +65,7 @@ Group: Development/Libraries/C and C++ Requires: %{name} = %{version}-%{release} Requires: libglue1 = %{version}-%{release} +Obsoletes: libheartbeat-devel %description -n libglue-devel Headers and shared libraries for a useful for writing cluster managers @@ -74,7 +80,11 @@ CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}" export CFLAGS ./autogen.sh +%if 0%{?suse_version} < 1020 +%configure --enable-fatal-warnings=no --with-daemon-group=%{gname} --with-daemon-user=%{uname} +%else %configure --enable-fatal-warnings=no --with-daemon-group=%{gname} --with-daemon-user=%{uname} --docdir=%{_docdir} +%endif export MAKE="make %{?jobs:-j%jobs}" make %{?jobs:-j%jobs} ########################################################### @@ -87,6 +97,11 @@ find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f find $RPM_BUILD_ROOT -name '*.pyc' -type f -print0 | xargs -0 rm -f find $RPM_BUILD_ROOT -name '*.pyo' -type f -print0 | xargs -0 rm -f +test -d $RPM_BUILD_ROOT/sbin || mkdir $RPM_BUILD_ROOT/sbin +( + cd $RPM_BUILD_ROOT/sbin + ln -s /etc/init.d/logd rclogd +) ########################################################### %clean @@ -130,7 +145,7 @@ %dir %{_var}/lib/heartbeat %dir %{_var}/lib/heartbeat/cores %dir %attr (0700, root, root) %{_var}/lib/heartbeat/cores/root -%dir %attr (0700, nobody, %{nogroup}) %{_var}/lib/heartbeat/cores/nobody +%dir %attr (0700, nobody, nobody) %{_var}/lib/heartbeat/cores/nobody %dir %attr (0700, %{uname}, %{gname}) %{_var}/lib/heartbeat/cores/%{uname} %dir %{_libdir}/heartbeat/plugins %dir %{_libdir}/heartbeat/plugins/RAExec @@ -138,15 +153,28 @@ %dir %{_libdir}/stonith %dir %{_libdir}/stonith/plugins %dir %{_libdir}/stonith/plugins/stonith2 +%dir %{_datadir}/heartbeat +%{_datadir}/heartbeat/ha_cf_support.sh +%{_datadir}/heartbeat/openais_conf_support.sh +%{_datadir}/heartbeat/utillib.sh %{_sbindir}/ha_logger +%{_sbindir}/hb_report %{_sbindir}/lrmadmin %{_sbindir}/meatclient %{_sbindir}/stonith +%{_sbindir}/sbd +%{_sysconfdir}/init.d/logd +%if 0%{?suse_version} < 1020 +%doc %{_datadir}/doc/stonith +%else %doc %{_docdir}/stonith +%endif %doc %{_mandir}/man8/* %doc %{_mandir}/man1/* %doc AUTHORS %doc COPYING +%doc logd/logd.cf +/sbin/rclogd %{_libdir}/heartbeat/lrmd %{_libdir}/heartbeat/ha_logd %{_libdir}/heartbeat/plugins/RAExec/*.so ++++++ cluster-glue.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/.hg_archival.txt new/cluster-glue/.hg_archival.txt --- old/cluster-glue/.hg_archival.txt 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/.hg_archival.txt 2009-08-14 15:06:26.000000000 +0200 @@ -1,2 +1,2 @@ repo: e3ffdd7ae81c596b2be7e1e110d2c1255161340e -node: 2e136fee6761a79fd819fe06e6fc7db730d5526f +node: 0fbe5d0e9ea6d180225a31eac162f0c0a8839d95 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/.hgtags new/cluster-glue/.hgtags --- old/cluster-glue/.hgtags 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/.hgtags 2009-08-14 15:06:26.000000000 +0200 @@ -35,3 +35,4 @@ e3855af19554339204b5b2b2a199a7bc31e22843 STABLE-2.0.2 e6637f62c87ada212a83942ec5b2a4bf30b98c3f Series-Root-1.2 f6c2cd2593f365f984ce051db61466738ac05dcd Beta-0.4.9f +940fa13f6a0a929d15a01af9a0b62c16e4d2706a glue-1.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/Makefile.am new/cluster-glue/Makefile.am --- old/cluster-glue/Makefile.am 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/Makefile.am 2009-08-14 15:06:26.000000000 +0200 @@ -19,9 +19,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure DRF/config-h.in \ DRF/stamp-h.in libtool.m4 ltdl.m4 libltdl.tar -SUBDIRS = include $(LIBLTDL_DIR) replace lib lrm logd - -ACLOCAL_AMFLAGS = -I libltdl/m4 +SUBDIRS = include $(LIBLTDL_DIR) replace lib lrm logd hb_report RPM_OPTS = --define "_sourcedir $(RPM_ROOT)" \ --define "_specdir $(RPM_ROOT)" \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/autogen.sh new/cluster-glue/autogen.sh --- old/cluster-glue/autogen.sh 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/autogen.sh 2009-08-14 15:06:26.000000000 +0200 @@ -105,7 +105,7 @@ fi done -for command in glibtool libtool14 libtool15 libtool +for command in libtool14 libtool15 libtool glibtool do URL=$gnu/$pkg/ if @@ -117,19 +117,19 @@ done if [ -z $autoconf ]; then - echo You must have autoconf installed to compile the linux-ha package. + echo You must have autoconf installed to compile the cluster-glue package. echo Download the appropriate package for your system, echo or get the source tarball at: $gnu/autoconf/ exit 1 elif [ -z $automake ]; then - echo You must have automake installed to compile the linux-ha package. + echo You must have automake installed to compile the cluster-glue package. echo Download the appropriate package for your system, echo or get the source tarball at: $gnu/automake/ exit 1 elif [ -z $libtool ]; then - echo You must have libtool installed to compile the linux-ha package. + echo You must have libtool installed to compile the cluster-glue package. echo Download the appropriate package for your system, echo or get the source tarball at: $gnu/libtool/ exit 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/configure.ac new/cluster-glue/configure.ac --- old/cluster-glue/configure.ac 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/configure.ac 2009-08-14 15:06:26.000000000 +0200 @@ -19,8 +19,7 @@ dnl checks for library functions dnl checks for system services -AC_INIT(glue, 1.0.0, pacemaker@oss.clusterlabs.org) -CRM_DTD_VERSION="1.0" +AC_INIT(glue, 1.0.0, linux-ha-dev@lists.linux-ha.org) PKG_FEATURES="" HB_PKG=heartbeat @@ -259,9 +258,15 @@ eval infodir="`eval echo ${infodir}`" eval mandir="`eval echo ${mandir}`" +dnl docdir is a recent addition to autotools +eval docdir="`eval echo ${docdir}`" +if test "x$docdir" = "x"; then + docdir="`eval echo ${datadir}/doc`" +fi +AC_SUBST(docdir) + dnl Home-grown variables eval INITDIR="${INITDIR}" -eval docdir="`eval echo ${docdir}`" for j in prefix exec_prefix bindir sbindir libexecdir datadir sysconfdir \ sharedstatedir localstatedir libdir includedir oldincludedir infodir \ @@ -631,6 +636,7 @@ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/poll.h) +AC_CHECK_HEADERS(sys/reboot.h) AC_CHECK_HEADERS(sys/resource.h) AC_CHECK_HEADERS(sys/select.h) AC_CHECK_HEADERS(sys/socket.h) @@ -759,6 +765,14 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[[#include <time.h>]]) AC_CHECK_TYPES([nfds_t],,,[[#include <poll.h>]]) +AC_MSG_CHECKING(if clock_t is long enough) +if test $ac_cv_sizeof_long -ge 8; then + AC_MSG_RESULT(yes) + AC_DEFINE(CLOCK_T_IS_LONG_ENOUGH, 1, [Set if CLOCK_T is adequate by itself for the "indefinite future" (>= 100 years)]) +else + AC_MSG_RESULT(no) +fi + dnl ======================================================================== dnl Functions dnl ======================================================================== @@ -1206,8 +1220,11 @@ lrm/test/LRMBasicSanityCheck \ lrm/test/testcases/Makefile \ logd/Makefile \ +logd/logd \ replace/Makefile \ - ) +hb_report/Makefile \ + hb_report/hb_report \ +) dnl Now process the entire list of files added by previous dnl calls to AC_CONFIG_FILES() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/hb_report/Makefile.am new/cluster-glue/hb_report/Makefile.am --- old/cluster-glue/hb_report/Makefile.am 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/hb_report/Makefile.am 2009-08-14 15:06:26.000000000 +0200 @@ -22,4 +22,4 @@ hanoarchdir = $(datadir)/heartbeat hanoarch_SCRIPTS = utillib.sh ha_cf_support.sh openais_conf_support.sh -sbin_SCRIPTS = hb_report ocf-tester +sbin_SCRIPTS = hb_report diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/hb_report/hb_report.in new/cluster-glue/hb_report/hb_report.in --- old/cluster-glue/hb_report/hb_report.in 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/hb_report/hb_report.in 2009-08-14 15:06:26.000000000 +0200 @@ -17,7 +17,10 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -. @sysconfdir@/ha.d/shellfuncs +. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs + +HA_NOARCHBIN=@datadir@/heartbeat + . $HA_NOARCHBIN/utillib.sh unset LANG @@ -508,6 +511,20 @@ df set +x } +dlm_dump() { + if which dlm_tool >/dev/null 2>&1 ; then + echo NOTICE - Lockspace overview: + dlm_tool ls + dlm_tool ls | grep name | + while read X N ; do + echo NOTICE - Lockspace $N: + dlm_tool lockdump $N + done + echo NOTICE - Lockspace history: + dlm_tool dump + fi +} + # # replace sensitive info with '****' @@ -792,11 +809,19 @@ # the very first thing we must figure out is which cluster # stack is used CORES_DIRS=$HA_VARLIB/cores -COMMON_PACKAGES="pacemaker heartbeat-common heartbeat-resources" +PACKAGES="pacemaker libpacemaker3 pacemaker-pygui +openais libopenais2 +resource-agents cluster-glue libglue1 ldirectord +heartbeat heartbeat-common heartbeat-resources libheartbeat2 +ocfs2-tools ocfs2-tools-o2cb ocfs2-kmp-default ocfs2-kmp-pae ocfs2-kmp-xen ocfs2-kmp-debug ocfs2-kmp-trace +drbd drbd-kmp-xen drbd-kmp-pae drbd-kmp-default drbd-kmp-debug drbd-kmp-trace +lvm2 lvm2-clvm +libdlm libdlm2 +kernel-default kernel-pae kernel-xen +" case "$CLUSTER_TYPE" in openais) CONF=/etc/ais/openais.conf - PACKAGES="openais $COMMON_PACKAGES" CF_SUPPORT=$HA_NOARCHBIN/openais_conf_support.sh CORES_DIRS="$CORES_DIRS /var/lib/openais" MEMBERSHIP_TOOL_OPTS="" @@ -804,7 +829,6 @@ ;; heartbeat) CONF=$HA_CF - PACKAGES="heartbeat $COMMON_PACKAGES" CF_SUPPORT=$HA_NOARCHBIN/ha_cf_support.sh MEMBERSHIP_TOOL_OPTS="-H" ;; @@ -842,7 +866,8 @@ BT_F=backtraces.txt SYSINFO_F=sysinfo.txt SYSSTATS_F=sysstats.txt -export ANALYSIS_F DESCRIPTION_F HALOG_F BT_F SYSINFO_F SYSSTATS_F +DLM_DUMP_F=dlm_dump.txt +export ANALYSIS_F DESCRIPTION_F HALOG_F BT_F SYSINFO_F SYSSTATS_F DLM_DUMP_F CRM_MON_F=crm_mon.txt MEMBERSHIP_F=members.txt HB_UUID_F=hb_uuid.txt @@ -979,7 +1004,8 @@ touch_DC_if_dc $DESTDIR/$WE sanitize $DESTDIR/$WE check_perms > $DESTDIR/$WE/$PERMISSIONS_F 2>&1 - sys_info > $DESTDIR/$WE/$SYSINFO_F + sys_info > $DESTDIR/$WE/$SYSINFO_F 2>&1 + dlm_dump > $DESTDIR/$WE/$DLM_DUMP_F 2>&1 sys_stats > $DESTDIR/$WE/$SYSSTATS_F 2>&1 for l in $EXTRA_LOGS; do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/hb_report/utillib.sh new/cluster-glue/hb_report/utillib.sh --- old/cluster-glue/hb_report/utillib.sh 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/hb_report/utillib.sh 2009-08-14 15:06:26.000000000 +0200 @@ -500,34 +500,48 @@ } warning "no lsb_release, no /etc/*-release, no /etc/debian_version: no distro information" } + pkg_ver() { + if which dpkg >/dev/null 2>&1 ; then + pkg_mgr="deb" + fi + if which rpm >/dev/null 2>&1 ; then + pkg_mgr="rpm" + fi + if which pkg_info >/dev/null 2>&1 ; then + pkg_mgr="pkg_info" + fi + if which pkginfo >/dev/null 2>&1 ; then + pkg_mgr="pkginfo" + fi + if [ -z "$pkg_mgr" ]; then + echo "Unknown package manager!" + return + fi + # for Linux .deb based systems - for pkg; do - which dpkg > /dev/null 2>&1 && { - dpkg-query -f '${Name} ${Version}' -W $pkg 2>/dev/null && break - [ $? -eq 0 ] && + for pkg ; do + case $pkg_mgr in + deb) + if dpkg-query -f '${Name} ${Version}' -W $pkg 2>/dev/null ; then debsums -s $pkg 2>/dev/null - break - } - # for Linux .rpm based systems - which rpm > /dev/null 2>&1 && { - rpm -q --qf '%{name} %{version}-%{release}' $pkg && - echo && - rpm --verify $pkg - break - } - # for OpenBSD - which pkg_info > /dev/null 2>&1 && { + fi + ;; + rpm) + if rpm -q --qf '%{name} %{version}-%{release} - %{distribution} %{arch}\n' $pkg ; then + rpm --verify $pkg + fi + ;; + pkg_info) pkg_info | grep $pkg - break - } - # for Solaris - which pkginfo > /dev/null 2>&1 && { + ;; + pkginfo) pkginfo | awk '{print $3}' # format? - } - # more packagers? + ;; + esac done } + crm_info() { $HA_BIN/crmd version 2>&1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lib/clplumbing/cl_random.c new/cluster-glue/lib/clplumbing/cl_random.c --- old/cluster-glue/lib/clplumbing/cl_random.c 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lib/clplumbing/cl_random.c 2009-08-14 15:06:26.000000000 +0200 @@ -196,9 +196,11 @@ if (fread(buf, 1, sizeof(buf), fs)!= sizeof(buf)){ cl_log(LOG_INFO, "%s: reading file %s failed" , __FUNCTION__, randdevname[idev]); + fclose(fs); }else{ + fclose(fs); return (unsigned int)cl_binary_to_int(buf, sizeof(buf)); - } + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lib/plugins/stonith/external/drac5.in new/cluster-glue/lib/plugins/stonith/external/drac5.in --- old/cluster-glue/lib/plugins/stonith/external/drac5.in 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lib/plugins/stonith/external/drac5.in 2009-08-14 15:06:26.000000000 +0200 @@ -18,7 +18,7 @@ #echo "started with: $@" | debug -. @HA_HBCONF_DIR@/shellfuncs +. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs trap 'if [ -n "$outf" ]; then cat "$outf" >&2; rmtempfile "$outf"; fi' 0 outf=`maketempfile` || exit 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lib/plugins/stonith/external/hmchttp.in new/cluster-glue/lib/plugins/stonith/external/hmchttp.in --- old/cluster-glue/lib/plugins/stonith/external/hmchttp.in 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lib/plugins/stonith/external/hmchttp.in 2009-08-14 15:06:26.000000000 +0200 @@ -23,7 +23,7 @@ # Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. # -. @HA_HBCONF_DIR@/shellfuncs +. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs #set -x hostlist=`echo $hostlist | tr ',' ' '` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lib/plugins/stonith/external/ibmrsa.in new/cluster-glue/lib/plugins/stonith/external/ibmrsa.in --- old/cluster-glue/lib/plugins/stonith/external/ibmrsa.in 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lib/plugins/stonith/external/ibmrsa.in 2009-08-14 15:06:26.000000000 +0200 @@ -27,7 +27,7 @@ #echo "started with: $@" | debug -. @HA_HBCONF_DIR@/shellfuncs +. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs trap 'if [ -n "$outf" ]; then cat "$outf" >&2; rmtempfile "$outf"; fi' 0 outf=`maketempfile` || exit 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lib/plugins/stonith/external/rackpdu new/cluster-glue/lib/plugins/stonith/external/rackpdu --- old/cluster-glue/lib/plugins/stonith/external/rackpdu 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lib/plugins/stonith/external/rackpdu 2009-08-14 15:06:26.000000000 +0200 @@ -28,7 +28,7 @@ # Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. # -. /etc/ha.d/shellfuncs +. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs SWITCH_ON="1" SWITCH_OFF="2" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lib/stonith/Makefile.am new/cluster-glue/lib/stonith/Makefile.am --- old/cluster-glue/lib/stonith/Makefile.am 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lib/stonith/Makefile.am 2009-08-14 15:06:26.000000000 +0200 @@ -26,10 +26,7 @@ ## include files ## binaries -sbin_PROGRAMS = stonith meatclient -if ON_LINUX -sbin_PROGRAMS += sbd -endif +sbin_PROGRAMS = stonith meatclient sbd stonith_SOURCES = main.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/logd/Makefile.am new/cluster-glue/logd/Makefile.am --- old/cluster-glue/logd/Makefile.am 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/logd/Makefile.am 2009-08-14 15:06:26.000000000 +0200 @@ -30,6 +30,8 @@ LIBRT = @LIBRT@ AM_CFLAGS = @CFLAGS@ +initddir = @INITDIR@ + ## binary progs ha_sbin_PROGRAMS = ha_logger halib_PROGRAMS = ha_logd logtest @@ -46,3 +48,6 @@ logtest_SOURCES = logtest.c logtest_LDADD = $(top_builddir)/lib/clplumbing/libplumb.la + +initd_SCRIPTS = logd + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/logd/ha_logd new/cluster-glue/logd/ha_logd --- old/cluster-glue/logd/ha_logd 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/logd/ha_logd 1970-01-01 01:00:00.000000000 +0100 @@ -1,113 +0,0 @@ -#! /bin/sh - -# ha_logd - temporary wrapper script for .libs/ha_logd -# Generated by ltmain.sh - GNU libtool 1.5.24 (1.1220.2.455 2007/06/24 02:13:29) -# -# The ha_logd program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='/usr/bin/sed -e 1s/^X//' -sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variable: - notinst_deplibs=' ../lib/clplumbing/libplumb.la ../lib/clplumbing/libplumbgpl.la /Users/beekhof/Development/heartbeat/glue-lrm/lib/pils/libpils.la' -else - # When we are sourced in execute mode, $file and $echo are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - echo="/bin/echo" - file="$0" - # Make sure echo works. - if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : - else - # Restart under the correct shell, and then maybe $echo will work. - exec /bin/sh "$0" --no-reexec ${1+"$@"} - fi - fi - - # Find the directory that this script lives in. - thisdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` - done - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program='ha_logd' - progdir="$thisdir/.libs" - - - if test -f "$progdir/$program"; then - # Add our own library path to DYLD_LIBRARY_PATH - DYLD_LIBRARY_PATH="/Users/beekhof/Development/heartbeat/glue-lrm/lib/clplumbing/.libs:/Users/beekhof/Development/heartbeat/glue-lrm/lib/pils/.libs:$DYLD_LIBRARY_PATH" - - # Some systems cannot cope with colon-terminated DYLD_LIBRARY_PATH - # The second colon is a workaround for a bug in BeOS R4 sed - DYLD_LIBRARY_PATH=`$echo "X$DYLD_LIBRARY_PATH" | $Xsed -e 's/::*$//'` - - export DYLD_LIBRARY_PATH - - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - - exec "$progdir/$program" ${1+"$@"} - - $echo "$0: cannot exec $program $*" - exit 1 - fi - else - # The program doesn't exist. - $echo "$0: error: \`$progdir/$program' does not exist" 1>&2 - $echo "This script is just a wrapper for $program." 1>&2 - /bin/echo "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/logd/ha_logd.c new/cluster-glue/logd/ha_logd.c --- old/cluster-glue/logd/ha_logd.c 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/logd/ha_logd.c 2009-08-14 15:06:26.000000000 +0200 @@ -36,10 +36,6 @@ #include <fcntl.h> #include <string.h> #include <stdarg.h> -#ifdef ENABLE_APPHB -# include <apphb.h> -static gboolean RegisteredWithApphbd = FALSE; -#endif #include <clplumbing/Gmain_timeout.h> #include <clplumbing/coredumps.h> #include <clplumbing/setproctitle.h> @@ -93,7 +89,6 @@ char logfile[MAXLINE]; char entity[MAXLINE]; int log_facility; - gboolean useapphbd; mode_t logmode; gboolean syslogfmtmsgs; } logd_config = @@ -112,7 +107,6 @@ static int set_logfile(const char* option); static int set_facility(const char * value); static int set_entity(const char * option); -static int set_useapphbd(const char* option); static int set_sendqlen(const char * option); static int set_recvqlen(const char * option); static int set_logmode(const char * option); @@ -130,7 +124,6 @@ {"logfile", set_logfile}, {"logfacility", set_facility}, {"entity", set_entity}, - {"useapphbd", set_useapphbd}, {"sendqlen", set_sendqlen}, {"recvqlen", set_recvqlen}, {"logmode", set_logmode}, @@ -214,28 +207,6 @@ } static int -set_useapphbd(const char* option) -{ - if (!option){ - cl_log(LOG_ERR,"set_useapphbd: option is NULL"); - return FALSE; - } - - cl_log(LOG_INFO, "setting useapphbd to %s", option); - if (0 == strcmp(option, "yes")){ - logd_config.useapphbd = TRUE; - return TRUE; - } else if (0 == strcmp(option, "no")){ - logd_config.useapphbd = FALSE; - return TRUE; - } else { - cl_log(LOG_INFO,"invalid useapphbd option"); - return FALSE; - } -} - - -static int set_sendqlen(const char * option) { int length; @@ -698,78 +669,6 @@ return ret; } -#define APPLOGDINSTANCE "logging daemon" - -static void -logd_init_register_with_apphbd(void) -{ -#ifdef ENABLE_APPHB - static int failcount = 0; - if (!logd_config.useapphbd || RegisteredWithApphbd) { - return; - } - - if (apphb_register(cmdname, APPLOGDINSTANCE) != 0) { - /* Log attempts once an hour or so... */ - if ((failcount % 60) == 0) { - cl_log(LOG_INFO, "Unable to register with apphbd." - "Continuing to try and register.\n"); - } - ++failcount; - return; - } - - RegisteredWithApphbd = TRUE; - cl_log(LOG_INFO, "Registered with apphbd as %s/%s.\n", - cmdname, APPLOGDINSTANCE); - - if (apphb_setinterval(logd_deadtime_ms) < 0 - || apphb_setwarn(logd_warntime_ms) < 0) { - cl_log(LOG_ERR, "Unable to setup with apphbd.\n"); - apphb_unregister(); - RegisteredWithApphbd = FALSE; - ++failcount; - }else{ - failcount = 0; - } -#endif -} - - -static gboolean -logd_reregister_with_apphbd(gpointer dummy) -{ - if (logd_config.useapphbd) { - logd_init_register_with_apphbd(); - } - return logd_config.useapphbd; -} - - -static gboolean -logd_apphb_hb(gpointer dummy) -{ -#ifdef ENABLE_APPHB - if (logd_config.useapphbd) { - if (RegisteredWithApphbd) { - if (apphb_hb() < 0) { - /* apphb_hb() will fail if apphbd exits */ - cl_log(LOG_ERR, "apphb_hb() failed.\n"); - apphb_unregister(); - RegisteredWithApphbd = FALSE; - } - } - /* - * Our timeout job (hb_reregister_with_apphbd) will - * reregister us if we become unregistered somehow... - */ - } -#endif - return TRUE; - -} - - static gboolean logd_term_action(int sig, gpointer userdata) { @@ -857,18 +756,6 @@ G_main_add_IPC_Channel(G_PRIORITY_DEFAULT, chan, FALSE,NULL,NULL,NULL); - if (logd_config.useapphbd) { - logd_reregister_with_apphbd(NULL); - Gmain_timeout_add_full(G_PRIORITY_LOW, - 60* 1000, - logd_reregister_with_apphbd, - NULL, NULL); - Gmain_timeout_add_full(G_PRIORITY_LOW, - logd_keepalive_ms, - logd_apphb_hb, - NULL, NULL); - } - g_main_run(mainloop); return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/logd/ha_logger new/cluster-glue/logd/ha_logger --- old/cluster-glue/logd/ha_logger 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/logd/ha_logger 1970-01-01 01:00:00.000000000 +0100 @@ -1,113 +0,0 @@ -#! /bin/sh - -# ha_logger - temporary wrapper script for .libs/ha_logger -# Generated by ltmain.sh - GNU libtool 1.5.24 (1.1220.2.455 2007/06/24 02:13:29) -# -# The ha_logger program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='/usr/bin/sed -e 1s/^X//' -sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command="" - -# This environment variable determines our operation mode. -if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then - # install mode needs the following variable: - notinst_deplibs=' ../lib/clplumbing/libplumb.la /Users/beekhof/Development/heartbeat/glue-lrm/lib/pils/libpils.la' -else - # When we are sourced in execute mode, $file and $echo are already set. - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - echo="/bin/echo" - file="$0" - # Make sure echo works. - if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : - else - # Restart under the correct shell, and then maybe $echo will work. - exec /bin/sh "$0" --no-reexec ${1+"$@"} - fi - fi - - # Find the directory that this script lives in. - thisdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "x$thisdir" = "x$file" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` - while test -n "$file"; do - destdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - - # If there was a directory component, then change thisdir. - if test "x$destdir" != "x$file"; then - case "$destdir" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; - *) thisdir="$thisdir/$destdir" ;; - esac - fi - - file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` - done - - # Try to get the absolute directory name. - absdir=`cd "$thisdir" && pwd` - test -n "$absdir" && thisdir="$absdir" - - program='ha_logger' - progdir="$thisdir/.libs" - - - if test -f "$progdir/$program"; then - # Add our own library path to DYLD_LIBRARY_PATH - DYLD_LIBRARY_PATH="/Users/beekhof/Development/heartbeat/glue-lrm/lib/clplumbing/.libs:/Users/beekhof/Development/heartbeat/glue-lrm/lib/pils/.libs:$DYLD_LIBRARY_PATH" - - # Some systems cannot cope with colon-terminated DYLD_LIBRARY_PATH - # The second colon is a workaround for a bug in BeOS R4 sed - DYLD_LIBRARY_PATH=`$echo "X$DYLD_LIBRARY_PATH" | $Xsed -e 's/::*$//'` - - export DYLD_LIBRARY_PATH - - if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - - exec "$progdir/$program" ${1+"$@"} - - $echo "$0: cannot exec $program $*" - exit 1 - fi - else - # The program doesn't exist. - $echo "$0: error: \`$progdir/$program' does not exist" 1>&2 - $echo "This script is just a wrapper for $program." 1>&2 - /bin/echo "See the libtool documentation for more information." 1>&2 - exit 1 - fi -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/logd/logd.cf new/cluster-glue/logd/logd.cf --- old/cluster-glue/logd/logd.cf 1970-01-01 01:00:00.000000000 +0100 +++ new/cluster-glue/logd/logd.cf 2009-08-14 15:06:26.000000000 +0200 @@ -0,0 +1,44 @@ +# File to write debug messages to +# Default: /var/log/ha-debug +#debugfile /var/log/ha-debug + +# +# +# File to write other messages to +# Default: /var/log/ha-log +#logfile /var/log/ha-log + +# +# +# Facility to use for syslog()/logger +# Default: daemon +#logfacility daemon + + +# Entity to be shown at beginning of a message +# for logging daemon +# Default: "logd" +#entity logd + + +# Do we register to apphbd +# Default: no +#useapphbd no + +# There are two processes running for logging daemon +# 1. parent process which reads messages from all client channels +# and writes them to the child process +# +# 2. the child process which reads messages from the parent process through IPC +# and writes them to syslog/disk + + +# set the send queue length from the parent process to the child process +# +#sendqlen 256 + +# set the recv queue length in child process +# +#recvqlen 256 + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/logd/logd.in new/cluster-glue/logd/logd.in --- old/cluster-glue/logd/logd.in 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/logd/logd.in 2009-08-14 15:06:26.000000000 +0200 @@ -26,210 +26,75 @@ # # Short-Description: ha_logd logging daemon # Provides: ha_logd -# Required-Start: $network $syslog -# Required-Stop: $network $syslog +# Required-Start: $network $syslog $remote_fs +# Required-Stop: $network $syslog $remote_fs # X-Start-Before: heartbeat openais # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO -[ -f @INITDEFDIR@/heartbeat ] && . @INITDEFDIR@/heartbeat - -: ${USE_LOGD=yes} +LOGD_CFG=@sysconfdir@/logd.cf LOGD_OPT="" -[ -n "$LOGD_CFG" ] && LOGD_OPT="$LOGD_OPT -c $LOGD_CFG" - -HA_DIR=@sysconfdir@/ha.d; export HA_DIR -. $HA_DIR/shellfuncs - -LOCKDIR=@localstatedir@/lock/subsys -RUNDIR=@localstatedir@/run - - -# Echo without putting a newline on the end -EchoNoNl() { - Echo @ECHO_N@ "$@@ECHO_C@" -} - -# Echo with escapes enabled... -EchoEsc() { - Echo @ECHO_E@ "$@" -} - -echo_failure() { - EchoEsc " ha_logd failure [rc=$1]. $rc_failed" - return $1 -} - -echo_success() { - : Cool! It started! - EchoEsc "$rc_done" -} +[ -f "$LOGD_CFG" ] && LOGD_OPT="-c $LOGD_CFG" +LOGD_BIN="@libdir@/@HB_PKG@/ha_logd" -if - [ -r /etc/SuSE-release ] -then - # rc.status is new since SuSE 7.0 - [ -r /etc/rc.status ] && . /etc/rc.status - [ -r /etc/rc.config ] && . /etc/rc.config - - # Determine the base and follow a runlevel link name. - base=${0##*/} - link=${base#*[SK][0-9][0-9]} - -fi -if - [ -z "$rc_done" ] -then - rc_done="Done." - rc_failed="Failed." - rc_skipped="Skipped." -fi - - -# exec 2>>/var/log/ha-debug - -# This should probably be it's own autoconf parameter -# because RH has moved it from time to time... -# and I suspect Conectiva and Mandrake also supply it. - -DISTFUNCS=/etc/rc.d/init.d/functions -SUBSYS=ha_logd - -[ -x $HA_BIN/ha_logd ] || exit 0 - -# -# Some environments like it if we use their functions... -# -if - [ ! -x $DISTFUNCS ] -then - # Provide our own versions of these functions - status() { - $HA_BIN/ha_logd -s - } - echo_failure() { - EchoEsc " ha_logd failure [rc=$1]. $rc_failed" - return $1 - } - echo_success() { - : Cool! It started! - EchoEsc "$rc_done" - } -else - . $DISTFUNCS -fi - -# -# See if they've configured things yet... -# -if - [ ! -f $LOGD_CFG ] -then - EchoNoNl "ha_logd not configured: $LOGD_CFG not found." - echo_failure 1 - exit 0 +if [ ! -f $LOGD_BIN ]; then + echo -n "ha_logd not installed." + exit 5 fi StartLogd() { - if [ "$USE_LOGD" != "yes" ]; then - return 0 - fi - - EchoNoNl "Starting ha_logd: " - - $HA_BIN/ha_logd -s >/dev/null 2>&1 - - if - [ $? -eq 0 ] - then - Echo "logd is already running" + echo -n "Starting ha_logd: " + $LOGD_BIN -s >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "logd is already running" return 0 fi - - $HA_BIN/ha_logd -d $LOGD_OPT >/dev/null 2>&1 - if - [ $? -ne 0 ] - then - Echo "starting logd failed" + $LOGD_BIN -d $LOGD_OPT >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "starting logd failed" + exit 1 fi - + echo "ok" + exit 0 } StopLogd() { - if [ "$USE_LOGD" != "yes" ]; then - return 0 - fi - - EchoNoNl "Stopping ha_logd: " + echo -n "Stopping ha_logd: " - $HA_BIN/ha_logd -s >/dev/null 2>&1 - - if - [ $? -ne 0 ] - then - Echo "logd is already stopped" + $LOGD_BIN -s >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "logd is already stopped" return 0 fi - $HA_BIN/ha_logd -k >/dev/null 2>&1 - if - [ $? -ne 0 ] - then - Echo "stopping logd failed" - fi + $LOGD_BIN -k >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "stopping logd failed" + exit 1 + fi + echo "stopped" + exit 0 } StatusLogd() { - $HA_BIN/ha_logd -s + $LOGD_BIN -s + exit $? } -RC=0 -# See how we were called. - case "$1" in - start) - StartLogd - RC=$? - Echo - if - [ $RC -eq 0 ] - then - [ ! -d $LOCKDIR ] && mkdir -p $LOCKDIR - touch $LOCKDIR/$SUBSYS - fi - ;; - - status) - StatusLogd - RC=$?;; - - stop) - StopLogd - RC=$? - Echo - if - [ $RC -eq 0 ] - then - rm -f $LOCKDIR/$SUBSYS - fi - ;; - + start) StartLogd ;; + status) StatusLogd ;; + stop) StopLogd ;; restart) sleeptime=1 - StopLogd - sleep $sleeptime - echo_success - Echo - StartLogd - Echo + $0 stop && sleep $sleeptime && $0 start + echo ;; *) - Echo "Usage: $0 {start|stop|status|restart}" + echo "Usage: $0 {start|stop|status|restart}" exit 1 esac -exit $RC - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lrm/admin/lrmadmin.c new/cluster-glue/lrm/admin/lrmadmin.c --- old/cluster-glue/lrm/admin/lrmadmin.c 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lrm/admin/lrmadmin.c 2009-08-14 15:06:26.000000000 +0200 @@ -47,12 +47,12 @@ #include <clplumbing/GSource.h> #include <clplumbing/Gmain_timeout.h> -static const char *optstring = "A:D:X:dE:F:dg:p:M:O:P:c:S:LI:CT:n:h"; +static const char *optstring = "A:D:X:dEF:dg:p:M:O:P:c:S:LI:CT:n:h"; #ifdef HAVE_GETOPT_H static struct option long_options[] = { {"daemon", 0, NULL, 'd'}, - {"executera", 1, NULL, 'E'}, + {"executera", 0, NULL, 'E'}, {"flush", 1, NULL, 'F'}, {"state", 1, NULL, 'S'}, {"listall", 0, NULL, 'L'}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/lrm/test/regression.sh.in new/cluster-glue/lrm/test/regression.sh.in --- old/cluster-glue/lrm/test/regression.sh.in 2009-07-29 12:08:16.000000000 +0200 +++ new/cluster-glue/lrm/test/regression.sh.in 2009-08-14 15:06:26.000000000 +0200 @@ -93,7 +93,7 @@ export HA_logfile HA_debugfile HA_use_logd HA_logfacility mkdir -p $OUTDIR -. @sysconfdir@/ha.d/shellfuncs +. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs args=`getopt hq $*` [ $? -ne 0 ] && usage ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de