packages/pacemaker branch pacemaker-1_1 updated.

draenog draenog at pld-linux.org
Thu Jul 5 02:41:13 CEST 2012


The branch, pacemaker-1_1 has been updated
       via  d45bf2c6fd8386294a120d6008a2f392a484d953 (commit)
       via  2b79a2a756b26d5c74ff3539b2e94c8f85c24a4f (commit)
       via  49485c8ce1bbb8e898830b063042f2958b5a244c (commit)
      from  07a1bb3751c9f5b20fcf98d2bab0dd9ad94c28bc (commit)

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

- Log -----------------------------------------------------------------
commit d45bf2c6fd8386294a120d6008a2f392a484d953
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date:   Wed Jul 4 19:58:44 2012 +0000

    - PLD init script and systemd service file added
    - Release: 1.1
    
    Changed files:
        pacemaker.init -> 1.1.2.1
        pacemaker.service -> 1.1.2.1
        pacemaker.spec -> 1.17.2.9

diff --git a/pacemaker.init b/pacemaker.init
new file mode 100644
index 0000000..746230a
--- /dev/null
+++ b/pacemaker.init
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+# pacemaker	Pacemaker Cluster Manager for the Corosync stack
+#
+# chkconfig: 2345 23 77
+# description: Pacemaker Cluster Manager
+# processname: pacemakerd
+#
+### BEGIN INIT INFO
+# Provides:		pacemaker
+# Required-Start:	$corosync
+# Required-Stop:	$corosync
+# Default-Start:
+# Default-Stop:
+# Short-Description:	Starts and stops Pacemaker Cluster Manager.
+# Description:		Starts and stops Pacemaker Cluster Manager.
+### END INIT INFO
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+[ -f /etc/sysconfig/pacemaker ] && . /etc/sysconfig/pacemaker
+
+start() {
+	# Check if the service is already running?
+	if [ -f /var/lock/subsys/pacemaker ]; then
+		msg_already_running "Pacemaker Cluster Manager"
+		return
+	fi
+	if grep -q nocluster /proc/cmdline ; then
+		show "Disabled on boot"
+		RETVAL=1
+		return
+	fi
+
+	msg_starting "Pacemaker Cluster Manager"
+	daemon /usr/sbin/pacemakerd --pid-file=/var/run/pacemakerd.pid
+	RETVAL=$?
+	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/pacemaker
+}
+
+stop() {
+	if [ ! -f /var/lock/subsys/pacemaker ]; then
+		msg_not_running "Pacemaker Cluster Manager"
+		return
+	fi
+
+	# Stop daemons.
+	msg_stopping "Pacemaker Cluster Manager"
+	killproc /usr/sbin/pacemakerd
+	rm -f /var/lock/subsys/pacemaker
+}
+
+condrestart() {
+	if [ ! -f /var/lock/subsys/pacemaker ]; then
+		msg_not_running "Pacemaker Cluster Manager"
+		RETVAL=$1
+		return
+	fi
+
+	stop
+	start
+}
+
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart)
+	stop
+   	sleep 5
+	start
+	;;
+  try-restart)
+	condrestart 0
+	;;
+  force-reload)
+	condrestart 7
+	;;
+  status)
+	status pacemaker pacemakerd
+	RETVAL=$?
+	;;
+*)
+	msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+	exit 3
+	;;
+esac
+exit $RETVAL
diff --git a/pacemaker.service b/pacemaker.service
new file mode 100644
index 0000000..e23f11c
--- /dev/null
+++ b/pacemaker.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=Pacemaker High Availability Cluster Manager for Corosync stack
+
+After=corosync.target
+Requires=corosync.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/pacemakerd.pid
+KillMode=process
+SysVStartPriority=23
+EnvironmentFile=-/etc/sysconfig/pacemaker
+ExecStart=/usr/sbin/pacemakerd --pid-file=/var/run/pacemakerd.pid
+
+# Pacemaker can only exit after all managed services have shut down
+# A HA database could conceivably take even longer than this 
+TimeoutSec=30min
+
+# Restart options include: no, on-success, on-failure, on-abort or always
+Restart=on-failure
diff --git a/pacemaker.spec b/pacemaker.spec
index 5a0071a..c2f6a22 100644
--- a/pacemaker.spec
+++ b/pacemaker.spec
@@ -1,19 +1,18 @@
 #
-# TODO:
-#	- optional support for complete openais stack (corosync is often enough)
-
 %bcond_without	corosync	# build with corosync stack
 %bcond_without	heartbeat	# build without heartbeat stack
 Summary:	The scalable High-Availability cluster resource manager
 Name:		pacemaker
 Version:	1.1.7
-Release:	1
+Release:	1.1
 License:	GPL v2+; LGPL v2.1+
 Group:		Applications/System
 # https://github.com/ClusterLabs/pacemaker/tarball/Pacemaker-%{version}
 Source0:	ClusterLabs-pacemaker-Pacemaker-%{version}-0-gee0730e.tar.gz
 # Source0-md5:	61076a946cf2ba549dce1458e2ef76e2
 Source1:	%{name}.tmpfiles
+Source2:	%{name}.init
+Source3:	%{name}.service
 Patch0:		%{name}-ncurses.patch
 Patch1:		%{name}-libs.patch
 Patch2:		%{name}-awk.patch
@@ -53,9 +52,9 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define skip_post_check_so libpe_status.so.*
 
 %description
-Pacemaker makes use of your cluster infrastructure (either OpenAIS or
-Heartbeat) to stop, start and monitor the health of the services (aka.
-resources) you want the cluster to provide.
+Pacemaker makes use of your cluster infrastructure (either 
+Corosync/OpenAIS or Heartbeat) to stop, start and monitor the health
+of the services (aka.  resources) you want the cluster to provide.
 
 It can do this for clusters of practically any size and comes with a
 powerful dependency model that allows the administrator to accurately
@@ -138,7 +137,7 @@ Static Pacemaker libraries.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,/etc/rc.d}
+install -d $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,/etc/rc.d/init.d,%{systemdunitdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -147,6 +146,8 @@ rm -r $RPM_BUILD_ROOT%{_docdir}/pacemaker
 rm $RPM_BUILD_ROOT%{_libdir}/heartbeat/plugins/RAExec/*.{la,a}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
 
 %clean
 rm -rf $RPM_BUILD_ROOT

commit 2b79a2a756b26d5c74ff3539b2e94c8f85c24a4f
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date:   Wed Jul 4 19:42:50 2012 +0000

    - /lib/heartbeat/crm directory is needed by Pacemaker even without heartbeat
    
    Changed files:
        pacemaker.spec -> 1.17.2.8

diff --git a/pacemaker.spec b/pacemaker.spec
index b504eed..5a0071a 100644
--- a/pacemaker.spec
+++ b/pacemaker.spec
@@ -235,6 +235,7 @@ fi
 %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/ping
 %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/pingd
 /usr/lib/tmpfiles.d/%{name}.conf
+%dir %attr(750,hacluster,haclient) %{_var}/lib/heartbeat/crm
 
 %files libs
 %defattr(644,root,root,755)
@@ -251,7 +252,6 @@ fi
 %attr(755,root,root) %{_libdir}/heartbeat/crmd
 %attr(755,root,root) %{_libdir}/heartbeat/pengine
 %attr(755,root,root) %{_libdir}/heartbeat/stonithd
-%dir %attr(750,hacluster,haclient) %{_var}/lib/heartbeat/crm
 %endif
 
 %if %{with corosync}

commit 49485c8ce1bbb8e898830b063042f2958b5a244c
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date:   Wed Jul 4 16:17:17 2012 +0000

    - R: resource-agents
    
    Changed files:
        pacemaker.spec -> 1.17.2.7

diff --git a/pacemaker.spec b/pacemaker.spec
index de907e7..b504eed 100644
--- a/pacemaker.spec
+++ b/pacemaker.spec
@@ -42,6 +42,7 @@ BuildRequires:	rpm-pythonprov
 BuildRequires:	swig
 BuildRequires:	pciutils-devel
 BuildRequires:	cluster-glue-libs-devel
+Requires:	resource-agents
 Requires:	%{name}-libs = %{version}-%{release}
 Provides:	group(haclient)
 Provides:	user(hacluster)

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

Summary of changes:
 pacemaker.init    | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 pacemaker.service | 23 ++++++++++++++
 pacemaker.spec    | 20 ++++++------
 3 files changed, 126 insertions(+), 9 deletions(-)
 create mode 100644 pacemaker.init
 create mode 100644 pacemaker.service


hooks/post-receive
-- 
packages/pacemaker


More information about the test mailing list