debian/0000775000000000000000000000000012253516610007171 5ustar debian/resource-agents-dev.install0000664000000000000000000000004511625167224014447 0ustar usr/include/heartbeat/agent_config.h debian/resource-agents.install0000664000000000000000000000760112035005236013666 0ustar etc/ha.d/shellfuncs usr/lib/heartbeat/* usr/lib/ocf/lib/heartbeat/* usr/lib/ocf/resource.d/heartbeat/.ocf-binaries usr/lib/ocf/resource.d/heartbeat/.ocf-directories usr/lib/ocf/resource.d/heartbeat/.ocf-returncodes usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs usr/lib/ocf/resource.d/heartbeat/AoEtarget usr/lib/ocf/resource.d/heartbeat/AudibleAlarm usr/lib/ocf/resource.d/heartbeat/CTDB usr/lib/ocf/resource.d/heartbeat/ClusterMon usr/lib/ocf/resource.d/heartbeat/Delay usr/lib/ocf/resource.d/heartbeat/Dummy usr/lib/ocf/resource.d/heartbeat/EvmsSCC usr/lib/ocf/resource.d/heartbeat/Evmsd usr/lib/ocf/resource.d/heartbeat/Filesystem usr/lib/ocf/resource.d/heartbeat/ICP usr/lib/ocf/resource.d/heartbeat/IPaddr usr/lib/ocf/resource.d/heartbeat/IPaddr2 usr/lib/ocf/resource.d/heartbeat/IPsrcaddr usr/lib/ocf/resource.d/heartbeat/IPv6addr usr/lib/ocf/resource.d/heartbeat/LVM usr/lib/ocf/resource.d/heartbeat/LinuxSCSI usr/lib/ocf/resource.d/heartbeat/MailTo usr/lib/ocf/resource.d/heartbeat/ManageRAID usr/lib/ocf/resource.d/heartbeat/ManageVE usr/lib/ocf/resource.d/heartbeat/Pure-FTPd usr/lib/ocf/resource.d/heartbeat/Raid1 usr/lib/ocf/resource.d/heartbeat/Route usr/lib/ocf/resource.d/heartbeat/SAPDatabase usr/lib/ocf/resource.d/heartbeat/SAPInstance usr/lib/ocf/resource.d/heartbeat/SendArp usr/lib/ocf/resource.d/heartbeat/ServeRAID usr/lib/ocf/resource.d/heartbeat/SphinxSearchDaemon usr/lib/ocf/resource.d/heartbeat/Squid 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 usr/lib/ocf/resource.d/heartbeat/Xen usr/lib/ocf/resource.d/heartbeat/Xinetd usr/lib/ocf/resource.d/heartbeat/anything usr/lib/ocf/resource.d/heartbeat/apache usr/lib/ocf/resource.d/heartbeat/asterisk usr/lib/ocf/resource.d/heartbeat/conntrackd usr/lib/ocf/resource.d/heartbeat/db2 usr/lib/ocf/resource.d/heartbeat/drbd usr/lib/ocf/resource.d/heartbeat/eDir88 usr/lib/ocf/resource.d/heartbeat/ethmonitor usr/lib/ocf/resource.d/heartbeat/exportfs usr/lib/ocf/resource.d/heartbeat/fio usr/lib/ocf/resource.d/heartbeat/iSCSILogicalUnit usr/lib/ocf/resource.d/heartbeat/iSCSITarget usr/lib/ocf/resource.d/heartbeat/ids usr/lib/ocf/resource.d/heartbeat/iscsi usr/lib/ocf/resource.d/heartbeat/jboss usr/lib/ocf/resource.d/heartbeat/ldirectord usr/lib/ocf/resource.d/heartbeat/lxc usr/lib/ocf/resource.d/heartbeat/mysql usr/lib/ocf/resource.d/heartbeat/mysql-proxy usr/lib/ocf/resource.d/heartbeat/nfsserver usr/lib/ocf/resource.d/heartbeat/nginx usr/lib/ocf/resource.d/heartbeat/oracle usr/lib/ocf/resource.d/heartbeat/oralsnr usr/lib/ocf/resource.d/heartbeat/pgsql usr/lib/ocf/resource.d/heartbeat/pingd usr/lib/ocf/resource.d/heartbeat/portblock usr/lib/ocf/resource.d/heartbeat/postfix usr/lib/ocf/resource.d/heartbeat/proftpd usr/lib/ocf/resource.d/heartbeat/rsyncd usr/lib/ocf/resource.d/heartbeat/scsi2reservation usr/lib/ocf/resource.d/heartbeat/sfex usr/lib/ocf/resource.d/heartbeat/symlink usr/lib/ocf/resource.d/heartbeat/syslog-ng usr/lib/ocf/resource.d/heartbeat/tomcat usr/lib/ocf/resource.d/heartbeat/vmware usr/lib/ocf/resource.d/redhat usr/sbin/ocf-tester usr/sbin/ocft usr/sbin/sfex_init usr/sbin/sfex_stat usr/share/cluster/* usr/share/doc/resource-agents/* usr/share/man/man7/* usr/share/man/man8/ocf-tester.8 usr/share/man/man8/sfex_init.8 usr/share/resource-agents/* usr/lib/ocf/resource.d/heartbeat/slapd usr/lib/ocf/resource.d/heartbeat/varnish usr/lib/ocf/resource.d/heartbeat/named usr/lib/ocf/resource.d/heartbeat/pound usr/lib/ocf/resource.d/heartbeat/rsyslog usr/lib/ocf/resource.d/heartbeat/dhcpd debian/clean0000664000000000000000000000053711503526530010202 0ustar compile INSTALL install-sh aclocal.m4 Makefile.in config.guess config.sub missing configure depcomp ldirectord/Makefile.in ldirectord/init.d/Makefile.in ldirectord/OCF/Makefile.in ldirectord/logrotate.d/Makefile.in doc/Makefile.in include/config.h.in heartbeat/Makefile.in tools/Makefile.in libltdl.tar libtool.m4 ltdl.m4 autoconf automake autoheader debian/source/0000775000000000000000000000000011503526530010470 5ustar debian/source/format0000664000000000000000000000001411503526530011676 0ustar 3.0 (quilt) debian/copyright0000664000000000000000000000722311650013771011130 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: resource-agents Source: https://github.com/ClusterLabs/resource-agents Files: debian/* Copyright: 2011 Andres Rodriguez License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: * Copyright: 1998-2010, Akamatsu Hiroshi 1998-2010, Alan Robertson 1998-2010, Andrew Beekhof 1998-2010, Christian Rishoj 1998-2010, Daiki Matsuda 1998-2010, David Lee 1998-2010, Dejan Muhamedagic 1998-2010, Dominik Klein 1998-2010, Florian Haas 1998-2010, Hideo Yamauchi 1998-2010, Huang Zhen 1998-2010, Jean-Francois Larvoire 1998-2010, Keisuke MORI 1998-2010, Lars Marowsky-Bree 1998-2010, Matthew Soffen 1998-2010, Michael Schwartzkopff 1998-2010, Nakahira Kazutomo 1998-2010, Philipp Kolmann 1998-2010, Raoul Bhatia 1998-2010, Ron Terry 1998-2010, Sebastian Reitenbach 1998-2010, Serge Dubrouski 1998-2010, Simon Horman 1998-2010, Stephan Berlet License: GPL Files: heartbeat/shellfuncs.in Copyright: Alan Robertson License: LGPL Files: heartbeat/ocf-shellfuncs.in Copyright: Copyright (c) 2004 SUSE LINUX AG, Lars Marowsky-Brée License: LGPL Files: heartbeat/ocf-returncodes.in Copyright: Copyright (c) 2004 SUSE LINUX AG, Andrew Beekhof License: LGPL Files: heartbeat/scsi2reservation Copyright: hxinwei@gmail.com License: GPL-2 Files: rgmanager/src/resources/* Copyright: Copyright (C) 1997-2003 Sistina Software, Inc. All rights reserved. Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. License: GPL-2+ Files: rgmanager/src/resources/ASEHAagent.sh: Copyright: Copyright 2007 Jian-ping Hui Copyright (C) - 2007, Sybase, Inc. License: GPL-2 Files: rgmanager/src/resources/clusterfs.sh: Copyright: Copyright (C) 2000 Mission Critical Linux Copyright (C) 2002-2008 Red Hat, Inc. All rights reserved. License: GPL-2+ Files: rgmanager/src/resources/ocf-shellfuncs: Copyright: Copyright (C) 2004 SUSE LINUX AG, Lars Marowsky-Bree. All Rights Reserved. License: GPL Files: rgmanager/src/resources/SAPDatabase: Copyright: Copyright (C) 2006, 2007 Alexander Krauth License: GPL Files: rgmanager/src/resources/SAPInstance: Copyright: Copyright (C) 2006, 2007 Alexander Krauth License: GPL debian/ldirectord.init0000664000000000000000000000207611503526530012215 0ustar #!/bin/sh # ### BEGIN INIT INFO # Short-Description: Monitor virtual services provided by LVS. # Provides: ldirectord # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO # # Author: Horms # # Debian init script for ldirectord # NAME=ldirectord DAEMON="/usr/sbin/$NAME" CONFIG="/etc/default/$NAME" test -x $DAEMON || exit 0 test -x /var/lock/subsys || mkdir -p /var/lock/subsys . /lib/lsb/init-functions CONFIG_FILE="" [ -f "$CONFIG" ] && . "$CONFIG" CONFIG_FILE="${CONFIG_FILE:=/etc/ldirectord.cf}" test -f ${CONFIG_FILE} RC=$? if [ $RC -ne 0 ] ; then log_warning_msg "No configuration file found, doing nothing." exit 0 fi case "$1" in start|stop|restart|try-restart|status|reload|force-reload) log_daemon_msg "Running $NAME" "$1" exec "$DAEMON" "$CONFIG_FILE" $1 RC=$? log_end_msg $RC exit $RC ;; *) echo "Usage: /etc/init.d/$NAME" \ "{start|stop|restart|try-restart|status|reload|force-reload}" >&2 exit 1 ;; esac debian/compat0000664000000000000000000000000211503526530010366 0ustar 7 debian/ldirectord.install0000664000000000000000000000022611650015455012715 0ustar usr/sbin/ldirectord etc/ha.d/resource.d/ldirectord etc/logrotate.d/ldirectord etc/init.d/ldirectord usr/share/doc/ldirectord/examples/ldirectord.cf debian/ldirectord.manpages0000664000000000000000000000005411503526530013037 0ustar debian/tmp/usr/share/man/man8/ldirectord.8 debian/changelog0000664000000000000000000002605712253516450011057 0ustar resource-agents (1:3.9.3+git20121009-3ubuntu2) trusty; urgency=medium * debian/patches/configure-order.patch: Move AM_INIT_AUTOMAKE immediately after AC_INIT to fix FTBFS with new autoconf. -- William Grant Mon, 16 Dec 2013 17:25:54 +1100 resource-agents (1:3.9.3+git20121009-3ubuntu1) raring; urgency=low * Merge from Debian unstable. Remaining changes: - debian/control: + add conflicts/replaces for ldirectord. + add ubuntu specific Conflicts/Replaces to ensure packages are installable and upgrades go smoothly. * debian/patches: - pgsql-fix_bashism.patch: Drop. Applied upstream. - apache-var-run.patch: Drop. Applied upstream. - vgchange-monitor.patch: Drop. Applied upstream. -- Andres Rodriguez Wed, 23 Jan 2013 08:58:37 -0500 resource-agents (1:3.9.3+git20121009-3) unstable; urgency=low * Fix the previous upload by including the proper patch this time. -- Martin Loschwitz Thu, 22 Nov 2012 10:19:16 +0000 resource-agents (1:3.9.3+git20121009-2) unstable; urgency=low * debian/patches/fix-gethostinfo-v2.patch: Applied a patch by Zang MingJie, edited by Ruben Laban, to fix a problem related to IPv6 in ldirectord (Closes: #675913) -- Martin Loschwitz Thu, 22 Nov 2012 09:33:56 +0000 resource-agents (1:3.9.3+git20121009-1) unstable; urgency=low * New upstream version * debian/patches/01_docbook_patch.patch: Refactored for new release * debian/patches/02_spelling_fixes.patch.new: Refatored for new release * debian/control: Bumped Standards-Version to 3.9.3 -- Martin Loschwitz Tue, 09 Oct 2012 11:16:59 +0000 resource-agents (1:3.9.2-5ubuntu6) quantal; urgency=low [ Ante Karamatic ] * debian/patches/apache-var-run.patch: - upstream commit 0c128518d2 - apache OCF doesn't create /var/run/apache2 before starting - (LP: #980180) -- Andres Rodriguez Mon, 11 Jun 2012 10:27:25 -0400 resource-agents (1:3.9.2-5ubuntu5) quantal; urgency=low * debian/patches/vgchange-monitor.patch: - apply two upstream commits: + 02c72cf9 + 9dd12940 - activating clustered VGs requires enabled monitoring - (LP: #988984) -- Ante Karamatic Thu, 26 Apr 2012 09:06:57 +0200 resource-agents (1:3.9.2-5ubuntu4) precise; urgency=low * debian/control: Use correct version for Conflicts/Replaces to not fail on upgrades. (LP: #983490) -- Andres Rodriguez Mon, 16 Apr 2012 17:37:32 -0400 resource-agents (1:3.9.2-5ubuntu3) precise; urgency=low * debian/patches/pgsql-fix_bashism.patch: Cherry-picked from upstream, fixes a bashism in pgsql RA that causes failures /w dash. (LP: #957913) -- Adam Gandelman Mon, 02 Apr 2012 10:35:42 -0700 resource-agents (1:3.9.2-5ubuntu2) precise; urgency=low * debian/control: Re-add ubuntu specific Conflicts/Replaces to ensure things are installable and upgrades go smoothly. -- Andres Rodriguez Mon, 05 Dec 2011 06:04:50 -0500 resource-agents (1:3.9.2-5ubuntu1) precise; urgency=low * Merge from debian unstable (LP: #891248). Remaining changes: - debian/control: add conflicts/replaces for ldirectord. -- Andres Rodriguez Wed, 16 Nov 2011 12:02:19 -0500 resource-agents (1:3.9.2-5) unstable; urgency=high * debian/control: Fix the Conflicts and Replaces lines of resource-agents to make sure that cluster-agents and resource-agents are mutually exclusive. Setting the urgency to high because this bug keeps people from running the whole clusterstack (Closes: #646110) * debian/patches/ocf-asterisk: Include the Asterisk PBX OCF resource agent written by Florian Haas, Andreas Kurz and me, sponsored by hastexo -- Martin Loschwitz Tue, 15 Nov 2011 17:14:18 +0000 resource-agents (1:3.9.2-4ubuntu1) precise; urgency=low * Resync from debian unstable (LP: #882097) * debian/control: - rgmanager conflicts/replaces to Ubuntu versions. - add conflicts/replaces for ldirectord. -- Andres Rodriguez Wed, 26 Oct 2011 11:35:07 -0400 resource-agents (1:3.9.2-4) unstable; urgency=low * Adopted numerous changes from the Ubuntu packages, implemented by Andres Rodriguez to make co-maintaining these packages in Ubuntu and Debian a bit easier. -- Martin Loschwitz Thu, 20 Oct 2011 12:10:13 +0000 resource-agents (1:3.9.2-3) unstable; urgency=low * debian/rules: Remove /usr/share/cluster/drbd.metadata from the final resource-agents package as it conflicts with drbd8-utils, too. Bollocks! (Closes: #639260) -- Martin Loschwitz Fri, 26 Aug 2011 12:43:41 +0000 resource-agents (1:3.9.2-2) unstable; urgency=low * Remove the RHCS DRBD resource agent (/usr/share/cluster/drbd.sh) so that this package does not conflict with drbd8-utils (Closes: #639260) * Add Conflicts for current versions of rgmanager -- versions of rgmanager newer than the one currently in Debian will fix the problem, but right now, there is no other way to deal with this (Closes: #639274) -- Martin Loschwitz Fri, 26 Aug 2011 06:03:45 +0000 resource-agents (1:3.9.2-1) unstable; urgency=low * Package rename due to restructuring from upstream * Added resource-agents-dev package to hold the important header file * New upstream release from new repository * Updated to new Policy version, no changes necessary * Adapt patches to work with the new upstream version -- Martin Loschwitz Wed, 24 Aug 2011 09:32:00 +0000 cluster-agents (1:1.0.3-4) unstable; urgency=low * Use correct paths on Debian/GNU Linux in MySQL resource agent (Closes: #608274) * Add build dependency on python - Fixes build failure on both unstable and testing -- Simon Horman Fri, 04 Feb 2011 07:46:13 +0900 cluster-agents (1:1.0.3-3.1) unstable; urgency=low * Non-maintainer upload. * debian/patches - (CVE-*): New patch. Fix CVE-2010-3389 insecure library loading using LD_LIBRARY_PATH. (important, security; Closes: #598549). -- Jari Aalto Tue, 19 Oct 2010 13:35:00 +0300 cluster-agents (1:1.0.3-3) unstable; urgency=low * Add build dependency on docbook-xml. (Closes: #579623) -- Frederik Schüler Mon, 03 May 2010 20:00:49 +0200 cluster-agents (1:1.0.3-2) unstable; urgency=low * Adopting patch from Andres Rodriguez and actually include it. -- Martin Loschwitz Fri, 16 Apr 2010 06:44:40 +0000 cluster-agents (1:1.0.3-1) unstable; urgency=low * Update to new upstream version 1.0.3 * Include example configuration file provided by Michael Schwartzkopff (Closes: #577575) * Add default file for ldirectord and patch init file to use it (Closes: #577572, #577574) -- Martin Loschwitz Fri, 16 Apr 2010 05:57:16 +0000 cluster-agents (1:1.0.2+hg1712-1) unstable; urgency=low * New upstream Mercurial checkout * Prepare for unstable upload and actually do it * Include files added by upstream in cluster-agents -- Martin Loschwitz Tue, 30 Mar 2010 06:57:42 +0000 cluster-agents (1:1.0.2+hg1702-1) unstable; urgency=low * New package revision prepared for upload to unstable. * Update debian/copyright: list LGPL and GPL version 2 components. * ldirectord: check for a config file in initscript, and do nothing if it is not present. -- Frederik Schüler Fri, 26 Mar 2010 12:23:40 +0100 cluster-agents (1:1.0.2+hg1686-1) unstable; urgency=low * New package revision prepared for upload to unstable. * Install ldirector.8 manpage. * Drop unused lintian overrides. -- Frederik Schüler Fri, 12 Mar 2010 12:01:30 +0100 cluster-agents (1:1.0.2+hg1657-2) unstable; urgency=low [ Martin Loschwitz ] * Update the copyright-file to be more appropriate and up to date. -- Martin Loschwitz Wed, 03 Mar 2010 08:40:00 +0100 cluster-agents (1:1.0.2+hg1657-1) unstable; urgency=low [ Martin Loschwitz ] * New package revision prepared for upload to unstable. -- Martin Loschwitz Wed, 02 Mar 2010 14:21:00 +0100 cluster-agents (1:1.0.2-2) UNRELEASED; urgency=low [ Simon Horman ] * Add build dependency on xsltproc. * Use dh_installinit to install the debian ldirectord init script. * Do not pass --sourcedir to dh_install. [ Frederik Schüler ] * Use source version 3.0 instead of dpatch, drop dependency accordingly. * Bump standards version to 3.8.4, no changes needed. * Install lintian override file. * Install manpages. * Really clean up in clean target. * debian/control: drop duplicate Section: field. -- Frederik Schüler Fri, 26 Feb 2010 19:33:36 +0100 cluster-agents (1:1.0.2-1) unstable; urgency=low * New upstream release. -- Martin Loschwitz Wed, 03 Feb 2010 08:05:00 +0100 cluster-agents (1:1.0.2~rc2a+hg20100127-0test1) unstable; urgency=low * Incorporating a whole lot of changes done by Ante Karamatic to these packages; thank you very much indeed! * New upstream version taken from linux-ha.org repository * Fix dependencies for ldirectord and include var/lock/subsys/ldirectord -- Martin Loschwitz Wed, 27 Jan 2010 01:24:00 +0100 cluster-agents (1:1.0.2~rc2a-0ubuntu0ppa5) lucid; urgency=low * Add libglib2.0-dev to build-deps -- Ante Karamatic Tue, 05 Jan 2010 18:19:31 +0100 cluster-agents (1:1.0.2~rc2a-0ubuntu0ppa4) lucid; urgency=low * Add pkg-config to build-deps -- Ante Karamatic Tue, 05 Jan 2010 17:03:35 +0000 cluster-agents (1:1.0.2~rc2a-0ubuntu0ppa3) lucid; urgency=low * Fix typo in build-depends -- Ante Karamatic Tue, 05 Jan 2010 14:15:44 +0000 cluster-agents (1:1.0.2~rc2a-0ubuntu0ppa2) lucid; urgency=low * Added autoconf, automake and libtool to build-deps -- Ante Karamatic Mon, 04 Jan 2010 16:11:41 +0000 cluster-agents (1:1.0.2~rc2a-0ubuntu0ppa1) lucid; urgency=low * New upstream version * Added dpatch, docbook-xsl and xsltproc to build-deps * debian/patches/01_local_docbook: - use local docbook-xsl -- Ante Karamatic Mon, 04 Jan 2010 15:55:14 +0000 cluster-agents (1:1.0+hg20091103-1~bpo50+1) lenny-backports; urgency=low * Rebuild for lenny-backports. -- Martin Loschwitz Tue, 03 Nov 2009 12:10:06 +0000 cluster-agents (1:1.0+hg20091103-1) unstable; urgency=low * Updated upstream tarball to fetch some important updates -- Martin Loschwitz Tue, 03 Nov 2009 12:07:35 +0000 cluster-agents (1:1.0+hg20091012-1) unstable; urgency=low * New upstream version -- Martin Loschwitz Mon, 12 Oct 2009 17:10:00 +0200 cluster-agents (1:1.0+hg20090915-1) unstable; urgency=low * Initial release of packages for the cluster agents collection -- Martin Loschwitz Tue, 15 Sep 2009 09:56:16 +0000 debian/resource-agents.manpages0000664000000000000000000000653511650005046014021 0ustar debian/tmp/usr/share/man/man7/ocf_heartbeat_mysql-proxy.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_IPsrcaddr.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_nfsserver.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_VIPArip.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_SAPInstance.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_portblock.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_proftpd.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_scsi2reservation.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_AoEtarget.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Xen.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Delay.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_WinPopup.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_eDir88.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Filesystem.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_IPv6addr.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_SAPDatabase.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_WAS.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_vmware.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_SysInfo.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Raid1.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_syslog-ng.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_pgsql.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_ManageVE.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Stateful.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_LinuxSCSI.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_LVM.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_postfix.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_pingd.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_MailTo.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_IPaddr.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_iSCSILogicalUnit.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_iscsi.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_ServeRAID.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_rsyncd.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_ids.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Xinetd.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_ClusterMon.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_drbd.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_IPaddr2.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_jboss.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_SendArp.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Dummy.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_mysql.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_ManageRAID.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_iSCSITarget.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_ICP.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_oracle.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_oralsnr.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Route.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Evmsd.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_db2.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_WAS6.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_tomcat.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_AudibleAlarm.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_anything.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_CTDB.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_SphinxSearchDaemon.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_apache.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_EvmsSCC.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Pure-FTPd.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_sfex.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_Squid.7 debian/tmp/usr/share/man/man7/ocf_heartbeat_VirtualDomain.7 debian/resource-agents.lintian-overrides0000664000000000000000000000025411600202517015651 0ustar resource-agents: binary-without-manpage usr/sbin/ocft resource-agents: binary-without-manpage usr/sbin/sfex_init resource-agents: binary-without-manpage usr/sbin/sfex_stat debian/control0000664000000000000000000000541512077767566010627 0ustar Source: resource-agents Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian HA Maintainers Uploaders: Martin Loschwitz , Anibal Monsalve Salazar , Simon Horman , Frederik Schüler Build-Depends: autoconf, automake, autotools-dev, cluster-glue-dev, debhelper (>= 7.0.50~), docbook-xml, docbook-xsl, libcluster-glue-dev, libglib2.0-dev, libnet1-dev, libtool, pkg-config, python, xsltproc Standards-Version: 3.9.3 Homepage: https://github.com/ClusterLabs/resource-agents XS-Python-Version: current Package: resource-agents Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, cluster-glue, python Replaces: cluster-agents (<= 1:1.0.4-0ubuntu2), rgmanager (<= 3.0.12-2ubuntu4) Conflicts: cluster-agents (<= 1:1.0.4-0ubuntu2), rgmanager (<= 3.0.12-2ubuntu4) Description: Cluster Resource Agents The Cluster Resource Agents are a set of scripts to interface with several services to operate in a High Availability environment for both Pacemaker and rgmanager resource managers. Package: resource-agents-dev Architecture: any Depends: resource-agents (= ${binary:Version}), ${misc:Depends} Description: Cluster Resource Agents Development files The Cluster Resource Agents are a set of scripts to interface with several services to operate in a High Availability environment for both Pacemaker and rgmanager resource managers. . This package contains the development header files. Package: ldirectord Priority: extra Architecture: all Depends: ipvsadm, libauthen-radius-perl, libcrypt-ssleay-perl, libdbi-perl, libdigest-hmac-perl, libdigest-md5-perl, libmail-pop3client-perl, libmailtools-perl, libnet-dns-perl, libnet-imap-simple-perl, libnet-imap-simple-ssl-perl, libnet-ldap-perl, libnet-perl, libsocket6-perl, libwww-perl, ${misc:Depends}, ${perl:Depends} Recommends: logrotate, rsyslog | system-log-daemon Conflicts: ldirectord (<= 1.0.4-0ubuntu2), libpils0 (<< 2.0.8-3), libstonith0 (<< 2.0.8-3), stonith (<< 2.0.8-3) Replaces: ldirectord (<= 1.0.4-0ubuntu2) XB-Python-Version: ${python:Versions} Description: Monitors virtual services provided by LVS ldirectord is a stand-alone daemon to monitor services of real for virtual services provided by The Linux Virtual Server (LVS). and works with Linux-HA's heartbeat package. debian/ldirectord.cf.example0000664000000000000000000001700311503526530013270 0ustar # # Sample ldirectord configuration file to configure various virtual services. # # Ldirectord will connect to each real server once per second and request # /index.html. If the data returned by the server does not contain the # string "Test Message" then the test fails and the real server will be # taken out of the available pool. The real server will be added back into # the pool once the test succeeds. If all real servers are removed from the # pool then localhost:80 is added to the pool as a fallback measure. # Global Directives checktimeout=3 checkinterval=1 #fallback=127.0.0.1:80 autoreload=yes #logfile="/var/log/ldirectord.log" #logfile="local0" #emailalert="admin@x.y.z" #emailalertfreq=3600 #emailalertstatus=all quiescent=yes # Sample for an http virtual service virtual=192.168.6.240:80 real=192.168.6.2:80 gate real=192.168.6.3:80 gate real=192.168.6.6:80 gate fallback=127.0.0.1:80 gate service=http request="index.html" receive="Test Page" virtualhost=some.domain.com.au scheduler=rr #persistent=600 #netmask=255.255.255.255 protocol=tcp checktype=negotiate checkport=80 request="index.html" receive="Test Page" virtualhost=www.x.y.z # Sample configuration for a fwmark based service For an explination of # fwmark see the ipvsadm(8) man page #virtual=1 # real=192.168.6.2 gate # real=192.168.6.3 gate # real=192.168.6.6 gate # fallback=127.0.0.1:80 gate # service=http # scheduler=rr # #persistent=600 # #netmask=255.255.255.255 # protocol=fwm # checktype=negotiate # checkport=80 # request="index.html" # receive="Test Page" # virtualhost=x.y.z # Sample configuration for a service using a range of real servers # and a single real server for a virtual service #virtual=192.168.6.240:80 # real=192.168.6.2->192.168.6.7:80 gate # real=192.168.6.32:80 gate # fallback=127.0.0.1:80 gate # service=http # scheduler=rr # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # checkport=80 # request="index.html" # receive="Test Page" # virtualhost=x.y.z #Sample configuration for an https virtual service. #Fallback setting overides global #virtual=192.168.6.240:443 # real=192.168.16.3:443 masq # real=192.168.16.5:443 masq # fallback=127.0.0.1:443 # service=https # scheduler=rr # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # checkport=443 # request="index.html" # receive="Test Page" # virtualhost=x.y.z #Sample configuration for an ftp virtual service. #Fallback setting overides global #virtual=192.168.6.240:21 # real=192.168.16.3:21 masq # real=192.168.16.5:21 masq # fallback=127.0.0.1:21 # service=ftp # checkport=21 # scheduler=wlc # scheduler=rr # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # login="anonymous" # passwd="ldirectord@localhost" # request="welcome.msg" # receive="test" #Sample configuration for an smtp virtual service. #Fallback setting overides global #virtual=192.168.6.240:25 # real=192.168.16.3:25 masq # real=192.168.16.5:25 masq # fallback=127.0.0.1:25 # service=smtp # scheduler=wlc # protocol=tcp # persistent=600 # #netmask=255.255.255.255 # checktype=negotiate # checkport=25 #Sample configuration for a pop virtual service. #Fallback setting overides global #virtual=192.168.6.240:110 # real=192.168.16.3:110 masq # real=192.168.16.5:110 masq # fallback=127.0.0.1:110 # service=pop # scheduler=wlc # persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # checkport=110 # #login="test" # #passwd="test" ##Sample configuration for an imap virtual service. #Fallback setting overides global #virtual=192.168.6.240:143 # real=127.0.0.1:143 masq # real=192.168.16.3:143 masq # real=192.168.16.5:143 masq # fallback=127.0.0.1:143 # service=imap # scheduler=wlc # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # checkport=143 # #login="test" # #passwd="test" #Sample configuration for an ldap virtual service. #Fallback setting overides global #virtual=192.168.84.5:389 # real=10.0.1.4:389 masq # real=10.0.1.6:389 masq # fallback=127.0.0.1:389 # service=ldap # scheduler=wlc # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # checkport=369 # request="dc=upmc, dc=fr" # receive="dc=upmc, dc=fr" # #login="test" # #passwd="test" #Sample configuration for an nntp virtual service. #Fallback setting overides global #virtual=192.168.84.5:119 # real=10.0.1.4:119 masq # real=10.0.1.6:119 masq # fallback=127.0.0.1:119 # service=nntp # scheduler=wlc # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # checkport=119 #Sample configuration for a UDP DNS virtual service. #Fallback setting overides global #virtual=192.168.84.5:53 # real=10.0.1.4:53 masq # real=10.0.1.6:53 masq # fallback=127.0.0.1:53 # service=dns # scheduler=wlc # #persistent=600 # #netmask=255.255.255.255 # protocol=udp # checktype=negotiate # checkport=53 # request="x.y.z" # receive="127.0.0.1" #Sample configuration for a MySQL virtual service. #virtual = 192.168.10.74:3306 # real=sql01->sql03:3306 gate 10 # fallback=127.0.0.1:3306 # service=mysql # scheduler=wrr # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # login="readuser" # passwd="genericpassword" # database="portal" # request="SELECT * FROM link" #Sample configuration for a PostgreSQL virtual service. #virtual = 192.168.10.74:5432 # real=sql01->sql03:5432 gate 10 # fallback=127.0.0.1:5432 # service=pgsql # scheduler=wrr # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # login="readuser" # passwd="genericpassword" # database="portal" # request="SELECT * FROM link" #Sample configuration for a Oracle virtual service. #virtual = 192.168.10.74:1521 # real=sql01->sql03:1521 gate 10 # fallback=127.0.0.1:1521 # service=oracle # scheduler=wrr # #persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=negotiate # login="readuser" # passwd="genericpassword" # database="portal" # request="SELECT * FROM link" #Sample configuration for an unsuported protocol #The real servers will just be brought up without checking for availability #virtual=192.168.6.240:23 # real=192.168.16.3:23 masq # real=192.168.16.5:23 masq # fallback=127.0.0.1:23 # service=none # scheduler=wlc # persistent=600 # #netmask=255.255.255.255 # protocol=tcp # checktype=on # A sample virtual services that uses a ping check. # Note that using checktype=connect and protocol=udp # will also effect ping checks #virtual=192.168.6.240:53 # real=192.168.6.2:53 gate # real=192.168.6.3:53 gate # real=192.168.6.6:53 gate # fallback=127.0.0.1:53 gate # scheduler=rr # #persistent=600 # #netmask=255.255.255.255 # protocol=udp # checktype=ping # checkcount=3 # A sample virtual services that uses a Radius check on UDP. # Note that using checktype=connect and protocol=udp # will also effect ping checks #virtual=192.168.6.240:1812 # real=192.168.6.2::1812 gate # real=192.168.6.3::1812 gate # real=192.168.6.6::1812 gate # fallback=127.0.0.1:1812 gate # scheduler=rr # #persistent=600 # #netmask=255.255.255.255 # protocol=udp # checktype=negotiate # service=radius # password="readuser" # passwd="genericpassword" # secret="somesecret" # checktimeout=1 # A sample virtual services that uses a SIP check on UDP. # Note that using checktype=connect and protocol=udp # will also effect ping checks #virtual=192.168.6.240:5060 # real=192.168.6.2::5060 gate # real=192.168.6.3::5060 gate # real=192.168.6.6::5060 gate # fallback=127.0.0.1:5060 gate # scheduler=rr # #persistent=600 # #netmask=255.255.255.255 # protocol=udp # checktype=negotiate # service=sip # checktimeout=1 debian/ldirectord.default0000664000000000000000000000017111503526530012670 0ustar # Set the following variable to define a default configuration # file for ldirectord. # CONFIG_FILE=/etc/ldirectord.cf debian/watch0000664000000000000000000000013711551124650010222 0ustar version=3 http://githubredir.debian.net/github/ClusterLabs/resource-agents/v([\d\.]*)\.tar\.gz debian/patches/0000775000000000000000000000000012253517061010621 5ustar debian/patches/ocf-asterisk0000775000000000000000000003452211660517264013155 0ustar #!/bin/sh # # # Asterisk # # Description: Manages an Asterisk PBX as an HA resource # # Authors: Martin Gerhard Loschwitz # Florian Haas # # Support: linux-ha@lists.linux-ha.org # License: GNU General Public License (GPL) # # (c) 2011 hastexo Professional Services GmbH # # This resource agent is losely derived from the MySQL resource # agent, which itself is made available to the public under the # following copyright: # # (c) 2002-2005 International Business Machines, Inc. # 2005-2010 Linux-HA contributors # # See usage() function below for more details ... # # OCF instance parameters: # OCF_RESKEY_binary # OCF_RESKEY_canary_binary # OCF_RESKEY_config # OCF_RESKEY_user # OCF_RESKEY_group # OCF_RESKEY_additional_parameters # OCF_RESKEY_realtime # OCF_RESKEY_maxfiles ####################################################################### # Initialization: : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs ####################################################################### # Fill in some defaults if no values are specified HOSTOS=`uname` if [ "X${HOSTOS}" = "XOpenBSD" ]; then OCF_RESKEY_user_default="_asterisk" OCF_RESKEY_group_default="_asterisk" else OCF_RESKEY_user_default="asterisk" OCF_RESKEY_group_default="asterisk" fi OCF_RESKEY_binary_default="asterisk" OCF_RESKEY_canary_binary_default="astcanary" OCF_RESKEY_config_default="/etc/asterisk/asterisk.conf" OCF_RESKEY_additional_parameters_default="-g -vvv" OCF_RESKEY_realtime_default="false" OCF_RESKEY_maxfiles_default="8192" : ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}} : ${OCF_RESKEY_canary_binary=${OCF_RESKEY_canary_binary_default}} : ${OCF_RESKEY_config=${OCF_RESKEY_config_default}} : ${OCF_RESKEY_user=${OCF_RESKEY_user_default}} : ${OCF_RESKEY_group=${OCF_RESKEY_group_default}} : ${OCF_RESKEY_additional_parameters=${OCF_RESKEY_additional_parameters_default}} : ${OCF_RESKEY_realtime=${OCF_RESKEY_realtime_default}} : ${OCF_RESKEY_maxfiles=${OCF_RESKEY_maxfiles_default}} ####################################################################### usage() { cat < 1.0 Resource agent for the Asterisk PBX. May manage an Asterisk PBX telephony system or a clone set that forms an Asterisk distributed device setup. Manages an Asterisk PBX Location of the Asterisk PBX server binary Asterisk PBX server binary Location of the Asterisk PBX Canary server binary Asterisk PBX Canary server binary The Asterisk PBX configuration file Asterisk PBX config User running Asterisk PBX daemon Asterisk PBX user Group running Asterisk PBX daemon (for logfile and directory permissions) Asterisk PBX group Additional parameters which are passed to the Asterisk PBX on startup (e.g. -L <load> or -M <value>). Additional parameters to pass to the Asterisk PBX Determines whether the Asterisk PBX daemon will be run with realtime priority or not. Asterisk PBX realtime priority Determines how many files the Asterisk PBX is allowed to open at a time. Helps to fix the 'Too many open files' error message. Asterisk PBX allowed MAXFILES A SIP URI to check when monitoring. During monitor, the agent will attempt to do a SIP OPTIONS request against this URI. Requires the sipsak utility to be present and executable. If unset, the agent does no SIP URI monitoring. SIP URI to check when monitoring END } ####################################################################### # Convenience functions asterisk_rx() { # if $HOME is set, asterisk -rx writes a .asterisk_history there ( unset HOME ocf_run $OCF_RESKEY_binary -r -s $ASTRUNDIR/asterisk.ctl -x "$1" ) } ####################################################################### # Functions invoked by resource manager actions asterisk_validate() { local rc check_binary $OCF_RESKEY_binary check_binary pgrep if [ -n "$OCF_RESKEY_monitor_sipuri" ]; then check_binary sipsak fi if [ ! -f $OCF_RESKEY_config ]; then ocf_log err "Config $OCF_RESKEY_config doesn't exist" return $OCF_ERR_INSTALLED fi getent passwd $OCF_RESKEY_user >/dev/null 2>&1 rc=$? if [ $rc -ne 0 ]; then ocf_log err "User $OCF_RESKEY_user doesn't exist" return $OCF_ERR_INSTALLED fi getent group $OCF_RESKEY_group >/dev/null 2>&1 rc=$? if [ $rc -ne 0 ]; then ocf_log err "Group $OCF_RESKEY_group doesn't exist" return $OCF_ERR_INSTALLED fi true } asterisk_status() { local pid local rc if [ ! -f $ASTRUNDIR/asterisk.pid ]; then ocf_log info "Asterisk PBX is not running" return $OCF_NOT_RUNNING fi pid=`cat $ASTRUNDIR/asterisk.pid` ocf_run kill -s 0 $pid rc=$? if [ $rc -eq 0 ]; then if ocf_is_true "$OCF_RESKEY_realtime"; then astcanary_pid=`pgrep -d " " -f "astcanary $ASTRUNDIR/alt.asterisk.canary.tweet.tweet.tweet"` if [ ! "$astcanary_pid" ]; then ocf_log err "Asterisk PBX is running but astcanary is not although it should" return $OCF_ERR_GENERIC fi else return $OCF_SUCCESS fi else ocf_log info "Asterisk PBX not running: removing old PID file" rm -f $ASTRUNDIR/asterisk.pid return $OCF_NOT_RUNNING fi } asterisk_monitor() { local rc asterisk_status rc=$? # If status returned an error, return that immediately if [ $rc -ne $OCF_SUCCESS ]; then return $rc fi # Check whether connecting to asterisk is possible asterisk_rx 'core show channels count' rc=$? if [ $rc -ne 0 ]; then ocf_log err "Failed to connect to the Asterisk PBX" return $OCF_ERR_GENERIC fi # Optionally check the monitor URI with sipsak # The return values: # 0 means that a 200 was received. # 1 means something else then 1xx or 2xx was received. # 2 will be returned on local errors like non resolvable names # or wrong options combination. # 3 will be returned on remote errors like socket errors # (e.g. icmp error), redirects without a contact header or # simply no answer (timeout). # This can also happen if sipsak is run too early after asterisk # start. if [ -n "$OCF_RESKEY_monitor_sipuri" ]; then ocf_run sipsak -s "$OCF_RESKEY_monitor_sipuri" rc=$? case "$rc" in 1|2) return $OCF_ERR_GENERIC;; 3) return $OCF_NOT_RUNNING;; esac fi ocf_log debug "Asterisk PBX monitor succeeded" return $OCF_SUCCESS } asterisk_start() { local asterisk_extra_params local dir local rc asterisk_status rc=$? if [ $rc -eq $OCF_SUCCESS ]; then ocf_log info "Asterisk PBX already running" return $OCF_SUCCESS fi # If Asterisk is not already running, make sure there is no # old astcanary instance when the new asterisk starts. To # achieve this, kill old astcanary instances belonging to # this $ASTRUNDIR. # Find out PIDs of running astcanaries astcanary_pid=`pgrep -d " " -f "astcanary $ASTRUNDIR/alt.asterisk.canary.tweet.tweet.tweet"` # If there are astcanaries running that belong to $ASTRUNDIR, # kill them. if [ "$astcanary_pid" ]; then for i in $astcanary_pid; do ocf_run kill -s KILL $astcanary_pid; done fi for dir in $ASTRUNDIR $ASTLOGDIR $ASTLOGDIR/cdr-csv $ASTLOGDIR/cdr-custom; do if [ ! -d "$dir" ]; then ocf_run install -d -o $OCF_RESKEY_user -g $OCF_RESKEY_group $dir \ || exit $OCF_ERR_GENERIC fi # Regardless of whether we just created the directory or it # already existed, check whether it is writable by the configured # user if ! su -s /bin/sh - $OCF_RESKEY_user -c "test -w $dir"; then ocf_log err "Directory $dir is not writable by $OCF_RESKEY_user" exit $OCF_ERR_PERM fi done # set MAXFILES ulimit -n $OCF_RESKEY_maxfiles # Determine whether Asterisk PBX is supposed to run in Realtime mode # or not and make asterisk daemonize automatically if ocf_is_true "$OCF_RESKEY_realtime"; then asterisk_extra_params="-F -p" else asterisk_extra_params="-F" fi ocf_run ${OCF_RESKEY_binary} -G $OCF_RESKEY_group -U $OCF_RESKEY_user \ -C $OCF_RESKEY_config \ $OCF_RESKEY_additional_parameters \ $asterisk_extra_params rc=$? if [ $rc -ne 0 ]; then ocf_log err "Asterisk PBX start command failed: $rc" exit $OCF_ERR_GENERIC fi # Spin waiting for the server to come up. # Let the CRM/LRM time us out if required while true; do asterisk_monitor rc=$? [ $rc -eq $OCF_SUCCESS ] && break if [ $rc -ne $OCF_NOT_RUNNING ]; then ocf_log err "Asterisk PBX start failed" exit $OCF_ERR_GENERIC fi sleep 2 done ocf_log info "Asterisk PBX started" return $OCF_SUCCESS } asterisk_stop() { local pid local astcanary_pid local rc asterisk_status rc=$? if [ $rc -eq $OCF_NOT_RUNNING ]; then ocf_log info "Asterisk PBX already stopped" return $OCF_SUCCESS fi # do a "soft shutdown" via the asterisk command line first asterisk_rx 'core stop now' asterisk_status rc=$? if [ $rc -eq $OCF_NOT_RUNNING ]; then ocf_log info "Asterisk PBX stopped" return $OCF_SUCCESS fi # If "core stop now" didn't succeed, try SIGTERM pid=`cat $ASTRUNDIR/asterisk.pid` ocf_run kill -s TERM $pid rc=$? if [ $rc -ne 0 ]; then ocf_log err "Asterisk PBX couldn't be stopped" exit $OCF_ERR_GENERIC fi # stop waiting shutdown_timeout=15 if [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then shutdown_timeout=$((($OCF_RESKEY_CRM_meta_timeout/1000)-5)) fi count=0 while [ $count -lt $shutdown_timeout ]; do asterisk_status rc=$? if [ $rc -eq $OCF_NOT_RUNNING ]; then break fi count=`expr $count + 1` sleep 1 ocf_log debug "Asterisk PBX still hasn't stopped yet. Waiting ..." done asterisk_status rc=$? if [ $rc -ne $OCF_NOT_RUNNING ]; then # SIGTERM didn't help either, try SIGKILL ocf_log info "Asterisk PBX failed to stop after ${shutdown_timeout}s using SIGTERM. Trying SIGKILL ..." ocf_run kill -s KILL $pid fi # After killing asterisk, stop astcanary if ocf_is_true "$OCF_RESKEY_realtime"; then astcanary_pid=`pgrep -d " " -f "astcanary $ASTRUNDIR/alt.asterisk.canary.tweet.tweet.tweet"` if [ "$astcanary_pid" ]; then for i in $astcanary_pid; do ocf_run kill -s KILL $astcanary_pid; done fi fi ocf_log info "Asterisk PBX stopped" return $OCF_SUCCESS } ####################################################################### case "$1" in meta-data) meta_data exit $OCF_SUCCESS;; usage|help) usage exit $OCF_SUCCESS;; esac # Anything except meta-data and help must pass validation asterisk_validate || exit $? # Now that validate has passed and we can be sure to be able to read # the config file, set convenience variables ASTRUNDIR=`grep astrundir $OCF_RESKEY_config | awk '/^astrundir/ {print $3}'` ASTLOGDIR=`grep astlogdir $OCF_RESKEY_config | awk '/^astlogdir/ {print $3}'` # What kind of method was invoked? case "$1" in start) asterisk_start;; stop) asterisk_stop;; status) asterisk_status;; monitor) asterisk_monitor;; validate-all) ;; *) usage exit $OCF_ERR_UNIMPLEMENTED;; esac debian/patches/02_spelling_fixes.patch0000664000000000000000000000567212035004515015161 0ustar diff -ruN ClusterLabs-resource-agents-dc69db5.orig/heartbeat/LVM ClusterLabs-resource-agents-dc69db5/heartbeat/LVM --- ClusterLabs-resource-agents-dc69db5.orig/heartbeat/LVM 2012-10-05 19:27:22.000000000 +0000 +++ ClusterLabs-resource-agents-dc69db5/heartbeat/LVM 2012-10-09 11:23:01.081836865 +0000 @@ -83,7 +83,7 @@ If set, the volume group will be activated even only partial of the physical -volumes available. It helps to set to true, when you are using mirroring +volumes available. It helps one to set to true, when you are using mirroring logical volumes. Activate VG even with partial PV only diff -ruN ClusterLabs-resource-agents-dc69db5.orig/heartbeat/nfsserver ClusterLabs-resource-agents-dc69db5/heartbeat/nfsserver --- ClusterLabs-resource-agents-dc69db5.orig/heartbeat/nfsserver 2012-10-05 19:27:22.000000000 +0000 +++ ClusterLabs-resource-agents-dc69db5/heartbeat/nfsserver 2012-10-09 11:23:01.081836865 +0000 @@ -24,7 +24,7 @@ 1.0 -Nfsserver helps to manage the Linux nfs server as a failover-able resource in Linux-HA. +Nfsserver helps one to manage the Linux nfs server as a failover-able resource in Linux-HA. It depends on Linux specific NFS implementation details, so is considered not portable to other platforms yet. diff -ruN ClusterLabs-resource-agents-dc69db5.orig/heartbeat/nginx ClusterLabs-resource-agents-dc69db5/heartbeat/nginx --- ClusterLabs-resource-agents-dc69db5.orig/heartbeat/nginx 2012-10-05 19:27:22.000000000 +0000 +++ ClusterLabs-resource-agents-dc69db5/heartbeat/nginx 2012-10-09 11:23:01.081836865 +0000 @@ -721,7 +721,7 @@ Client to use to query to Nginx for level 10 and level 20 tests. If not specified, the RA will try to find one on the system. Currently, wget and curl are supported, with curl being preferred. -For example, you can set this paramter to "wget" if you prefer that to curl. +For example, you can set this parameter to "wget" if you prefer that to curl. http client diff -ruN ClusterLabs-resource-agents-dc69db5.orig/heartbeat/scsi2reservation ClusterLabs-resource-agents-dc69db5/heartbeat/scsi2reservation --- ClusterLabs-resource-agents-dc69db5.orig/heartbeat/scsi2reservation 2012-10-05 19:27:22.000000000 +0000 +++ ClusterLabs-resource-agents-dc69db5/heartbeat/scsi2reservation 2012-10-09 11:23:01.081836865 +0000 @@ -35,7 +35,7 @@ The scsi_reserve is a command from scsires package. -It helps to issue SCSI-2 reservation on SCSI devices. +It helps one to issue SCSI-2 reservation on SCSI devices. Manages exclusive access to shared storage media thrugh SCSI-2 reservations debian/patches/series0000664000000000000000000000015712253516327012045 0ustar 01_docbook_patch.patch 02_spelling_fixes.patch mysql-path.patch fix-gethostinfo-v2.patch configure-order.patch debian/patches/CVE-2010-3389--bug598549.patch0000664000000000000000000000316511625145077014616 0ustar diff -ruN cluster-agents-3.9.2.old//heartbeat/SAPDatabase cluster-agents-3.9.2/heartbeat/SAPDatabase --- cluster-agents-3.9.2.old//heartbeat/SAPDatabase 2011-06-29 12:51:48.000000000 +0000 +++ cluster-agents-3.9.2/heartbeat/SAPDatabase 2011-08-24 09:43:15.215463955 +0000 @@ -974,8 +974,11 @@ fi # as root user we need the library path to the SAP kernel to be able to call executables -if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then - LD_LIBRARY_PATH=$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH +if [ "$DIR_EXECUTABLE" ]; then + if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then + LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH + fi export LD_LIBRARY_PATH fi sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm" diff -ruN cluster-agents-3.9.2.old//heartbeat/SAPInstance cluster-agents-3.9.2/heartbeat/SAPInstance --- cluster-agents-3.9.2.old//heartbeat/SAPInstance 2011-06-29 12:51:48.000000000 +0000 +++ cluster-agents-3.9.2/heartbeat/SAPInstance 2011-08-24 09:43:07.724822028 +0000 @@ -355,8 +355,11 @@ fi # as root user we need the library path to the SAP kernel to be able to call sapcontrol - if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then - LD_LIBRARY_PATH=$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH + if [ "$DIR_EXECUTABLE" ]; then + if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then + LD_LIBRARY_PATH="$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + export LD_LIBRARY_PATH + fi export LD_LIBRARY_PATH fi debian/patches/configure-order.patch0000664000000000000000000000263112253517061014736 0ustar Description: Fix configure.ac to cope with new autoconf. Recent autoconfs generate a bad configure when AM_INIT_AUTOMAKE is called as late as it was, ending up thinking that the am_aux_dir is pwd at the start of the build. Move it up to under AC_INIT to fix that. Author: William Grant Index: resource-agents-3.9.3+git20121009/configure.ac =================================================================== --- resource-agents-3.9.3+git20121009.orig/configure.ac 2012-10-06 05:27:22.000000000 +1000 +++ resource-agents-3.9.3+git20121009/configure.ac 2013-12-16 17:28:42.354909697 +1100 @@ -22,6 +22,13 @@ AC_INIT([resource-agents], m4_esyscmd([make/git-version-gen .tarball-version]), [to_be_defined@foobar.org]) +AC_CONFIG_AUX_DIR(.) + +dnl +dnl AM_INIT_AUTOMAKE([1.11.1 foreign dist-bzip2 dist-xz]) +dnl + +AM_INIT_AUTOMAKE([1.10.1 foreign dist-bzip2]) AC_USE_SYSTEM_EXTENSIONS @@ -29,7 +36,6 @@ PKG_FEATURES="" -AC_CONFIG_AUX_DIR(.) AC_CANONICAL_HOST dnl Where #defines go (e.g. `AC_CHECK_HEADERS' below) @@ -56,12 +62,6 @@ [ --with-pkg-name=name Override package name (if you're a packager needing to pretend) ], [ PACKAGE_NAME="$withval" ]) -dnl -dnl AM_INIT_AUTOMAKE([1.11.1 foreign dist-bzip2 dist-xz]) -dnl - -AM_INIT_AUTOMAKE([1.10.1 foreign dist-bzip2]) - AC_DEFINE_UNQUOTED(AGENTS_VERSION, "$PACKAGE_VERSION", Current agents version) CC_IN_CONFIGURE=yes debian/patches/fix-gethostinfo-v2.patch0000664000000000000000000000420412053375533015310 0ustar diff -ruN ClusterLabs-resource-agents-dc69db5.old/ldirectord/ldirectord.in ClusterLabs-resource-agents-dc69db5/ldirectord/ldirectord.in --- ClusterLabs-resource-agents-dc69db5.old/ldirectord/ldirectord.in 2012-10-05 19:27:22.000000000 +0000 +++ ClusterLabs-resource-agents-dc69db5/ldirectord/ldirectord.in 2012-11-22 10:15:51.985876008 +0000 @@ -834,8 +834,7 @@ use Pod::Usage; #use English; #use Time::HiRes qw( gettimeofday tv_interval ); -use Socket; -use Socket6; +use Socket qw( :DEFAULT inet_pton getaddrinfo getnameinfo NI_NUMERICHOST NI_NUMERICSERV NI_NAMEREQD ); use Sys::Hostname; use POSIX qw(setsid :sys_wait_h); use Sys::Syslog qw(:DEFAULT setlogsock); @@ -4034,7 +4033,7 @@ { my ($v, $r, $force) = (@_); - if ($r->{failcount} > 0) { + if (defined($r->{failcount}) && $r->{failcount} > 0) { ld_log("Resetting soft failure count: " . $r->{server} . ":" . $r->{port} . " (" . get_virtual_id_str($v) . ")"); } @@ -5060,17 +5059,21 @@ if ($name =~ /\[(.*)\]/) { $name = $1; } - my @host = getaddrinfo($name, 0, $af); - if (!defined($host[3])) { - return undef; - } - my @ret = getnameinfo($host[3], NI_NUMERICHOST | NI_NUMERICSERV); - if ($host[0] == AF_INET6) { - return "[$ret[0]]"; - } - else { - return $ret[0]; + my %hints = ( family => $af ); + my ( $err, @res ) = getaddrinfo($name, 0, \%hints); + return undef if ($err); + while( my $ai = shift @res ) { + my ( $err, $hostname, $servicename ) = getnameinfo( $ai->{addr}, NI_NUMERICHOST ); + if (!$err) { + if ($ai->{family} == AF_INET6) { + return "[$hostname]"; + } + else { + return $hostname; + } + } } + return undef; } # ld_gethostbyaddr @@ -5085,13 +5088,13 @@ my ($ip)=(@_); $ip = &ld_strip_brackets($ip); - my @host = getaddrinfo($ip,0); - if (!defined($host[3])) { - return undef; + my ( $err, @res ) = getaddrinfo($ip,0); + return undef if ($err); + while( my $ai = shift @res ) { + my ( $err, $host, $service ) = getnameinfo($ai->{addr}, NI_NAMEREQD); + return $host unless($err); } - my @ret = getnameinfo($host[3], NI_NAMEREQD); - return undef unless(scalar(@ret) == 2); - return $ret[0]; + return undef; } # ld_getservbyname debian/patches/01_docbook_patch.patch0000664000000000000000000000134112035004272014731 0ustar diff -ruN ClusterLabs-resource-agents-dc69db5.orig/doc/man/Makefile.am ClusterLabs-resource-agents-dc69db5/doc/man/Makefile.am --- ClusterLabs-resource-agents-dc69db5.orig/doc/man/Makefile.am 2012-10-05 19:27:22.000000000 +0000 +++ ClusterLabs-resource-agents-dc69db5/doc/man/Makefile.am 2012-10-09 11:20:26.009849098 +0000 @@ -26,7 +26,7 @@ CLEANFILES = $(man_MANS) $(xmlfiles) metadata-*.xml -STYLESHEET_PREFIX ?= http://docbook.sourceforge.net/release/xsl/current +STYLESHEET_PREFIX ?= /usr/share/xml/docbook/stylesheet/docbook-xsl MANPAGES_STYLESHEET ?= $(STYLESHEET_PREFIX)/manpages/docbook.xsl HTML_STYLESHEET ?= $(STYLESHEET_PREFIX)/xhtml/docbook.xsl FO_STYLESHEET ?= $(STYLESHEET_PREFIX)/fo/docbook.xsl debian/patches/mysql-path.patch0000664000000000000000000000210611604661443013743 0ustar Index: resource-agents-3.9.2/heartbeat/mysql =================================================================== --- resource-agents-3.9.2.orig/heartbeat/mysql 2011-07-05 15:16:44.338455531 -0400 +++ resource-agents-3.9.2/heartbeat/mysql 2011-07-05 15:16:48.928462263 -0400 @@ -58,14 +58,14 @@ OCF_RESKEY_pid_default="/var/mysql/mysqld.pid" OCF_RESKEY_socket_default="/var/run/mysql/mysql.sock" else -OCF_RESKEY_binary_default="/usr/bin/safe_mysqld" -OCF_RESKEY_config_default="/etc/my.cnf" +OCF_RESKEY_binary_default="/usr/bin/mysqld_safe" +OCF_RESKEY_config_default="/etc/mysql/my.cnf" OCF_RESKEY_datadir_default="/var/lib/mysql" OCF_RESKEY_user_default="mysql" OCF_RESKEY_group_default="mysql" -OCF_RESKEY_log_default="/var/log/mysqld.log" -OCF_RESKEY_pid_default="/var/run/mysql/mysqld.pid" -OCF_RESKEY_socket_default="/var/lib/mysql/mysql.sock" +OCF_RESKEY_log_default="/var/log/mysql.log" +OCF_RESKEY_pid_default="/var/run/mysqld/mysqld.pid" +OCF_RESKEY_socket_default="/var/lib/mysqld/mysqld.sock" fi OCF_RESKEY_client_binary_default="mysql" OCF_RESKEY_test_user_default="root" debian/rules0000775000000000000000000000314111660517377010264 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 BUILDROOT := $(shell pwd) get-orig-source: uscan --noconf --force-download --rename --repack --download-current-version --destdir=/ %: dh $@ override_dh_auto_configure: dh_testdir [ -f configure ] || sh autogen.sh if [ -e configure -a ! -x configure ]; then chmod u+x configure; fi ./configure --sbindir=/usr/sbin --libexecdir=/usr/lib \ --with-ocf-root=/usr/lib/ocf --with-initdir=/etc/init.d \ --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --mandir=/usr/share/man --libdir=/usr/lib --disable-fatal-warnings override_dh_auto_install: $(MAKE) install DESTDIR=$(BUILDROOT)/debian/tmp # drbd8 ships this itself rm -f $(BUILDROOT)/debian/tmp/usr/share/cluster/drbd.metadata rm -f $(BUILDROOT)/debian/tmp/usr/share/cluster/drbd.sh # install example configuration file mkdir -p $(BUILDROOT)/debian/tmp/usr/share/doc/ldirectord/examples/ cp -ax $(BUILDROOT)/debian/ldirectord.cf.example $(BUILDROOT)/debian/tmp/usr/share/doc/ldirectord/examples/ldirectord.cf # install the Asterisk PBX ocf resource agent cp -ax $(BUILDROOT)/debian/patches/ocf-asterisk $(BUILDROOT)/debian/tmp/usr/lib/ocf/resource.d/heartbeat/asterisk dh_install --list-missing