Mailinglist Archive: opensuse-commit (817 mails)

< Previous Next >
commit heartbeat for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 04 Dec 2008 12:45:56 +0100
  • Message-id: <20081204114557.09E506780AA@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package heartbeat for openSUSE:Factory
checked in at Thu Dec 4 12:45:56 CET 2008.


--------
--- heartbeat/heartbeat.changes 2008-11-21 13:15:33.000000000 +0100
+++ /mounts/work_src_done/STABLE/heartbeat/heartbeat.changes 2008-12-03
17:48:52.000000000 +0100
@@ -1,0 +2,12 @@
+Wed Dec 3 17:45:00 CET 2008 - lmb@xxxxxxx
+
+- Add heartbeat-resources dependency to heartbeat-common, and libdlm
+ dependency to heartbeat-resources, to ensure that the installed system
+ is ready for use (bnc#449998).
+- hb_report: rearrange the log search procedure.
+- hb_report: fix openais HA_LOGLEVEL setting.
+- RA: VirtualDomain: new OCF RA (manage virtual domains using
+ libvirt/virsh).
+- RA: MailTo: check if MAILCMD is set early.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ heartbeat.spec ++++++
--- /var/tmp/diff_new_pack.k32741/_old 2008-12-04 12:45:03.000000000 +0100
+++ /var/tmp/diff_new_pack.k32741/_new 2008-12-04 12:45:03.000000000 +0100
@@ -37,7 +37,7 @@
Name: heartbeat
Summary: The Heartbeat Subsystem for High-Availability Linux
Version: 2.99.3
-Release: 1
+Release: 2
License: GPL v2 or later; LGPL v2.1 or later
Url: http://linux-ha.org/
Group: Productivity/Clustering/HA
@@ -155,6 +155,7 @@
License: GPL v2 or later; LGPL v2.1 or later
Summary: OCF Compliant Cluster Resource Scripts
Group: Productivity/Clustering/HA
+Requires: libdlm

%description resources
OCF resource agents suitable for use with the Pacemaker cluster
@@ -178,6 +179,7 @@
Summary: Common heartbeat components
Group: Productivity/Clustering/HA
Obsoletes: %{name} < 2.99
+Requires: heartbeat-resources

%description common
Clustering components provided by the Heartbeat project that are
@@ -791,6 +793,15 @@
%config(noreplace) %{_sysconfdir}/logrotate.d/ldirectord

%changelog
+* Wed Dec 03 2008 lmb@xxxxxxx
+- Add heartbeat-resources dependency to heartbeat-common, and libdlm
+ dependency to heartbeat-resources, to ensure that the installed system
+ is ready for use (bnc#449998).
+- hb_report: rearrange the log search procedure.
+- hb_report: fix openais HA_LOGLEVEL setting.
+- RA: VirtualDomain: new OCF RA (manage virtual domains using
+ libvirt/virsh).
+- RA: MailTo: check if MAILCMD is set early.
* Fri Nov 21 2008 lmb@xxxxxxx
- hb_report: many fixes and improvements.
- stonith: kdumpcheck: improve parsing for kdump_check_user.

++++++ heartbeat.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/configure.in new/heartbeat/configure.in
--- old/heartbeat/configure.in 2008-11-19 19:34:26.000000000 +0100
+++ new/heartbeat/configure.in 2008-12-03 17:44:17.000000000 +0100
@@ -39,7 +39,7 @@
)

if test -z "$HAPKGVERSION" ; then
- HAPKGVERSION="2.99.2"
+ HAPKGVERSION="2.99.3"
fi
AM_INIT_AUTOMAKE(heartbeat, $HAPKGVERSION)

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/debian/heartbeat.install
new/heartbeat/debian/heartbeat.install
--- old/heartbeat/debian/heartbeat.install 2008-11-19 19:34:26.000000000
+0100
+++ new/heartbeat/debian/heartbeat.install 2008-12-03 17:44:17.000000000
+0100
@@ -34,6 +34,7 @@
usr/lib/ocf/resource.d/heartbeat/Stateful
usr/lib/ocf/resource.d/heartbeat/SysInfo
usr/lib/ocf/resource.d/heartbeat/VIPArip
+usr/lib/ocf/resource.d/heartbeat/VirtualDomain
usr/lib/ocf/resource.d/heartbeat/WAS
usr/lib/ocf/resource.d/heartbeat/WAS6
usr/lib/ocf/resource.d/heartbeat/WinPopup
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/heartbeat/shellfuncs.in
new/heartbeat/heartbeat/shellfuncs.in
--- old/heartbeat/heartbeat/shellfuncs.in 2008-11-19 19:34:26.000000000
+0100
+++ new/heartbeat/heartbeat/shellfuncs.in 2008-12-03 17:44:17.000000000
+0100
@@ -20,7 +20,11 @@
: ${HA_DEBUGLOG:=/dev/null}
: ${HA_RESOURCEDIR:=$HA_DIR/resource.d}
: ${HA_DOCDIR:=@datadir@/doc/heartbeat}
+if echo "$0" | grep / >/dev/null 2>&1; then
: ${__SCRIPT_NAME:=`basename $0`}
+else
+: ${__SCRIPT_NAME:="$0"}
+fi
: ${HA_LOGTAG:=$__SCRIPT_NAME[$$]}
: ${HA_VARRUN:=@localstatedir@/run/}
: ${HA_VARLOCK:=@localstatedir@/lock/subsys/}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/heartbeat.spec new/heartbeat/heartbeat.spec
--- old/heartbeat/heartbeat.spec 2008-11-19 19:34:26.000000000 +0100
+++ new/heartbeat/heartbeat.spec 2008-12-03 17:44:17.000000000 +0100
@@ -1,206 +1,296 @@
#
-# spec file for package heartbeat (Version 2.0.9)
+# spec file for package heartbeat (Version 2.99.2)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
+# Copyright (c) 2008 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/
#

# norootforbuild

+%define build_cmpi 0
%define with_extra_warnings 0
%define with_debugging 0
%define without_fatal_warnings 1
%define start_at_boot 0
%define stop_start_script 0
-
-%define pkg_group Productivity/Clustering/HA
-
-%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
-%define pkg_group System Environment/Daemons
-%endif
-
+%define SSLeay perl-Net-SSLeay
%define gname haclient
%define uname hacluster
%define uid 90
%define nogroup nobody
-
-%define SSLeay perl-Net-SSLeay
+%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
+%define pkg_group System Environment/Daemons
+%else
+%define pkg_group Productivity/Clustering/HA
+%endif

Name: heartbeat
Summary: The Heartbeat Subsystem for High-Availability Linux
-Version: 2.99.2
-Release: 1
-License: GPL/LGPL
-URL: http://www.linux-ha.org/v2
-Group: %{pkg_group}
+Version: 2.99.3
+Release: 2
+License: GPL v2 or later; LGPL v2.1 or later
+Url: http://linux-ha.org/
+Group: Productivity/Clustering/HA
Source: heartbeat.tar.gz
-%if 0%{?suse_version}
Source1: heartbeat.suse.in
-Patch1: heartbeat-doc-directory.diff
-%endif
-
-BuildRoot: %{_tmppath}/%{name}-build
+Source2: ldirectord.suse.in
+Source100: heartbeat.rpmlintrc
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{name}-common = %{version}-%{release}
Requires: %{name}-resources = %{version}-%{release}
-
-Autoreqprov: on
-
+Requires: /bin/ping perl-TimeDate
+BuildRequires: curl-devel e2fsprogs-devel glib2-devel iputils libxml2-devel
lynx python
+AutoReqProv: on
%if 0%{?fedora_version}
Requires(post): /sbin/chkconfig
Requires(preun):/sbin/chkconfig
%endif
-
-Requires: /bin/ping perl-TimeDate
-
%if 0%{?suse_version}
-Requires: python-xml python-gtk
-BuildRequires: python-xml gdbm-devel bison flex libnet
-PreReq: %insserv_prereq %fillup_prereq
+BuildRequires: OpenIPMI-devel bison flex gdbm-devel libnet
+PreReq: %insserv_prereq %fillup_prereq
Requires(pre): /usr/sbin/groupadd /usr/bin/getent /usr/sbin/useradd
+Requires: logrotate
%define nogroup nogroup
%define SSLeay perl-Net_SSLeay
-
+%if 0%{?suse_version} >= 1100
+BuildRequires: fdupes
+%endif
%if 0%{?suse_version} == 930
-BuildRequires: rpm-devel
+BuildRequires: rpm-devel
%endif
-
%if 0%{?suse_version} == 1000
-BuildRequires: lzo lzo-devel
+BuildRequires: lzo lzo-devel
%endif
-
%if 0%{?suse_version} > 1000
Suggests: pacemaker
%endif
-
%if 0%{?suse_version} < 1020
-BuildRequires: tcpd-devel
+BuildRequires: tcpd-devel
%endif
-
%if 0%{?sles_version} == 9
-BuildRequires: pkgconfig
+BuildRequires: pkgconfig
%endif
-
%endif
-
%if 0%{?rhel_version} == 406
-BuildRequires: gcc-c++
+BuildRequires: gcc-c++
%endif
-
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
-Requires: which
-BuildRequires: which
+Requires: which
+BuildRequires: which
#Requires: pygtk2 >= 2.4
%define uid 24
-
%if 0%{?fedora_version}
Requires(pre): fedora-usermgmt
Requires(postun): fedora-usermgmt
-BuildRequires: libnet-devel
+BuildRequires: libnet-devel
%else
-BuildRequires: libnet
+BuildRequires: libnet
%endif
-
%if 0%{?fedora_version} > 7
-BuildRequires: openssl-devel
+BuildRequires: openssl-devel
%endif
-
%endif
-
%if 0%{?mandriva_version}
-BuildRequires: libbzip2-devel
-
+BuildRequires: libbzip2-devel
%if 0%{?mandriva_version} > 2006
-BuildRequires: libnet1.1.0-devel
+BuildRequires: libnet1.1.0-devel
%else
-BuildRequires: libnet
+BuildRequires: libnet
%endif
-
%else
# Hack to avoid needing to install a kernel on Mandriva just to build pacemaker
Requires: iptables
%endif
+#!BuildIgnore: -iptables
+%if %build_cmpi
+BuildRequires: openwbem-devel
+%endif

+%description
+heartbeat is a sophisticated multinode resource manager for High
+Availability clusters.

-BuildRequires: curl-devel e2fsprogs-devel glib2-devel gnutls-devel iputils
libxml2-devel lynx net-snmp-devel pam-devel python-devel swig
+It can failover arbitrary resources, ranging from IP addresses over NFS
+to databases that are tied in via resource scripts. The resources can
+have arbitrary dependencies for ordering or placement between them.

-%description
-Heartbeat is a basic high-availability subsystem for Linux-HA.
+heartbeat contains a cluster membership layer, fencing, and local and
+clusterwide resource management functionality.

-It supports "n-node" clusters and contains a cluster membership layer,
-fencing, and local resource management functionality.
+1.2/1.0 based 2-node only configurations are supported in a legacy
+mode.

-Heartbeat implements the following kinds of heartbeats:
- - Serial ports
- - UDP/IP multicast (ethernet, etc)
- - UDP/IP broadcast (ethernet, etc)
- - UDP/IP heartbeats
- - "ping" heartbeats (for routers, switches, etc.)
- (to be used for breaking ties in 2-node systems)
+heartbeat implements the following kinds of heartbeats:

-In legacy mode, Heartbeat also includes a primitive 2-node cluster resource
manager.
+- Serial ports

-For larger or more advanced clusters, the Pacemaker cluster resource manager
-(formerly part of Heartbeat) is available.
+- UDP/IPv4 broadcast, multi-cast, and unicast

-Pacemaker supports "n-node" clusters with significant capabilities for
-monitoring and managing resources and dependencies.
+- IPv4 "ping" pseudo-cluster members.


-%if 0%{?suse_version}
-%debug_package
-%endif
+
+Authors:
+--------
+ Alan Robertson <alanr@xxxxxxx>
+ Andrew Beekhof <abeekhof@xxxxxxx>
+ Guochun Shi <gshi@xxxxxxxxxxxxx>
+ Horms <horms@xxxxxxxxxxxxx>
+ Huang Zhen <zhenhltc@xxxxxxxxxx>
+ Lars Marowsky-Bree <lmb@xxxxxxx>
+ Sun Jiang Dong <hasjd@xxxxxxxxxx>
+ (See doc/AUTHORS)

%package resources
+License: GPL v2 or later; LGPL v2.1 or later
Summary: OCF Compliant Cluster Resource Scripts
-Group: %{pkg_group}
+Group: Productivity/Clustering/HA

%description resources
-OCF resource agents suitable for use with the Pacemaker cluster resource
manager
+OCF resource agents suitable for use with the Pacemaker cluster
+resource manager
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr@xxxxxxx>
+ Andrew Beekhof <abeekhof@xxxxxxx>
+ Guochun Shi <gshi@xxxxxxxxxxxxx>
+ Horms <horms@xxxxxxxxxxxxx>
+ Huang Zhen <zhenhltc@xxxxxxxxxx>
+ Lars Marowsky-Bree <lmb@xxxxxxx>
+ Sun Jiang Dong <hasjd@xxxxxxxxxx>
+ (See doc/AUTHORS)

%package common
+License: GPL v2 or later; LGPL v2.1 or later
Summary: Common heartbeat components
-Group: %{pkg_group}
-
-# We need these when upgading from the old package structure
-Obsoletes: %{name} < %{version}-%{release}
-Obsoletes: %{name}-pils < %{version}-%{release}
-Obsoletes: %{name}-stonith < %{version}-%{release}
-
-Provides: %{name}-pils = %{version}-%{release}
-Provides: %{name}-stonith = %{version}-%{release}
-Provides: heartbeat:%{_libdir}/libapphb.so.*
-Provides: heartbeat:%{_libdir}/liblrm.so.*
-Provides: heartbeat:%{_libdir}/libplumb.so.*
-Provides: heartbeat:%{_libdir}/libplumbgpl.so.*
-Provides: heartbeat:%{_libdir}/libstonith.so.*
-Provides: heartbeat:%{_sbindir}/ha_logger
-Provides: heartbeat:%{_sbindir}/ocf-tester
+Group: Productivity/Clustering/HA
+Obsoletes: %{name} < 2.99

%description common
-Clustering components provided by the Heartbeat project that are generally
useful
-regardless of which cluster stack is being used.
+Clustering components provided by the Heartbeat project that are
+generally useful regardless of which cluster stack is being used.

-Include a local (non-cluster-aware) resource manager, a basic
(non-cluster-aware)
-STONITH framework and some useful libraries for asyncronous, non-blocking IPC
and
-using gmainloop().
-
-%package common-devel
-Summary: Developmental files for common heartbeat components
-Group: %{pkg_group}
-
-%description common-devel
-Header files and shared libraries needed for developing programs based on the
-common clustering components provided by the Heartbeat project.
+Include a local (non-cluster-aware) resource manager, a basic
+(non-cluster-aware) STONITH framework and some useful libraries for
+asyncronous, non-blocking IPC and using gmainloop().
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr@xxxxxxx>
+ Andrew Beekhof <abeekhof@xxxxxxx>
+ Guochun Shi <gshi@xxxxxxxxxxxxx>
+ Horms <horms@xxxxxxxxxxxxx>
+ Huang Zhen <zhenhltc@xxxxxxxxxx>
+ Lars Marowsky-Bree <lmb@xxxxxxx>
+ Sun Jiang Dong <hasjd@xxxxxxxxxx>
+ (See doc/AUTHORS)
+
+%package -n libheartbeat2
+License: GPL v2 or later; LGPL v2.1 or later
+Summary: The Heartbeat Subsystem for High-Availability Linux
+Group: Productivity/Clustering/HA
+Obsoletes: %{name}-pils < 2.99
+Obsoletes: %{name}-stonith < 2.99
+
+%description -n libheartbeat2
+heartbeat is a sophisticated multinode resource manager for High
+Availability clusters.
+
+It can failover arbitrary resources, ranging from IP addresses over NFS
+to databases that are tied in via resource scripts. The resources can
+have arbitrary dependencies for ordering or placement between them.
+
+heartbeat contains a cluster membership layer, fencing, and local and
+clusterwide resource management functionality.
+
+1.2/1.0 based 2-node only configurations are supported in a legacy
+mode.
+
+heartbeat implements the following kinds of heartbeats:
+
+- Serial ports
+
+- UDP/IPv4 broadcast, multi-cast, and unicast
+
+- IPv4 "ping" pseudo-cluster members.
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr@xxxxxxx>
+ Andrew Beekhof <abeekhof@xxxxxxx>
+ Guochun Shi <gshi@xxxxxxxxxxxxx>
+ Horms <horms@xxxxxxxxxxxxx>
+ Huang Zhen <zhenhltc@xxxxxxxxxx>
+ Lars Marowsky-Bree <lmb@xxxxxxx>
+ Sun Jiang Dong <hasjd@xxxxxxxxxx>
+ (See doc/AUTHORS)
+
+%package -n libheartbeat-devel
+License: GPL v2 or later; LGPL v2.1 or later
+Summary: The Heartbeat Subsystem for High-Availability Linux
+Group: Productivity/Clustering/HA
+Requires: libheartbeat2 = %{version}-%{release}
+
+%description -n libheartbeat-devel
+heartbeat is a sophisticated multinode resource manager for High
+Availability clusters.
+
+It can failover arbitrary resources, ranging from IP addresses over NFS
+to databases that are tied in via resource scripts. The resources can
+have arbitrary dependencies for ordering or placement between them.
+
+heartbeat contains a cluster membership layer, fencing, and local and
+clusterwide resource management functionality.
+
+1.2/1.0 based 2-node only configurations are supported in a legacy
+mode.
+
+heartbeat implements the following kinds of heartbeats:
+
+- Serial ports
+
+- UDP/IPv4 broadcast, multi-cast, and unicast
+
+- IPv4 "ping" pseudo-cluster members.
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr@xxxxxxx>
+ Andrew Beekhof <abeekhof@xxxxxxx>
+ Guochun Shi <gshi@xxxxxxxxxxxxx>
+ Horms <horms@xxxxxxxxxxxxx>
+ Huang Zhen <zhenhltc@xxxxxxxxxx>
+ Lars Marowsky-Bree <lmb@xxxxxxx>
+ Sun Jiang Dong <hasjd@xxxxxxxxxx>
+ (See doc/AUTHORS)

%package ldirectord
+License: GPL v2 or later
Summary: A Monitoring Daemon for Maintaining High Availability Resources
-Group: %{pkg_group}
+Group: Productivity/Clustering/HA
Requires: %{SSLeay} perl-libwww-perl ipvsadm
-Obsoletes: heartbeat-ldirectd
-
+%if 0%{?suse_version}
+Requires: logrotate
+%endif
%if 0%{?fedora_version}
Requires(post): /sbin/chkconfig
Requires(preun):/sbin/chkconfig
@@ -217,32 +307,93 @@

See 'ldirectord -h' and linux-ha/doc/ldirectord for more information.

+
+
+Authors:
+--------
+ Jacob Rief <jacob.rief@xxxxxxxxxxxx>
+
+%if %build_cmpi
+
+%package cmpi
+License: GPL v2 or later; LGPL v2.1 or later
+Summary: Heartbeat CIM Provider
+Group: Productivity/Clustering/HA
+
+%description cmpi
+This package provides the CIM provider for managing heartbeat via
+OpenWBEM.
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr@xxxxxxx>
+ Andrew Beekhof <abeekhof@xxxxxxx>
+ Guochun Shi <gshi@xxxxxxxxxxxxx>
+ Horms <horms@xxxxxxxxxxxxx>
+ Huang Zhen <zhenhltc@xxxxxxxxxx>
+ Lars Marowsky-Bree <lmb@xxxxxxx>
+ Sun Jiang Dong <hasjd@xxxxxxxxxx>
+ (See doc/AUTHORS)
+
+%endif
+
%package devel
-Summary: Heartbeat development package
-Group: %{pkg_group}
+License: GPL v2 or later; LGPL v2.1 or later
+Summary: The Heartbeat Subsystem for High-Availability Linux
+Group: Productivity/Clustering/HA
Requires: %{name} = %{version}-%{release}
+Requires: libheartbeat-devel = %{version}-%{release}

%description devel
-Header files and shared libraries needed for developing programs based on the
-full Heartbeat cluster stack.
+heartbeat is a sophisticated multinode resource manager for High
+Availability clusters.
+
+It can failover arbitrary resources, ranging from IP addresses over NFS
+to databases that are tied in via resource scripts. The resources can
+have arbitrary dependencies for ordering or placement between them.
+
+heartbeat contains a cluster membership layer, fencing, and local and
+clusterwide resource management functionality.
+
+1.2/1.0 based 2-node only configurations are supported in a legacy
+mode.
+
+heartbeat implements the following kinds of heartbeats:
+
+- Serial ports
+
+- UDP/IPv4 broadcast, multi-cast, and unicast
+
+- IPv4 "ping" pseudo-cluster members.
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr@xxxxxxx>
+ Andrew Beekhof <abeekhof@xxxxxxx>
+ Guochun Shi <gshi@xxxxxxxxxxxxx>
+ Horms <horms@xxxxxxxxxxxxx>
+ Huang Zhen <zhenhltc@xxxxxxxxxx>
+ Lars Marowsky-Bree <lmb@xxxxxxx>
+ Sun Jiang Dong <hasjd@xxxxxxxxxx>
+ (See doc/AUTHORS)

%prep
###########################################################
%setup -n heartbeat
%if 0%{?suse_version}
-%patch1 -p0
-%patch2 -p0
cp $RPM_SOURCE_DIR/heartbeat.suse.in ./heartbeat/init.d/heartbeat.in
+cp $RPM_SOURCE_DIR/ldirectord.suse.in ./ldirectord/init.d/ldirectord.in
%endif
%{?suse_update_config:%{suse_update_config -f}}
-
###########################################################

%build
# TODO: revisit -all
-
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
-
# Feature-dependent CFLAGS:
%if %with_extra_warnings
# CFLAGS="${CFLAGS} -Wshadow -Wfloat-equal -Waggregate-return -Wnested-externs
-Wunreachable-code -Wendif-labels -Winline"
@@ -251,26 +402,20 @@
%if %with_debugging
CFLAGS="${CFLAGS} -O0"
%endif
-
# Distribution specific settings:
%if 0%{?suse_version} > 1001
CFLAGS="${CFLAGS} -fstack-protector-all"
%endif
-
%if 0%{?suse_version} < 1001
export
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gnome/%{_lib}/pkgconfig:/opt/gnome/share/pkgconfig"
%endif
-
%if 0%{?suse_version} > 1020
CFLAGS="$CFLAGS -fgnu89-inline"
%endif
-
%if 0%{?fedora_version} > 6
CFLAGS="$CFLAGS -fgnu89-inline"
%endif
-
export CFLAGS
-
./ConfigureMe configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
--localstatedir=%{_var} --infodir=%{_infodir} \
--mandir=%{_mandir} --libdir=%{_libdir} \
@@ -278,44 +423,50 @@
--with-group-name=%{gname} --with-ccmuser-name=%{uname} \
--with-group-id=%{uid} --with-ccmuser-id=%{uid} \
--with-hapkgversion=%{version} \
+ --enable-libc-malloc \
--enable-pretty \
%if %without_fatal_warnings
--enable-fatal-warnings=no \
%endif
+%if %build_cmpi
+ --enable-cim-provider \
+ --with-cimom=openwbem \
+ --with-cmpi-headers=%{_includedir}/openwbem \
+ --with-provider-dir=/usr/%{_lib}/openwbem/cmpiproviders \
+%endif
--disable-crm
-
export MAKE="make %{?jobs:-j%jobs}"
make %{?jobs:-j%jobs}
-# make
###########################################################

%install
###########################################################
#make DESTDIR=$RPM_BUILD_ROOT install-strip
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
(
cd $RPM_BUILD_ROOT/etc/ha.d/resource.d
ln -s %{_sbindir}/ldirectord ldirectord
)
-
test -d $RPM_BUILD_ROOT/sbin || mkdir $RPM_BUILD_ROOT/sbin
(
cd $RPM_BUILD_ROOT/sbin
ln -s /etc/init.d/heartbeat rcheartbeat
ln -sf /etc/init.d/ldirectord rcldirectord
)
-
# Cleanup
[ -d $RPM_BUILD_ROOT/usr/man ] && rm -rf $RPM_BUILD_ROOT/usr/man
[ -d $RPM_BUILD_ROOT/usr/share/libtool ] && rm -rf
$RPM_BUILD_ROOT/usr/share/libtool
find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f
-
chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs
chmod -x $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs

+# EVMS2 is finally gone from 11.1 and later, no need to include
+# confusing RAs.
+%if 0%{?suse_version} > 1100
+rm -f $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/heartbeat/Evms*
+%endif
+
###########################################################

%clean
@@ -329,12 +480,10 @@
###########################################################

%pre common
-
%if 0%{?fedora_version}
/usr/sbin/fedora-groupadd %{uid} -r %{gname} &>/dev/null || :
/usr/sbin/fedora-useradd %{uid} -r -s /sbin/nologin -d
%{_var}/lib/heartbeat/cores/%{uname} -M \
-c 'heartbeat user' -g %{gname} %{uname} &>/dev/null || :
-
%else
if
getent group %{gname} >/dev/null
@@ -364,29 +513,27 @@

%post
/sbin/ldconfig
-
%if %{start_at_boot}
%if 0%{?suse_version}
%{fillup_and_insserv -n heartbeat}
%endif
-
%if 0%{?fedora_version}
/sbin/chkconfig --add heartbeat
%endif
%endif
-
###########################################################
+%if 0%{?suse_version}

%preun
-%if %{stop_start_script}
-%if 0%{?suse_version}
%stop_on_removal heartbeat
%endif
%if 0%{?fedora_version}
+
+%preun
+%if %{stop_start_script}
/sbin/chkconfig --del heartbeat
%endif
%endif
-
###########################################################

%postun
@@ -397,21 +544,35 @@
%endif
%{insserv_cleanup}
%endif
-
%if 0%{?fedora_version}
test "$1" != 0 || /usr/sbin/fedora-userdel %{uname} || :
test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} || :
%endif
###########################################################
+%if 0%{?suse_version}

+%preun ldirectord
+ %stop_on_removal ldirectord
+%endif
%if 0%{?fedora_version}
-%post ldirectord
- /sbin/chkconfig --add ldirectord

%preun ldirectord
- /sbin/chkconfig --del ldirectord
+%if %{stop_start_script}
+ /sbin/chkconfig --del ldirectord
+%endif
+
+%endif
+
+%if 0%{?fedora_version}
+
+%post ldirectord
+ /sbin/chkconfig --add ldirectord
%endif

+%post -n libheartbeat2 -p /sbin/ldconfig
+
+%postun -n libheartbeat2 -p /sbin/ldconfig
+
%files
###########################################################
%defattr(-,root,root)
@@ -421,13 +582,11 @@
%{_libdir}/heartbeat/plugins/HBauth
%{_libdir}/heartbeat/plugins/HBcomm
%{_libdir}/heartbeat/plugins/HBcompress
-# %{_libdir}/heartbeat/plugins/quorum
-# %{_libdir}/heartbeat/plugins/quorumd
+%{_libdir}/heartbeat/plugins/quorum
+#%{_libdir}/heartbeat/plugins/quorumd
%{_libdir}/heartbeat/plugins/test
%{_libdir}/heartbeat/plugins/tiebreaker
-# %{_libdir}/heartbeat/quorumd
-%{_libdir}/heartbeat/ha_*
-%{_libdir}/heartbeat/hb_*
+#%{_libdir}/heartbeat/quorumd
%{_libdir}/heartbeat/heartbeat
%{_libdir}/heartbeat/ipfail
%{_libdir}/heartbeat/ccm
@@ -445,52 +604,40 @@
%{_datadir}/heartbeat/req_resource
%{_libdir}/heartbeat/dopd
%{_libdir}/heartbeat/drbd-peer-outdater
-
# Exclude pointless compatability symlinks
+#%exclude %{_libdir}/heartbeat/SNMPAgentSanityCheck
%exclude %{_libdir}/heartbeat/TestHeartbeatComm
%exclude %{_libdir}/heartbeat/BasicSanityCheck
#%exclude %{_libdir}/heartbeat/ResourceManager
%exclude %{_libdir}/heartbeat/lrmtest
%exclude %{_libdir}/heartbeat/cts
-
-# Exclude V1 Compatability symlinks - disabled for now...
-#%exclude %{_libdir}/heartbeat/hb_setweight
-#%exclude %{_libdir}/heartbeat/hb_standby
-#%exclude %{_libdir}/heartbeat/hb_takeover
-#%exclude %{_libdir}/heartbeat/mach_down
-#%exclude %{_libdir}/heartbeat/req_resource
-
-# Exclude V2 Compatability symlinks - disabled for now...
-#%exclude %{_libdir}/heartbeat/hb_addnode
-#%exclude %{_libdir}/heartbeat/hb_delnode
-#%exclude %{_libdir}/heartbeat/ha_config
-#%exclude %{_libdir}/heartbeat/ha_logger
-#%exclude %{_libdir}/heartbeat/hb_setsite
-#%exclude %{_libdir}/heartbeat/ha_propagate
-
+%exclude %{_libdir}/heartbeat/hb_setweight
+%exclude %{_libdir}/heartbeat/hb_standby
+%exclude %{_libdir}/heartbeat/hb_takeover
+%exclude %{_libdir}/heartbeat/mach_down
+%exclude %{_libdir}/heartbeat/req_resource
+%exclude %{_libdir}/heartbeat/hb_addnode
+%exclude %{_libdir}/heartbeat/hb_delnode
+%exclude %{_libdir}/heartbeat/ha_config
+%exclude %{_libdir}/heartbeat/ha_logger
+%exclude %{_libdir}/heartbeat/hb_setsite
+%exclude %{_libdir}/heartbeat/ha_propagate
%dir %{_var}/run/heartbeat
%dir %{_var}/lib/heartbeat
%dir %{_var}/lib/heartbeat/cores
%dir %attr (0755, %{uname}, %{gname}) %{_var}/run/heartbeat/ccm
-
%{_sysconfdir}/ha.d
+%exclude %{_sysconfdir}/ha.d/resource.d
+%exclude %{_sysconfdir}/ha.d/shellfuncs
%{_sysconfdir}/init.d/heartbeat
%config(noreplace) %{_sysconfdir}/logrotate.d/heartbeat
-
-# This belongs in the ldirectord package
-%exclude %{_sysconfdir}/ha.d/resource.d/ldirectord
-
%{_libdir}/libclm.so.*
%{_libdir}/libhbclient.so.*
%{_libdir}/libccmclient.so.*
-%{_libdir}/heartbeat/plugins/AppHBNotification
-
/sbin/rcheartbeat
%{_libdir}/heartbeat/apphbd
-
%{_bindir}/cl_respawn
%attr (2555, root, haclient) %{_bindir}/cl_status
-
%doc %{_mandir}/man1/cl_status.1*
%doc %{_mandir}/man1/ha_logger.1*
%doc %{_mandir}/man1/hb_addnode.1*
@@ -498,49 +645,55 @@
%doc %{_mandir}/man1/hb_standby.1*
%doc %{_mandir}/man1/hb_takeover.1*
%doc %{_mandir}/man8/heartbeat.8*
-%{_datadir}/doc/packages/heartbeat/*.txt
-%{_datadir}/doc/packages/heartbeat/*.html
-%{_datadir}/doc/packages/heartbeat/README
-%{_datadir}/doc/packages/heartbeat/authkeys
-%{_datadir}/doc/packages/heartbeat/startstop
-%{_datadir}/doc/packages/heartbeat/haresources
-%{_datadir}/doc/packages/heartbeat/ha.cf
-
+%doc %{_datadir}/doc/packages/heartbeat/*.txt
+%doc %{_datadir}/doc/packages/heartbeat/*.html
+%doc %{_datadir}/doc/packages/heartbeat/README
+%doc %{_datadir}/doc/packages/heartbeat/authkeys
+%doc %{_datadir}/doc/packages/heartbeat/startstop
+%doc %{_datadir}/doc/packages/heartbeat/haresources
+%doc %{_datadir}/doc/packages/heartbeat/ha.cf
###########################################################
+
+%files -n libheartbeat2
+%defattr(-,root,root)
+%{_libdir}/libstonith.so.*
+%{_libdir}/libpils.so.*
+%{_libdir}/libapphb.so.*
+%{_libdir}/liblrm.so.*
+%{_libdir}/libplumb.so.*
+%{_libdir}/libplumbgpl.so.*
+
%files common
%defattr(-,root,root)
-%doc doc/README
-%doc doc/COPYING
%dir %{_libdir}/heartbeat
%dir %{_libdir}/heartbeat/plugins
%dir %{_datadir}/heartbeat
%dir %{_datadir}/doc/packages/heartbeat
+%dir %{_sysconfdir}/ha.d
%{_sysconfdir}/ha.d/shellfuncs
%{_sbindir}/stonith
%{_sbindir}/meatclient
%{_sbindir}/ha_logger
%{_sbindir}/hb_report
-%{_libdir}/libstonith.so.*
%{_libdir}/stonith
%{_libdir}/pils
-%{_libdir}/libpils.so.*
-%{_libdir}/libapphb.so.*
-%{_libdir}/liblrm.so.*
-%{_libdir}/libplumb.so.*
-%{_libdir}/libplumbgpl.so.*
%{_libdir}/heartbeat/ha_logd
%{_libdir}/heartbeat/ha_logger
%{_libdir}/heartbeat/lrmadmin
%{_libdir}/heartbeat/lrmd
%{_libdir}/heartbeat/plugins/RAExec
+%exclude %{_libdir}/heartbeat/utillib.sh
+%exclude %{_libdir}/heartbeat/openais_conf_support.sh
+%exclude %{_libdir}/heartbeat/ha_cf_support.sh
%doc %{_mandir}/man8/apphbd.8*
%doc %{_mandir}/man8/stonith.8*
%doc %{_mandir}/man8/meatclient.8*
%doc %{_mandir}/man8/ha_logd.8*
-%{_datadir}/doc/packages/heartbeat/AUTHORS
-%{_datadir}/doc/packages/heartbeat/COPYING
-%{_datadir}/doc/packages/heartbeat/COPYING.LGPL
-%{_datadir}/doc/packages/heartbeat/ChangeLog
+%doc %{_datadir}/doc/packages/heartbeat/AUTHORS
+%exclude %doc %{_datadir}/doc/packages/heartbeat/README
+%doc %{_datadir}/doc/packages/heartbeat/COPYING
+%doc %{_datadir}/doc/packages/heartbeat/COPYING.LGPL
+%exclude %{_datadir}/doc/packages/heartbeat/ChangeLog
%{_datadir}/doc/packages/heartbeat/logd.cf
%{_datadir}/heartbeat/utillib.sh
%{_datadir}/heartbeat/ha_cf_support.sh
@@ -551,7 +704,7 @@
%dir %attr (0700, nobody, %{nogroup}) %{_var}/lib/heartbeat/cores/nobody
%dir %attr (0700, %{uname}, %{gname}) %{_var}/lib/heartbeat/cores/%{uname}

-%files common-devel
+%files -n libheartbeat-devel
%defattr(-,root,root)
%dir %{_includedir}/heartbeat
%{_includedir}/pils
@@ -583,10 +736,10 @@
%{_includedir}/heartbeat/HBauth.h
%{_includedir}/heartbeat/HBcomm.h
%{_includedir}/heartbeat/hb_api.h
-%{_libdir}/libccmclient*.so
-%{_libdir}/libclm*.so
-%{_libdir}/libhbclient*.so
-# %{_libdir}/heartbeat/quorumdtest
+%exclude %{_libdir}/libclm*.so
+%exclude %{_libdir}/libhbclient*.so
+%exclude %{_libdir}/libccmclient*.so
+#%{_libdir}/heartbeat/quorumdtest
%{_libdir}/heartbeat/clmtest
%{_libdir}/heartbeat/api_test
%{_libdir}/heartbeat/ipctest
@@ -596,31 +749,33 @@
%{_libdir}/heartbeat/apphbtest
%{_libdir}/heartbeat/base64_md5_test
%{_libdir}/heartbeat/ccm_testclient
-%{_datadir}/heartbeat/cts
%{_datadir}/heartbeat/BasicSanityCheck
%{_datadir}/heartbeat/TestHeartbeatComm
+%dir %{_datadir}/heartbeat/cts
+%{_datadir}/heartbeat/cts/LSBDummy
+%{_datadir}/heartbeat/cts/README
+%{_datadir}/heartbeat/cts/getpeinputs.sh
+%{_datadir}/heartbeat/cts/*.py
+%exclude %{_datadir}/heartbeat/cts/*.pyo
+%exclude %{_datadir}/heartbeat/cts/*.pyc

%files resources
%defattr(-,root,root)
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
-%dir /usr/lib/ocf/resource.d/heartbeat
+%{_sysconfdir}/ha.d/resource.d
+%exclude %{_sysconfdir}/ha.d/resource.d/ldirectord
/usr/lib/ocf/resource.d/heartbeat
-%{_sbindir}/ocf-tester
-%{_sbindir}/sbd
-%{_sbindir}/sfex_init
-%{_libdir}/heartbeat/sfex_daemon
+%{_libdir}/heartbeat/send_arp
%{_libdir}/heartbeat/findif
%{_libdir}/heartbeat/ocf-returncodes
%{_libdir}/heartbeat/ocf-shellfuncs
-%{_libdir}/heartbeat/send_arp
-%{_libdir}/heartbeat/utillib.sh
-%{_libdir}/heartbeat/ha_cf_support.sh
-%{_libdir}/heartbeat/openais_conf_support.sh
-
-%exclude %{_libdir}/heartbeat/ra-api-1.dtd
+%{_libdir}/heartbeat/sfex_daemon
+%{_sbindir}/sbd
+%{_sbindir}/ocf-tester
+%{_sbindir}/sfex_init
%{_datadir}/heartbeat/ra-api-1.dtd
-
+%exclude %{_libdir}/heartbeat/ra-api-1.dtd
###########################################################
# Files for ldirectord

@@ -639,7 +794,28 @@
%{_sysconfdir}/ha.d/resource.d/ldirectord
%config(noreplace) %{_sysconfdir}/logrotate.d/ldirectord

+
%changelog heartbeat
+* Fri Nov 21 2008 Lars Marowsky-Bree <lmb@xxxxxxx> and many others
+- hb_report: many fixes and improvements.
+- stonith: kdumpcheck: improve parsing for kdump_check_user.
+- RA: Squid: support the Squid proxy server as a service.
+- RA: drbd: Minor bugs and bash issues fixed.
+- CCM: Avoid passing NULL to glib functions using GHashTable.
+- Build fixes (LF#1977, LF#1976, LF#1980).
+- CTS: Move heartbeat-v1 resources to heartbeat-resources (bnc#446667).
+- Patch heartbeat-doc-directory.diff is now redundant.
+
++ 2.99.3 - beta release of 3.0.x series.
+- hb_report: many fixes and improvements.
+- stonith: kdumpcheck: improve parsing for kdump_check_user.
+- RA: Squid: support the Squid proxy server as a service.
+- RA: drbd: Minor bugs and bash issues fixed.
+- CCM: Avoid passing NULL to glib functions using GHashTable.
+- Build fixes (LF#1977, LF#1976, LF#1980).
+- CTS: Move heartbeat-v1 resources to heartbeat-resources (bnc#446667).
+- Patch heartbeat-doc-directory.diff is now redundant.
+
* Tue Oct 28 2008 Lars Marowsky-Bree <lmb@xxxxxxx> and many others
+ 2.99.2 - beta release of 3.0.x series.
- RA: Filesystem: For OCFS2, work on both SLES10 in compatibility mode
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/.hg_archival.txt
new/heartbeat/.hg_archival.txt
--- old/heartbeat/.hg_archival.txt 2008-11-19 19:34:26.000000000 +0100
+++ new/heartbeat/.hg_archival.txt 2008-12-03 17:44:17.000000000 +0100
@@ -1,2 +1,2 @@
repo: 8448b17e67437947c48c639c6faa4371c4a14b3b
-node: 9dbbc2cbd414036ea5e4e3a901fc3f48f5d5f1ad
+node: 914d0f3e34d339d11707d44d1a4b3698abdd9b11
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/.hgtags new/heartbeat/.hgtags
--- old/heartbeat/.hgtags 2008-11-19 19:34:26.000000000 +0100
+++ new/heartbeat/.hgtags 2008-12-03 17:44:17.000000000 +0100
@@ -33,3 +33,4 @@
6671a027ff2f42e21f6e0c37483dd98b2885bd43 beta-2.99.2
3ab000a8e140c9602ddcf5c3b188b54995c09a9b beta-2.99.2
7d5b329e13ca485b43826bfb80679ce6b9dc5324 beta-2.99.2
+9dbbc2cbd414036ea5e4e3a901fc3f48f5d5f1ad sle11-beta6
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/resources/OCF/MailTo
new/heartbeat/resources/OCF/MailTo
--- old/heartbeat/resources/OCF/MailTo 2008-11-19 19:34:26.000000000 +0100
+++ new/heartbeat/resources/OCF/MailTo 2008-12-03 17:44:17.000000000 +0100
@@ -129,10 +129,15 @@
}

MailToValidateAll () {
+ if [ -z "$MAILCMD" ]; then
+ ocf_log err "MAILCMD not set: complain to the packager"
+ exit $OCF_ERR_INSTALLED
+ fi
+ check_binary "$MAILCMD"

# $email may be a list of mail addresses separated by "," and " " and "\t"
# normalize it for ease of parse
- local local_email=`echo $email | tr ",\t" " " | tr -s " "`
+ local_email=`echo $email | tr ",\t" " " | tr -s " "`

# ocf_log info "[$local_email]"
for item in $local_email
@@ -195,13 +200,14 @@
email=$OCF_RESKEY_email
subject=$OCF_RESKEY_subject

+MailToValidateAll
+
case $1 in
start) MailToStart
;;
stop) MailToStop
;;
- validate-all) MailToValidateAll
- ;;
+ validate-all) ;;
*) usage
exit $OCF_ERR_UNIMPLEMENTED
;;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/resources/OCF/Makefile.am
new/heartbeat/resources/OCF/Makefile.am
--- old/heartbeat/resources/OCF/Makefile.am 2008-11-19 19:34:26.000000000
+0100
+++ new/heartbeat/resources/OCF/Makefile.am 2008-12-03 17:44:17.000000000
+0100
@@ -88,6 +88,7 @@
sfex \
tomcat \
VIPArip \
+ VirtualDomain \
vmware \
WAS \
WAS6 \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/resources/OCF/VirtualDomain
new/heartbeat/resources/OCF/VirtualDomain
--- old/heartbeat/resources/OCF/VirtualDomain 1970-01-01 01:00:00.000000000
+0100
+++ new/heartbeat/resources/OCF/VirtualDomain 2008-12-03 17:44:17.000000000
+0100
@@ -0,0 +1,212 @@
+#!/bin/sh
+#
+# Support: linux-ha@xxxxxxxxxxxxxxxxxx
+# License: GNU General Public License (GPL)
+#
+# Resource Agent for domains managed by the libvirt API.
+# Requires a running libvirt daemon (libvirtd), except when running
+# in a Xen Domain-0 and specifying xen:/// as the hypervisor URL.
+#
+# usage: $0 {start|stop|status|monitor|meta-data}
+#
+# TODO: when properly supported by libvirt, this RA should include
+# support for domain live migration and implement the
+# migrate-to and migrate-from operations.
+#
+#######################################################################
+# Initialization:
+. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
+LC_ALL="C"
+LANG="C"
+
+# Defaults
+: ${OCF_RESKEY_force_stop=0}
+#######################################################################
+
+
+usage() {
+ echo "usage: $0 {start|stop|status|monitor|meta-data|validate-all}"
+}
+
+meta_data() {
+ cat <<EOF
+<?xml version="1.0"?>
+<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
+<resource-agent name="VirtualDomain">
+<version>1.0</version>
+
+<longdesc lang="en">
+Resource agent for a virtual domain (a.k.a. domU, virtual machine,
+virtual environment etc., depending on context) managed by libvirtd.
+</longdesc>
+<shortdesc lang="en">Manages virtual domains</shortdesc>
+
+<parameters>
+
+<parameter name="config" unique="1" required="1">
+<longdesc lang="en">
+Absolute path to the libvirt configuration file,
+for this virtual domain.
+</longdesc>
+<shortdesc lang="en">virtual domain configuration file</shortdesc>
+<content type="string" default="" />
+</parameter>
+
+<parameter name="hypervisor" unique="0" required="0">
+<longdesc lang="en">
+Hypervisor URI to connect to. See the libvirt documentation for
+details on supported URI formats. The default is system dependent.
+</longdesc>
+<shortdesc lang="en">Hypervisor URI</shortdesc>
+<content type="string"/>
+</parameter>
+
+<parameter name="force_stop" unique="0" required="0">
+<longdesc lang="en">
+Forcefully shut down ("destroy") the domain on stop. Enable this only if
+your virtual domain (or your virtualization backend) does not support
+graceful shutdown.
+</longdesc>
+<shortdesc lang="en">Force shutdown on stop</shortdesc>
+<content type="boolean" default="0" />
+</parameter>
+</parameters>
+
+<actions>
+<action name="start" timeout="10" />
+<action name="stop" timeout="90" />
+<action name="status" depth="0" timeout="30" interval="10" />
+<action name="monitor" depth="0" timeout="30" interval="10" />
+<action name="meta-data" timeout="5" />
+<action name="validate-all" timeout="5" />
+</actions>
+</resource-agent>
+EOF
+}
+
+VirtualDomain_Define() {
+ DOMAIN_NAME="$(virsh ${VIRSH_OPTIONS} define ${OCF_RESKEY_config} | sed -e
's/Domain \(.*\) defined from .*$/\1/')" \
+ || return $OCF_ERR_GENERIC
+}
+
+VirtualDomain_Status() {
+ rc=$OCF_ERR_GENERIC
+ status="`virsh $VIRSH_OPTIONS domstate $DOMAIN_NAME`"
+ case $status in
+ "shut off")
+ rc=$OCF_NOT_RUNNING
+ ;;
+ running|paused|blocked)
+ rc=$OCF_SUCCESS
+ ;;
+ esac
+ ocf_log debug "Virtual domain $DOMAIN_NAME is currently $status."
+ return $rc
+}
+
+VirtualDomain_Start() {
+ if VirtualDomain_Status ${DOMAIN_NAME}; then
+ ocf_log info "Virtual domain $DOMAIN_NAME already running."
+ return $OCF_SUCCESS
+ fi
+
+ virsh $VIRSH_OPTIONS start ${DOMAIN_NAME}
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ ocf_log error "Failed to start virtual domain ${DOMAIN_NAME}."
+ return $OCF_ERR_GENERIC
+ fi
+
+ while sleep 1; do
+ VirtualDomain_Status && return $OCF_SUCCESS
+ done
+}
+
+VirtualDomain_Stop() {
+ if VirtualDomain_Status ${DOMAIN_NAME}; then
+ case $OCF_RESKEY_force_stop in
+ [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+ op="destroy"
+ ;;
+ *)
+ op="shutdown"
+ ;;
+ esac
+ virsh $VIRSH_OPTIONS $op ${DOMAIN_NAME}
+ while sleep 1; do
+ VirtualDomain_Status
+ if [ $? -eq $OCF_NOT_RUNNING ]; then
+ return $OCF_SUCCESS
+ fi
+ done
+ else
+ ocf_log info "Domain $DOMAIN_NAME already stopped."
+ return $OCF_SUCCESS
+ fi
+}
+
+VirtualDomain_Validate_All() {
+ # Required binaries:
+ for binary in virsh sed; do
+ check_binary $binary
+ done
+
+ if [ -z $OCF_RESKEY_config ]; then
+ ocf_log error "Missing configuration parameter \"config\"."
+ return $OCF_ERR_CONFIGURED
+ fi
+
+ # check if we can read the config file (otherwise we're unable to
+ # deduce $DOMAIN_NAME from it, see below)
+ if [ ! -r $OCF_RESKEY_config ]; then
+ ocf_log error "Configuration file $OCF_RESKEY_config does not exist or
is not readable."
+ return $OCF_ERR_CONFIGURED
+ fi
+}
+
+if [ $# -ne 1 ]; then
+ usage
+ exit $OCF_ERR_ARGS
+fi
+
+case $1 in
+ meta-data) meta_data
+ exit $OCF_SUCCESS
+ ;;
+ usage) usage
+ exit $OCF_SUCCESS
+ ;;
+esac
+
+# Everything except usage and meta-data must pass the validate test
+VirtualDomain_Validate_All || exit $?
+
+# Set options to be passed to virsh:
+#
+# if OCF_RESKEY_hypervisor is set, add the --connect option.
+# Otherwise, omit it so virsh connects to libvirt's
+# system-dependent default hypervisor.
+if [ -n "$OCF_RESKEY_hypervisor" ]; then
+ VIRSH_OPTIONS="--connect=${OCF_RESKEY_hypervisor}"
+fi
+VIRSH_OPTIONS="${VIRSH_OPTIONS} --quiet"
+
+# Define the domain on startup, and re-define (harmlessly)
+# on every invocation. This also sets DOMAIN_NAME. If this fails,
+# bail out.
+VirtualDomain_Define || exit $?
+
+case $1 in
+ start) VirtualDomain_Start
+ ;;
+ stop) VirtualDomain_Stop
+ ;;
+ monitor|status) VirtualDomain_Status ${DOMAIN_NAME}
+ ;;
+ validate-all)
+ ;;
+ *) usage
+ exit $OCF_ERR_UNIMPLEMENTED
+ ;;
+esac
+exit $?
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/tools/hb_report.in
new/heartbeat/tools/hb_report.in
--- old/heartbeat/tools/hb_report.in 2008-11-19 19:34:26.000000000 +0100
+++ new/heartbeat/tools/hb_report.in 2008-12-03 17:44:17.000000000 +0100
@@ -164,13 +164,16 @@
#
# find log files
#
+logmark() {
+ logger -p $*
+}
logmarks() {
- sev=$1 msg=$2
- c="logger -p $HA_LOGFACILITY.$sev $msg"
+ msg=$1
+ c="$PROGDIR/hb_report __slave $DESTDIR logmark $msg"

for n in $NODES; do
if [ "$n" = "`uname -n`" ]; then
- $c
+ [ "$THIS_IS_NODE" ] && logmark
$HA_LOGFACILITY.$HA_LOGLEVEL $msg
else
[ "$ssh_good" ] &&
echo $c | ssh $ssh_opts $n
@@ -221,14 +224,14 @@
logf=$1
testnum=$2

- FROM_LINE=`grep -n "Running test.*\[$testnum\]" $logf | tail -1 | sed
's/:.*//'`
+ FROM_LINE=`grep -n "Running test.*\[ *$testnum\]" $logf | tail -1 | sed
's/:.*//'`
if [ -z "$FROM_LINE" ]; then
warning "couldn't find line for CTS test $testnum; corrupt log
file?"
return
else
FROM_TIME=`linetime $logf $FROM_LINE`
fi
- TO_LINE=`grep -n "Running test.*\[$(($testnum+1))\]" $logf | tail -1 |
sed 's/:.*//'`
+ TO_LINE=`grep -n "Running test.*\[ *$(($testnum+1))\]" $logf | tail -1
| sed 's/:.*//'`
[ "$TO_LINE" ] ||
TO_LINE=`wc -l < $logf`
TO_TIME=`linetime $logf $TO_LINE`
@@ -259,9 +262,8 @@
start_remote_collectors() {
for node in $NODES; do
[ "$node" = "$WE" ] && continue
- dumpenv |
- ssh $ssh_opts $node "mkdir -p $DESTDIR && cat > $DESTDIR/.env &&
- $PROGDIR/hb_report __slave $DESTDIR" |
+ dumpenv | ssh $ssh_opts $node \
+ "cat > $DESTDIR/.env; $PROGDIR/hb_report __slave
$DESTDIR" |
(cd $DESTDIR && tar xf -) &
SLAVEPIDS="$SLAVEPIDS $!"
done
@@ -651,6 +653,14 @@
fatal "no stack specific support: $CF_SUPPORT"
fi

+getlogvars
+
+if [ "$SLAVE" -a "$3" = logmark ]; then
+ msg="$4"
+ logmark $HA_LOGFACILITY.$HA_LOGLEVEL $msg
+ exit
+fi
+
WE=`uname -n` # who am i?
THIS_IS_NODE=""
NODES=`getnodes`
@@ -676,8 +686,6 @@
CIB_F=cib.xml
export CRM_MON_F CCMTOOL_F CRM_VERIFY_F CIB_F

-getlogvars
-
# this only on master
if [ "$SLAVE" = "" ]; then

@@ -710,8 +718,12 @@
[ "$ssh_good" ] &&
for node in $NODES; do
[ "$node" = "$WE" ] && continue
- ssh $ssh_opts $node "test -d $DESTDIR" &&
+ ssh $ssh_opts $node "test -d $DESTDIR" && {
+ test -d $DESTDIR && rmdir $DESTDIR
msgcleanup $node
+ }
+ dumpenv |
+ ssh $ssh_opts $node "mkdir -p $DESTDIR && cat >
$DESTDIR/.env"
done
fi

@@ -721,7 +733,7 @@
# important to do this now on _all_ nodes
#
if [ "$HA_LOGFACILITY" ]; then
- logmarks $HA_LOGLEVEL $UNIQUE_MSG
+ logmarks $UNIQUE_MSG
fi
fi

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/tools/openais_conf_support.sh
new/heartbeat/tools/openais_conf_support.sh
--- old/heartbeat/tools/openais_conf_support.sh 2008-11-19 19:34:26.000000000
+0100
+++ new/heartbeat/tools/openais_conf_support.sh 2008-12-03 17:44:17.000000000
+0100
@@ -68,9 +68,7 @@
getlogvars() {
HA_LOGFACILITY=${HA_LOGFACILITY:-$DEFAULT_HA_LOGFACILITY}
HA_LOGLEVEL="info"
- cfdebug=`getcfvar debug` # prefer debug level if set
- isnumber $cfdebug || cfdebug=""
- [ "$cfdebug" ] && [ $cfdebug -gt 0 ] &&
+ iscfvartrue debug && # prefer debug level if set
HA_LOGLEVEL="debug"
if uselogd; then
[ -f "$LOGD_CF" ] ||
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/heartbeat/tools/utillib.sh
new/heartbeat/tools/utillib.sh
--- old/heartbeat/tools/utillib.sh 2008-11-19 19:34:26.000000000 +0100
+++ new/heartbeat/tools/utillib.sh 2008-12-03 17:44:17.000000000 +0100
@@ -216,13 +216,13 @@
}
trap find_files_clean 0
if ! from_stamp=`touchfile $from_time`; then
- warning "sorry, can't create temoary file for find_files"
+ warning "sorry, can't create temporary file for find_files"
return
fi
findexp="-newer $from_stamp"
if isnumber "$to_time" && [ "$to_time" -gt 0 ]; then
if ! to_stamp=`touchfile $to_time`; then
- warning "sorry, can't create temoary file for" \
+ warning "sorry, can't create temporary file for" \
"find_files"
find_files_clean
return


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages