Hello community, here is the log from the commit of package openais for openSUSE:Factory checked in at Wed Jun 30 10:45:53 CEST 2010. -------- --- openais/openais.changes 2009-06-19 11:04:57.000000000 +0200 +++ /mounts/work_src_done/STABLE/openais/openais.changes 2010-06-25 04:09:01.000000000 +0200 @@ -2 +2 @@ -Fri Jun 19 10:35:46 CEST 2009 - coolo@novell.com +Fri May 21 08:28:35 UTC 2010 - lmb@novell.com @@ -4 +4 @@ -- disable as-needed for this package as it fails to build with it +- Fix openais/iscsi init script ordering (bnc#607777) @@ -7 +7 @@ -Tue Jun 9 01:47:55 CEST 2009 - ro@suse.de +Tue Mar 9 15:50:49 UTC 2010 - lmb@novell.com @@ -9,3 +9,176 @@ -- fix build with gcc-4.4 (#elif -> #else) -- renamed dprintf to my_dprintf to avoid collision with function - from glibc +- Ensure that openais remains in the init sequence, work-around for SLE + HA 11 GA (bnc#583663) + +------------------------------------------------------------------- +Tue Mar 2 22:07:02 UTC 2010 - dmuhamedagic@novell.com + +- drop awkward one millisecond from new consensus value, since + that has been fixed in corosync + +------------------------------------------------------------------- +Mon Feb 22 15:53:53 UTC 2010 - dmuhamedagic@novell.com + +- SP1 beta5 (no changes) + +------------------------------------------------------------------- +Tue Feb 9 21:45:22 UTC 2010 - dmuhamedagic@novell.com + +- fix the Makefile.am part of the patch + +------------------------------------------------------------------- +Tue Feb 9 17:25:37 UTC 2010 - dmuhamedagic@novell.com + +- update to release 1.1.2 + +------------------------------------------------------------------- +Tue Feb 9 12:27:56 UTC 2010 - lmb@novell.com + +- Allow openais to shutdown properly without being killed (bnc#574517). + +------------------------------------------------------------------- +Mon Feb 8 15:20:32 UTC 2010 - dmuhamedagic@novell.com + +- turn timestamp to off when converting openais.conf to corosync.conf + (there was a problem reported in connection with not thread-safe + glibc functions used in concert with this option, which hasn't yet + been resolved) + +------------------------------------------------------------------- +Mon Jan 25 16:29:50 UTC 2010 - lmb@novell.com + +- Remove redundant Provides from spec file. + +------------------------------------------------------------------- +Mon Jan 25 15:16:45 UTC 2010 - dmuhamedagic@novell.com + +- add /etc/ais/openais.conf as %config(missingok) so that rpm + doesn't remove it on upgrade +- create openais.conf in the install stage with appropriate comment + about that this configuration file is obsoleted + +------------------------------------------------------------------- +Mon Jan 25 15:00:44 UTC 2010 - lmb@novell.com + +- Reduce Obsoletes in spec file (bnc#573471) + +------------------------------------------------------------------- +Thu Jan 21 15:09:20 UTC 2010 - dmuhamedagic@novell.com + +- don't overwrite authkey/corosync.conf in %pre + +------------------------------------------------------------------- +Thu Jan 21 14:19:15 UTC 2010 - dmuhamedagic@novell.com + +- openais.spec changes: + + add %pre script which creates corosync.conf from openais.conf + (moved from corosync.patch) + + replace Conflicts: with Provides/Obsoletes + +------------------------------------------------------------------- +Mon Jan 18 16:44:46 UTC 2010 - dmuhamedagic@novell.com + +- source /etc/sysconfig/openais in the init script + +------------------------------------------------------------------- +Tue Dec 29 10:30:21 UTC 2009 - dmuhamedagic@novell.com + +- init script changes: + + replace killall with checkproc + + test if sbd/lrmadmin exist, because openais has no dependency + on cluster-glue + + +------------------------------------------------------------------- +Tue Dec 15 16:05:08 UTC 2009 - dmuhamedagic@novell.com + +- add suse specific init script +- fixed COROSYNC_DEFAULT_CONFIG_IFACE setting +- add rcopenais link + +------------------------------------------------------------------- +Tue Dec 8 13:42:27 UTC 2009 - "lmb@novell.com" + +- Update to 1.1.1. + +------------------------------------------------------------------- +Wed Nov 4 17:15:26 UTC 2009 - "lmb@novell.com" + +- Do not disable openais service on package update (bnc#549579). + +------------------------------------------------------------------- +Mon Oct 19 10:52:58 UTC 2009 - "lmb@novell.com" + +- Fix xend/xendomains versus openais init script ordering (bnc#547296). + +------------------------------------------------------------------- +Fri Jul 17 10:42:15 CEST 2009 - lmb@novell.com + +- Update to r2042: +- Dont segfault when ais user or group doesn't exist in the system. +- Avoid implicit declaration of schedwrk api usage. +- Re-instate r1959 as different fix is now upstream. +- openais-whitetank-shutdown-take2.patch: Fix shutdown sequencing. +- detect-pause-rhbz508128.patch: Add ability to detect process pause and + not implode the membership algorithm when this occurs. +- openais-cpg-join-leave-ordering.patch: Cpg synchronization patch for + conf change messages. + +------------------------------------------------------------------- +Wed Jul 8 23:00:00 CEST 2009 - lmb@suse.de + +- Revert r1959 to fix shutdown regression. + +------------------------------------------------------------------- +Wed Jul 8 09:45:00 CEST 2009 - lmb@suse.de + +- Update to revision 2034. +- Fix when dispatch has error condition to execute a put on the handle + as to not leak resources. +- A recent change introduced a bug fix to throw away incomplete messages + in the assembly algorithm. The algorithm depends on a global + variable, but instead that variable should be instanced per nodeid. +- Fix ppc64 ipc regression. +- Return ERR_SECURITY when invalid user connects to aisexec. +- Fix cpg segfault. +- Allow "broadcast: yes" option instead of mcastaddr to force use of + broadcast address. +- Allow rolling crypto upgrades between openais and corosync. +- Allow uidgid files for external users to specify their own users or + groups to be specified for ipc security allow. +- Fix race condition in cpg join/leave operations. +- Ensure ordering works properly for cpg. +- Fix a shared memory leak on whitetank that happens when an IPC client + disconnects. +- Add openais_shutdown to properly cleanup in condition of shutdown. +- Add assembly to free list when it is removed from a configuration + change as indicated by being in the left list. This has side effect + of clearing the assembly buffer the next time it is referenced from + the free list. This fixes a defect that stops forward processing of + the message streams because sync fails to finish when receiving a sync + message from a restarted processor because it throws away the message. + +------------------------------------------------------------------- +Tue Apr 21 14:55:00 CEST 2009 - lmb@suse.de + +- Fix crash due to a race condition in CPG (bnc#483878). + +------------------------------------------------------------------- +Fri Apr 3 13:57:14 CEST 2009 - abeekhof@suse.de + +- Chaneg the default value of join to 1s in openais.conf + +------------------------------------------------------------------- +Thu Apr 02 13:00:00 CEST 2009 - lmb@suse.de + +- Check whether sbd binary is already running before starting it. + +------------------------------------------------------------------- +Tue Mar 31 14:00:00 CEST 2009 - lmb@suse.de + +- Default to logging via logd for pacemaker. + +------------------------------------------------------------------- +Mon Mar 30 15:00:00 CEST 2009 - lmb@suse.de + +- Update source tarball to r1761: +- Keep multiple threads out of the aisexec service engines. calling whatdependson for head-i586 Old: ---- openais-dprintf.diff openais-else.diff openais-init.diff openais.tar.gz suse.diff New: ---- openais-1.1.2.tar.gz openais-suse-init.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openais.spec ++++++ --- /var/tmp/diff_new_pack.FKSkJ1/_old 2010-06-30 10:45:12.000000000 +0200 +++ /var/tmp/diff_new_pack.FKSkJ1/_new 2010-06-30 10:45:12.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package openais (Version 0.80.3) +# spec file for package openais (Version 1.1.2) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 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 @@ -15,35 +15,65 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild -%if 0%{?suse_version} -%define _libexecdir %{_libdir} -%endif -%define ais_uid 39 -%define ais_user ais -%if 0%{?fedora_version} -%define pkg_group System Environment/Base -%else -%define pkg_group Productivity/Clustering/HA -%endif Name: openais Summary: The OpenAIS Standards-Based Cluster Framework executive and APIs -Version: 0.80.3 -Release: 25 -License: BSD 3-clause (or similar) +Version: 1.1.2 +Release: 1 +License: BSD3c Group: Productivity/Clustering/HA Url: http://www.openais.org/ -Source: openais.tar.gz -Patch1: suse.diff -Patch2: openais-init.diff -Patch3: openais-else.diff -Patch4: openais-dprintf.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires(pre): /usr/sbin/useradd +Source0: http://www.osdl.org/downloads/openais-%{version}/openais-%{version}.tar.gz +Patch1: openais-suse-init.patch +# Runtime bits Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig +Requires: corosync +Requires: libopenais3 = %{version}-%{release} +# Setup/build bits +BuildRequires: libcorosync-devel +%define buildtrunk 0 +%{?_with_buildtrunk: %define buildtrunk 1} +%if %{buildtrunk} +BuildRequires: autoconf automake +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%prep +%setup -q -n openais-%{version} +%patch1 -p1 + +%build +%if %{buildtrunk} +./autogen.sh +%endif +%{configure} +make %{_smp_mflags} + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}%{_initrddir} +install -m 755 init/suse %{buildroot}%{_initrddir}/openais +%if 0%{?suse_version} +ln -sf ../../etc/init.d/openais %{buildroot}%{_sbindir}/rcopenais +%endif +mkdir -p %{buildroot}%{_sysconfdir}/ais +cat<<EOF > %{buildroot}%{_sysconfdir}/ais/openais.conf +# This configuration file is not used any more +# Please refer to %{_sysconfdir}/corosync/corosync.conf +EOF +## tree fixup +# drop static libs +rm -f %{buildroot}%{_libdir}/*.a +# drop docs and html docs for now +rm -rf %{buildroot}%{_docdir}/* +# the docdir is /usr/share/doc/<pkg> in the configuration +rm -rf %{buildroot}%{_datadir}/doc/* + +%clean +rm -rf %{buildroot} %description This package contains the openais executive, openais service handlers, @@ -72,14 +102,97 @@ Robert Peterson Abhijith Das -%package -n libopenais2 -License: BSD 3-clause (or similar) -Summary: The OpenAIS Standards-Based Cluster Framework executive and APIs +%pre +ais2coroconf() { +# rules: +# consensus > 1.2 * token + conf=$1 + filter=`mktemp` + awk ' + BEGIN{cons=0; tok=0} + $1=="token:"{tok=$2} + $1=="consensus:"{cons=$2} + $1=="timestamp:"{timestamp=$2} + END{ + if( cons>0 && tok>0 && 1.2*cons <= tok ) { + newcons = tok*1.2; + printf "$1==\"consensus:\"{$2=%d}\n",newcons + printf "WARN: consensus in corosync.conf adjusted from %d to %d\n",cons,newcons > "/dev/stderr" + } + if( timestamp == "on" ) { + printf "$1==\"timestamp:\"{$2=\"off\"}\n" + printf "WARN: timestamp in corosync.conf set to off\n" > "/dev/stderr" + } + } + ' $conf >> $filter + echo '{print}' >> $filter + awk -f $filter $conf + rm -f $filter +} +if [ -f %{_sysconfdir}/ais/openais.conf ]; then + mkdir -p %{_sysconfdir}/corosync + [ -f %{_sysconfdir}/ais/authkey -a ! -f %{_sysconfdir}/corosync/authkey ] && + cp -p %{_sysconfdir}/ais/authkey %{_sysconfdir}/corosync + [ -f %{_sysconfdir}/corosync/corosync.conf ] || + ais2coroconf %{_sysconfdir}/ais/openais.conf > %{_sysconfdir}/corosync/corosync.conf +fi + +%post +%{fillup_and_insserv -n openais} +# This code addresses bnc#549579 - a previous package version wrongly +# disabled openais in %postun, which this needs to work around: +if chkconfig -c openais; then + touch /var/run/start_open_ais_on_boot +fi + +%posttrans +if test -f /var/run/start_open_ais_on_boot; then + chkconfig --add openais + rm -f /var/run/start_open_ais_on_boot +fi + +%preun +%stop_on_removal openais + +%postun +%restart_on_update openais +%{insserv_cleanup} + +%files +%defattr(-,root,root,-) +%doc LICENSE README.amf +%dir %{_sysconfdir}/corosync +%dir %{_sysconfdir}/ais +%config(noreplace) %{_sysconfdir}/corosync/amf.conf.example +%config(missingok) %{_sysconfdir}/ais/openais.conf +%{_initrddir}/openais +%if 0%{?suse_version} +%{_sbindir}/rcopenais +%endif +%dir %{_libexecdir}/lcrso +%{_libexecdir}/lcrso/openaisserviceenable.lcrso +%{_libexecdir}/lcrso/service_amf.lcrso +%{_libexecdir}/lcrso/service_ckpt.lcrso +%{_libexecdir}/lcrso/service_clm.lcrso +%{_libexecdir}/lcrso/service_evt.lcrso +%{_libexecdir}/lcrso/service_lck.lcrso +%{_libexecdir}/lcrso/service_msg.lcrso +%{_libexecdir}/lcrso/service_tmr.lcrso +%{_mandir}/man8/openais_overview.8* +%{_mandir}/man5/openais.conf.5* +%{_mandir}/man5/amf.conf.5* +%{_sbindir}/aisexec +%{_sbindir}/openais-instantiate + +%package -n libopenais3 +License: BSD3c +Summary: The openais Standards-Based Cluster Framework libraries Group: Productivity/Clustering/HA +Obsoletes: libopenais2 +Conflicts: libopenais2 -%description -n libopenais2 -This package contains the openais executive, openais service handlers, -default configuration files and init script. +%description -n libopenais3 +This package contains openais libraries. @@ -104,12 +217,30 @@ Robert Peterson Abhijith Das +%files -n libopenais3 +%defattr(-,root,root,-) +%doc LICENSE +%{_libdir}/libSaAmf.so.* +%{_libdir}/libSaCkpt.so.* +%{_libdir}/libSaClm.so.* +%{_libdir}/libSaEvt.so.* +%{_libdir}/libSaLck.so.* +%{_libdir}/libSaMsg.so.* +%{_libdir}/libSaTmr.so.* + +%post -n libopenais3 -p /sbin/ldconfig + +%postun -n libopenais3 -p /sbin/ldconfig + %package -n libopenais-devel -License: BSD 3-clause (or similar) +License: BSD3c Summary: The openais Standards-Based Cluster Framework libraries Group: Development/Libraries/C and C++ -Requires: %{name} = %{version}-%{release} -Requires: libopenais2 = %{version}-%{release} +Requires: libopenais3 = %{version}-%{release} +Requires: pkgconfig +Provides: openais-devel = %{version} +Obsoletes: openais-devel < 0.92 +Conflicts: openais-devel < 0.92 %description -n libopenais-devel This package contains the libraries and include files used to develop @@ -138,127 +269,25 @@ Robert Peterson Abhijith Das -%prep -%setup -n openais -%patch1 -p1 -%patch2 -p1 -%patch3 -%patch4 - -%build -# This package failed when testing with -Wl,-as-needed being default. -# So we disable it here, if you want to retest, just delete this comment and the line below. -export SUSE_ASNEEDED=0 -# -O3 required for performance reasons -# So we get proper debug output, for now we don't compile with O3 -#CFLAGS="$(echo '%{optflags}' | sed -e 's/-O[0-9]*//') -O3" -#CFLAGS="$(echo '%{optflags}')" -make CFLAGS="$RPM_OPT_FLAGS" LCRSODIR=%{_libexecdir}/lcrso PREFIX=%{_prefix} OPENAIS_BUILD=DEBUG - -%install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LCRSODIR=%{_libexecdir}/lcrso STATICLIBS=NO OPENAIS_BUILD=DEBUG install -mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} -mkdir -p $RPM_BUILD_ROOT%{_initrddir} -install -m 644 CHANGELOG LICENSE SECURITY README.devmap README.amf \ - $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ -install -m 755 init/generic $RPM_BUILD_ROOT%{_initrddir}/openais -install -m 755 test/openais-cfgtool $RPM_BUILD_ROOT%{_sbindir} -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 -%if 0%{?suse_version} -ln -sf ../../etc/init.d/openais $RPM_BUILD_ROOT/%{_sbindir}/rcopenais -%endif - -%clean -rm -rf $RPM_BUILD_ROOT - -%pre -%if 0%{?fedora_version} -/usr/sbin/fedora-useradd %{ais_uid} -r -s /sbin/nologin -d '/' -M \ - -c 'openais Standards Based Cluster Framework' %{ais_user} &>/dev/null || : -%else -if - getent passwd %{ais_user} >/dev/null -then - : OK hacluster user already present -else - /usr/sbin/useradd -c "openais Standards Based Cluster Framework" \ - -r -d '/' -u %{ais_uid} %{ais_user} 2>/dev/null || : -fi -%endif - -%post -%if 0%{?suse_version} - %{fillup_and_insserv -n openais} -%else - /sbin/chkconfig --add openais || : -%endif - -%preun -%if 0%{?suse_version} - %stop_on_removal openais -%else -if [ $1 -eq 0 ]; then - %{_initrddir}/openais stop &>/dev/null || : -fi -%endif -/sbin/chkconfig --del openais || : - -%postun -%if 0%{?suse_version} - %restart_on_update openais - %{insserv_cleanup} -%else -[ "$1" -ge "1" ] && %{_initrddir}/openais condrestart &>/dev/null || : -%endif - -%post -n libopenais2 -p /sbin/ldconfig - -%postun -n libopenais2 -p /sbin/ldconfig - -%files -%defattr(-,root,root,-) -%dir %{_docdir}/%{name}-%{version} -%doc %{_docdir}/%{name}-%{version}/LICENSE -%doc %{_docdir}/%{name}-%{version}/SECURITY -%doc %{_docdir}/%{name}-%{version}/README.amf -%{_sbindir}/aisexec -%{_sbindir}/ais-keygen -%{_sbindir}/openais-cfgtool -%dir /etc/ais -%config(noreplace) /etc/ais/openais.conf -%config(noreplace) /etc/ais/amf.conf -%config /etc/ld.so.conf.d/openais-*.conf -%{_initrddir}/openais -%if 0%{?suse_version} -%{_sbindir}/rcopenais -%endif -%dir %{_libexecdir}/lcrso -%{_libexecdir}/lcrso/*.lcrso -%{_mandir}/man8/*.8* -%{_mandir}/man5/openais.conf.5* - -%files -n libopenais2 -%defattr(-,root,root,-) -%dir %{_libdir}/openais -%{_libdir}/openais/lib*.so.* - %files -n libopenais-devel %defattr(-,root,root,-) -%dir %{_docdir}/%{name}-%{version} -%doc %{_docdir}/%{name}-%{version}/CHANGELOG -%doc %{_docdir}/%{name}-%{version}/README.devmap +%doc LICENSE %dir %{_includedir}/openais/ -%dir %{_includedir}/openais/lcr/ -%dir %{_includedir}/openais/totem/ -%dir %{_includedir}/openais/service -%{_libdir}/openais/lib*.so -%{_includedir}/openais/*.h -%{_includedir}/openais/lcr/*.h -%{_includedir}/openais/totem/*.h -%{_includedir}/openais/service/*.h -%{_mandir}/man3/cpg_*.3* -%{_mandir}/man3/evs_*.3* +%{_includedir}/openais/saAis.h +%{_includedir}/openais/saAmf.h +%{_includedir}/openais/saCkpt.h +%{_includedir}/openais/saClm.h +%{_includedir}/openais/saEvt.h +%{_includedir}/openais/saLck.h +%{_includedir}/openais/saMsg.h +%{_includedir}/openais/saTmr.h +%{_libdir}/libSaAmf.so +%{_libdir}/libSaCkpt.so +%{_libdir}/libSaClm.so +%{_libdir}/libSaEvt.so +%{_libdir}/libSaLck.so +%{_libdir}/libSaMsg.so +%{_libdir}/libSaTmr.so +%{_libdir}/pkgconfig/*.pc %changelog ++++++ openais-suse-init.patch ++++++ diff -urN openais-1.1.2.orig//init/Makefile.am openais-1.1.2/init/Makefile.am --- openais-1.1.2.orig//init/Makefile.am 2010-01-26 18:35:03.000000000 +0100 +++ openais-1.1.2/init/Makefile.am 2010-02-09 22:41:29.091663000 +0100 @@ -34,7 +34,7 @@ MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = generic.in +EXTRA_DIST = generic.in suse target_INIT = generic diff -urN openais-1.1.2.orig//init/suse openais-1.1.2/init/suse --- openais-1.1.2.orig//init/suse 1970-01-01 01:00:00.000000000 +0100 +++ openais-1.1.2/init/suse 2010-02-09 22:41:12.278197000 +0100 @@ -0,0 +1,210 @@ +#!/bin/sh +# +# Corosync daemon init script for LSB-compliant Linux distributions. +# +# openais Start the openais (corosync) cluster service +# +# chkconfig: - 20 20 +# processname: corosync +# pidfile: /var/run/corosync.pid +# description: Corosync/OpenAIS +### BEGIN INIT INFO +# Description: Manages the openais cluster services. +# +# Short-Description: openais cluster services. +# Provides: openais +# Required-Start: $network +# Should-Start: $syslog sshd drbd $named $remote_fs logd xendomains xend iscsi +# Required-Stop: $network +# Default-Start: 3 5 +# Default-Stop: 0 6 +# Should-Stop: logd drbd $syslog $named xendomains xend iscsi +### END INIT INFO + +do_force=0 +prog="corosync" +exec="/usr/sbin/corosync" +lockfile="/var/lock/subsys/$prog" + +OPENAIS_SYSCONFIG=/etc/sysconfig/openais +if [ -f $OPENAIS_SYSCONFIG ]; then + . $OPENAIS_SYSCONFIG +fi +PACEMAKER_SYSCONFIG=/etc/sysconfig/pacemaker +if [ -f $PACEMAKER_SYSCONFIG ]; then + . $PACEMAKER_SYSCONFIG +fi +LRMADMIN="/usr/sbin/lrmadmin" + +SBD_CONFIG=/etc/sysconfig/sbd +SBD_BIN="/usr/sbin/sbd" +if [ -f $SBD_CONFIG ]; then + . $SBD_CONFIG +fi + +[ -x "$exec" ] || exit 0 + +StartSBD() { + test -x $SBD_BIN || return + if [ -n "$SBD_DEVICE" ]; then + if ! pidofproc $SBD_BIN ; then + echo -n "Starting SBD - " + if ! $SBD_BIN -d $SBD_DEVICE -D $SBD_OPTS watch ; then + echo "SBD failed to start; aborting." + exit 1 + fi + fi + fi +} + +StopSBD() { + test -x $SBD_BIN || return + if [ -n "$SBD_DEVICE" ]; then + echo -n "Stopping SBD - " + if ! $SBD_BIN -d $SBD_DEVICE -D $SBD_OPTS message LOCAL exit ; then + echo "SBD failed to stop; aborting." + exit 1 + fi + fi +} + +wait_for_lrmd() { + local maxwait=30 + local i=0 + while [ $i -lt $maxwait ]; do + $LRMADMIN -C > /dev/null 2>&1 && + break + sleep 1 + i=$(($i+1)) + done + if [ $i -lt $maxwait ]; then + return 0 + else + echo "lrmd apparently didn't start" + return 1 + fi +} +set_lrmd_options() { + test -x $LRMADMIN || return + if [ -n "$LRMD_MAX_CHILDREN" ]; then + wait_for_lrmd || return + $LRMADMIN -p max-children $LRMD_MAX_CHILDREN + fi +} + +internal_status() { + checkproc $exec > /dev/null 2>&1 + return $? +} + +status() { + if internal_status; then + echo "Running" + return 0 + else + echo "Stopped" + return 7 + fi +} + +start() { + export COROSYNC_DEFAULT_CONFIG_IFACE + : ${COROSYNC_DEFAULT_CONFIG_IFACE="openaisserviceenableexperimental:corosync_parser"} + echo -n $"Starting OpenAIS/Corosync daemon ($prog): " + if ! internal_status; then + StartSBD + echo -n "starting... " + startproc $exec + fi + + sleep 2 # give it time to fail... $? isn't definitive + + if internal_status; then + set_lrmd_options + echo "OK" + touch "$lockfile" + return 0 + fi + + echo "Failed" + return 1 +} + +do_force=0 +do_forever=1 + +stop() { + echo -n $"Stopping OpenAIS/Corosync daemon ($prog): " + + c_pid="`pidofproc $exec`" + if [ -n "$c_pid" ]; then + kill -TERM $c_pid + fi + + if [ $do_forever = 0 ]; then + for i in 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20; do + if internal_status; then + sleep 2 + echo -n "." + else + rm -f "$lockfile" + StopSBD + echo "OK" + return 0 + fi + done + + if [ $do_force = 1 ]; then + echo -n "Escalating... " + kill -KILL $c_pid + sleep 5 + + if ! internal_status; then + rm -f "$lockfile" + echo "OK" + return 0 + fi + fi + + echo "Failed" + return 1 + fi + + while internal_status; do + sleep 1 + echo -n "." + done + + StopSBD + + rm -f "$lockfile" + echo "OK" + return 0 +} + +restart() { + stop + start +} + +case "$1" in + start|stop|restart) + $1 + ;; + force-stop) + do_force=1 + stop + ;; + reload|force-reload) + restart + ;; + condrestart|try-restart) + [ ! -f "$lockfile" ] || restart + ;; + status) + status $prog + ;; + *) + echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|force-stop|status}" + exit 2 +esac ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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