packages/openais branch master updated.

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


The branch, master has been updated
       via  7b0eaa41f47925683ca358740001377d8eb4eb58 (commit)
       via  c169071f042ba04279681ef0eeb83a63472e5871 (commit)
      from  5b17a18adf7d648dffb5db4b5235ba1a736578b1 (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 7b0eaa41f47925683ca358740001377d8eb4eb58
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date:   Wed Jul 4 19:40:43 2012 +0000

    - systemd service file adder
    - Release: 2.2
    
    Changed files:
        openais.service -> 1.1
        openais.spec -> 1.24

diff --git a/openais.service b/openais.service
new file mode 100644
index 0000000..b71358c
--- /dev/null
+++ b/openais.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=OpenAIS Cluster Framework
+ConditionKernelCommandLine=!nocluster
+Requires=network.target
+After=network.target
+Before=corosync.service
+Conflicts=corosync.service
+Names=corosync-stack.service
+
+[Install]
+WantedBy=corosync.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/corosync.pid
+KillMode=process
+SysVStartPriority=21
+EnvironmentFile=-/etc/sysconfig/openais
+ExecStart=/usr/sbin/aisexec
+
+# 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/openais.spec b/openais.spec
index e3fecb4..21c4a78 100644
--- a/openais.spec
+++ b/openais.spec
@@ -7,12 +7,13 @@ Summary:	The openais Standards-Based Cluster Framework executive and APIs
 Summary(pl.UTF-8):	Środowisko klastra opartego na standardach openais
 Name:		openais
 Version:	1.1.4
-Release:	2.1
+Release:	2.2
 License:	BSD
 Group:		Base
 Source0:	ftp://ftp:download@ftp.openais.org/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	e500ad3c49fdc45d8653f864e80ed82c
 Source1:	%{name}.init
+Source2:	%{name}.service
 URL:		http://www.openais.org/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -97,7 +98,7 @@ sed -i -e 's/OPT_CFLAGS=.*/OPT_CFLAGS=/' configure.ac
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -110,6 +111,7 @@ sed -i -e 's/^/#/' $RPM_BUILD_ROOT/etc/corosync/amf.conf
 %{__rm} -r $RPM_BUILD_ROOT/usr/share/doc/openais
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -147,6 +149,7 @@ fi
 %attr(755,root,root) %{_sbindir}/openais-instantiate
 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/amf.conf
 %attr(754,root,root) /etc/rc.d/init.d/openais
+%{systemdunitdir}/%{name}.service
 %attr(755,root,root) %{_libdir}/lcrso/openaisserviceenable.lcrso
 %attr(755,root,root) %{_libdir}/lcrso/service_*.lcrso
 %{_mandir}/man5/amf.conf.5*

commit c169071f042ba04279681ef0eeb83a63472e5871
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date:   Wed Jul 4 16:14:18 2012 +0000

    - PLD init script added
    
    Changed files:
        openais.init -> 1.1
        openais.spec -> 1.23

diff --git a/openais.init b/openais.init
new file mode 100644
index 0000000..f2c506f
--- /dev/null
+++ b/openais.init
@@ -0,0 +1,103 @@
+#!/bin/sh
+#
+# openais	OpenAIS Cluster Framework
+#
+# chkconfig: 2345 20 80
+# description: OpenAIS Cluster Framework
+# processname: corosync
+#
+### BEGIN INIT INFO
+# Provides:		corosync
+# Required-Start:	$network $syslog
+# Required-Stop:	$network $syslog
+# Default-Start:
+# Default-Stop:
+# Short-Description:	Starts and stops OpenAIS Cluster Framework
+# Description:		Starts and stops OpenAIS Cluster Framework
+### END INIT INFO
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+[ -f /etc/sysconfig/openais ] && . /etc/sysconfig/openais
+
+start() {
+	# Check if the service is already running?
+	if [ -f /var/lock/subsys/corosync ]; then
+		msg_already_running "Corosync Cluster Engine"
+		echo "You should stop bare Corosync before starting OpenAIS" >&2
+		RETVAL=1
+		return
+	fi
+	if [ -f /var/lock/subsys/openais ]; then
+		msg_already_running "OpenAIS Cluster Framework"
+		return
+	fi
+	if grep -q nocluster /proc/cmdline ; then
+		show "Disabled on boot"
+		RETVAL=1
+		return
+	fi
+
+	msg_starting "OpenAIS Cluster Framework"
+	daemon /usr/sbin/aisexec
+	RETVAL=$?
+	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/openais
+}
+
+stop() {
+	if [ ! -f /var/lock/subsys/openais ]; then
+		msg_not_running "OpenAIS Cluster Framework"
+		return
+	fi
+
+	# Stop daemons.
+	msg_stopping "OpenAIS Cluster Framework"
+	killproc /usr/sbin/corosync
+	rm -f /var/lock/subsys/openais
+}
+
+condrestart() {
+	if [ ! -f /var/lock/subsys/openais ]; then
+		msg_not_running "OpenAIS Cluster Framework"
+		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)
+	if [ -f /var/lock/subsys/corosync ] ; then
+		# not report bare corosync as openais
+		status openais
+	else	
+		status openais corosync
+	fi
+	RETVAL=$?
+	;;
+*)
+	msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+	exit 3
+	;;
+esac
+exit $RETVAL
diff --git a/openais.spec b/openais.spec
index 33c57b9..e3fecb4 100644
--- a/openais.spec
+++ b/openais.spec
@@ -1,12 +1,18 @@
+#
+# Note: not mainained upstream any more but still needed for
+#       3rd generation 'cluster' package and clvmd under corosync
+#       holds upgrade to corosync 2.x, though
+#
 Summary:	The openais Standards-Based Cluster Framework executive and APIs
 Summary(pl.UTF-8):	Środowisko klastra opartego na standardach openais
 Name:		openais
 Version:	1.1.4
-Release:	2
+Release:	2.1
 License:	BSD
 Group:		Base
 Source0:	ftp://ftp:download@ftp.openais.org/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	e500ad3c49fdc45d8653f864e80ed82c
+Source1:	%{name}.init
 URL:		http://www.openais.org/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -91,6 +97,8 @@ sed -i -e 's/OPT_CFLAGS=.*/OPT_CFLAGS=/' configure.ac
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
@@ -101,6 +109,8 @@ sed -i -e 's/^/#/' $RPM_BUILD_ROOT/etc/corosync/amf.conf
 # Cleanup the buildroot
 %{__rm} -r $RPM_BUILD_ROOT/usr/share/doc/openais
 
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -109,20 +119,23 @@ rm -rf $RPM_BUILD_ROOT
 %useradd -u 187 -d /usr/share/empty -s /bin/false -g ais -c "openais Standards Based Cluster Framework" -r ais
 
 %post
-/sbin/chkconfig --add openais
-%service openais restart
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+%systemd_post %{name}.service
 
 %preun
 if [ "$1" -eq "0" ]; then
-	%service -q openais stop
-	/sbin/chkconfig --del openais
+	%service -q %{name} stop
+	/sbin/chkconfig --del %{name}
 fi
+%systemd_preun %{name}.service
 
 %postun
 if [ "$1" = "0" ]; then
 	%userremove ais
 	%groupremove ais
 fi
+%systemd_reload
 
 %post	libs -p /sbin/ldconfig
 %postun	libs -p /sbin/ldconfig

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

Summary of changes:
 openais.init    | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 openais.service |  26 ++++++++++++++
 openais.spec    |  26 +++++++++++---
 3 files changed, 150 insertions(+), 5 deletions(-)
 create mode 100644 openais.init
 create mode 100644 openais.service


hooks/post-receive
-- 
packages/openais


More information about the test mailing list