Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2012-02-16 12:27:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
and /work/SRC/openSUSE:Factory/.resource-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents", Maintainer is "DMuhamedagic@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes 2011-12-25 17:52:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes 2012-02-16 12:27:40.000000000 +0100
@@ -1,0 +2,20 @@
+Tue Feb 14 03:19:59 UTC 2012 - tserong@suse.com
+
+- ocf-shellfuncs: fix loglevel variable scope in ha_log
+- exportfs: fix monitor action for special characters and common
+ suffixes
+- apache: add support for IPv6 in monitor
+- iscsi: don't fail in stop or monitor if the portal is
+ ambiguous (bnc#740718)
+- ocf-tester: add -d and -q options
+- Medium: Tools: findif: Use most specific matching route (bnc#740738)
+- ldirectord: Allow IPv6 for NNTP, requires perl-IO-Socket-INET6 (bnc#669412)
+- SAPInstance/SAPDatabase: fix unique attribute in metadata (bnc#737673)
+- IPv6addr: handle a link-local address properly in send_ua
+- iSCSILogicalUnit: fix default for scsi_sn
+- named: make monitor work with IPv6 interfaces
+- slapd: exit with the right code if validation fails (it used to
+ exit always with the generic error code)
+- upstream cs: de3074
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.ifdFGR/_old 2012-02-16 12:27:43.000000000 +0100
+++ /var/tmp/diff_new_pack.ifdFGR/_new 2012-02-16 12:27:43.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package resource-agents
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 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,7 +15,6 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
%global agents_docdir %{_defaultdocdir}/%{name}-%{version}
%endif
@@ -114,6 +113,7 @@
%package -n ldirectord
Summary: The Heartbeat Subsystem for High-Availability Linux
+Group: Productivity/Clustering/HA
Requires: %{SSLeay} perl-libwww-perl ipvsadm
Obsoletes: heartbeat-ldirectord
Provides: heartbeat-ldirectord
++++++ resource-agents-3.9.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/configure.ac new/resource-agents/configure.ac
--- old/resource-agents/configure.ac 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/configure.ac 2012-02-02 04:57:16.000000000 +0100
@@ -896,7 +896,7 @@
AC_MSG_RESULT([])
AC_MSG_RESULT([$PACKAGE configuration:])
AC_MSG_RESULT([ Version = ${VERSION}])
-AC_MSG_RESULT([ Build Version = 72fdc8b2a413ee2820f78a84c4afc1c66bc9bf9d])
+AC_MSG_RESULT([ Build Version = de3074ce2c9718725a374bcd2199ebc077a7d796])
AC_MSG_RESULT([ Features =${PKG_FEATURES}])
AC_MSG_RESULT([])
AC_MSG_RESULT([ Prefix = ${prefix}])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/Filesystem new/resource-agents/heartbeat/Filesystem
--- old/resource-agents/heartbeat/Filesystem 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/Filesystem 2012-02-02 04:57:16.000000000 +0100
@@ -1056,7 +1056,7 @@
ocfs2) ocfs2_init
CLUSTERSAFE=1
;;
-nfs|smbfs|none|gfs2|glusterfs) CLUSTERSAFE=1 # this is kind of safe too
+nfs|smbfs|cifs|none|gfs2|glusterfs) CLUSTERSAFE=1 # this is kind of safe too
;;
# add here CLUSTERSAFE=0 for all filesystems which are not
# cluster aware and which, even if when mounted read-only,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/IPsrcaddr new/resource-agents/heartbeat/IPsrcaddr
--- old/resource-agents/heartbeat/IPsrcaddr 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/IPsrcaddr 2012-02-02 04:57:16.000000000 +0100
@@ -167,13 +167,20 @@
srca_start() {
srca_read $1
- ip route replace $NETWORK dev $INTERFACE src $1 || \
- errorexit "command 'ip route replace $NETWORK dev $INTERFACE src $1' failed"
+ rc=$?
+ if [ $rc = 0 ]; then
+ rc=$OCF_SUCCESS
+ ocf_log info "The ip route has been already set.($NETWORK, $INTERFACE, $ROUTE_WO_SRC)"
+ else
+ ip route replace $NETWORK dev $INTERFACE src $1 || \
+ errorexit "command 'ip route replace $NETWORK dev $INTERFACE src $1' failed"
- $CMDCHANGE $ROUTE_WO_SRC src $1 || \
- errorexit "command '$CMDCHANGE $ROUTE_WO_SRC src $1' failed"
+ $CMDCHANGE $ROUTE_WO_SRC src $1 || \
+ errorexit "command '$CMDCHANGE $ROUTE_WO_SRC src $1' failed"
+ rc=$?
+ fi
- return $?
+ return $rc
}
#
@@ -252,7 +259,6 @@
else
true
fi
-# return $OCF_SUCCESS
;;
*) #less than three decimal dots
false;;
@@ -301,35 +307,14 @@
#
find_interface_generic() {
- $IFCONFIG $IFCONFIG_A_OPT |
- while read ifname linkstuff
- do
- : Read gave us ifname = $ifname
-
- read inet addr junk
- : Read gave us inet = $inet addr = $addr
-
- while
- read line && [ "X$line" != "X" ]
- do
- : Nothing
- done
-
- case "$SYSTYPE" in
- *BSD)
- $IFCONFIG | grep "$BASEIP" -B`$IFCONFIG | grep -c inet` | grep "UP," | cut -d ":" -f 1
- return 0;;
- *)
- : "comparing $BASEIP to $addr (from ifconfig)"
- case $addr in
- addr:$BASEIP) echo $ifname; return $OCF_SUCCESS;;
- $BASEIP) echo $ifname; return $OCF_SUCCESS;;
- esac
- continue;;
- esac
-
- done
- return $OCF_ERR_GENERIC
+ local iface=`$IP2UTIL -o -f inet addr show | grep "\ $BASEIP" \
+ | cut -d ' ' -f2 | grep -v '^ipsec[0-9][0-9]*$'`
+ if [ -z "$iface" ]; then
+ return $OCF_ERR_GENERIC
+ else
+ echo $iface
+ return $OCF_SUCCESS
+ fi
}
@@ -377,7 +362,6 @@
Linux|SunOS)
IF=`find_interface "$BASEIP"`
-# echo $IF
if [ -z "$IF" ]; then
return $OCF_NOT_RUNNING
fi
@@ -404,7 +388,6 @@
srca_validate_all() {
check_binary $AWK
- check_binary $IPROUTE
check_binary $IFCONFIG
# The IP address should be in good shape
@@ -415,6 +398,10 @@
exit $OCF_ERR_CONFIGURED
fi
+ if ocf_is_probe; then
+ return $OCF_SUCCESS
+ fi
+
# We should serve this IP address of course
if ip_status "$ipaddress"; then
:
@@ -453,11 +440,19 @@
ipaddress="$OCF_RESKEY_ipaddress"
+if [ "x$SYSTYPE" = "xLinux" ]; then
+ srca_validate_all
+fi
+
findif_out=`$FINDIF -C`
rc=$?
-[ $rc -ne 0 ] && exit $rc
+[ $rc -ne 0 ] && {
+ ocf_log err "[$FINDIF -C] failed"
+ exit $rc
+}
+
INTERFACE=`echo $findif_out | awk '{print $1}'`
-NETWORK=`ip route list dev $INTERFACE scope link|grep -o '^[^ ]*'`
+NETWORK=`ip route list dev $INTERFACE scope link match $ipaddress|grep -o '^[^ ]*'`
case $1 in
start) srca_start $ipaddress
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/IPv6addr.c new/resource-agents/heartbeat/IPv6addr.c
--- old/resource-agents/heartbeat/IPv6addr.c 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/IPv6addr.c 2012-02-02 04:57:16.000000000 +0100
@@ -458,6 +458,11 @@
src_sin6.sin6_family = AF_INET6;
src_sin6.sin6_addr = *src_ip;
src_sin6.sin6_port = 0;
+ if (IN6_IS_ADDR_LINKLOCAL(&src_sin6.sin6_addr) ||
+ IN6_IS_ADDR_MC_LINKLOCAL(&src_sin6.sin6_addr)) {
+ src_sin6.sin6_scope_id = ifindex;
+ }
+
if (bind(fd, (struct sockaddr *)&src_sin6, sizeof(src_sin6)) < 0) {
cl_log(LOG_ERR, "bind() failed: %s", strerror(errno));
goto err;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/SAPDatabase new/resource-agents/heartbeat/SAPDatabase
--- old/resource-agents/heartbeat/SAPDatabase 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/SAPDatabase 2012-02-02 04:57:16.000000000 +0100
@@ -83,72 +83,72 @@
<shortdesc lang="en">SAP system ID</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="DIR_EXECUTABLE" unique="1" required="0">
+ <parameter name="DIR_EXECUTABLE" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find sapstartsrv and sapcontrol.</longdesc>
<shortdesc lang="en">path of sapstartsrv and sapcontrol</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="DBTYPE" unique="1" required="1">
+ <parameter name="DBTYPE" unique="0" required="1">
<longdesc lang="en">The name of the database vendor you use. Set either: ORA,DB6,ADA</longdesc>
<shortdesc lang="en">database vendor</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="NETSERVICENAME" unique="1" required="0">
+ <parameter name="NETSERVICENAME" unique="0" required="0">
<longdesc lang="en">The Oracle TNS listener name.</longdesc>
<shortdesc lang="en">listener name</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="DBJ2EE_ONLY" unique="1" required="0">
+ <parameter name="DBJ2EE_ONLY" unique="0" required="0">
<longdesc lang="en">If you do not have a ABAP stack installed in the SAP database, set this to TRUE</longdesc>
<shortdesc lang="en">only JAVA stack installed</shortdesc>
<content type="boolean" default="false"/>
</parameter>
- <parameter name="JAVA_HOME" unique="1" required="0">
+ <parameter name="JAVA_HOME" unique="0" required="0">
<longdesc lang="en">This is only needed if the DBJ2EE_ONLY parameter is set to true. Enter the path to the Java SDK which is used by the SAP WebAS Java</longdesc>
<shortdesc lang="en">Path to Java SDK</shortdesc>
<content type="string" default=""/>
</parameter>
- <parameter name="STRICT_MONITORING" unique="1" required="0">
+ <parameter name="STRICT_MONITORING" unique="0" required="0">
<longdesc lang="en">This controls how the resource agent monitors the database. If set to true, it will use SAP tools to test the connect to the database. Do not use with Oracle, because it will result in unwanted failovers in case of an archiver stuck</longdesc>
<shortdesc lang="en">Activates application level monitoring</shortdesc>
<content type="boolean" default="false"/>
</parameter>
- <parameter name="AUTOMATIC_RECOVER" unique="1" required="0">
+ <parameter name="AUTOMATIC_RECOVER" unique="0" required="0">
<longdesc lang="en">The SAPDatabase resource agent tries to recover a failed start attempt automaticaly one time. This is done by running a forced abort of the RDBMS and/or executing recovery commands.</longdesc>
<shortdesc lang="en">Enable or disable automatic startup recovery</shortdesc>
<content type="boolean" default="false"/>
</parameter>
- <parameter name="DIR_BOOTSTRAP" unique="1" required="0">
+ <parameter name="DIR_BOOTSTRAP" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find the J2EE instance bootstrap directory. e.g. /usr/sap/P01/J00/j2ee/cluster/bootstrap</longdesc>
<shortdesc lang="en">path to j2ee bootstrap directory</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="DIR_SECSTORE" unique="1" required="0">
+ <parameter name="DIR_SECSTORE" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find the J2EE security store directory. e.g. /usr/sap/P01/SYS/global/security/lib/tools</longdesc>
<shortdesc lang="en">path to j2ee secure store directory</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="DB_JARS" unique="1" required="0">
+ <parameter name="DB_JARS" unique="0" required="0">
<longdesc lang="en">The full qualified filename of the jdbc driver for the database connection test. It will be automaticaly read from the bootstrap.properties file in Java engine 6.40 and 7.00. For Java engine 7.10 and higher the parameter is mandatory.</longdesc>
<shortdesc lang="en">file name of the jdbc driver</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="PRE_START_USEREXIT" unique="1" required="0">
+ <parameter name="PRE_START_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed before this resource gets started.</longdesc>
<shortdesc lang="en">path to a pre-start script</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="POST_START_USEREXIT" unique="1" required="0">
+ <parameter name="POST_START_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed after this resource got started.</longdesc>
<shortdesc lang="en">path to a post-start script</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="PRE_STOP_USEREXIT" unique="1" required="0">
+ <parameter name="PRE_STOP_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed before this resource gets stopped.</longdesc>
<shortdesc lang="en">path to a pre-start script</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="POST_STOP_USEREXIT" unique="1" required="0">
+ <parameter name="POST_STOP_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed after this resource got stopped.</longdesc>
<shortdesc lang="en">path to a post-start script</shortdesc>
<content type="string" default="" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/SAPInstance new/resource-agents/heartbeat/SAPInstance
--- old/resource-agents/heartbeat/SAPInstance 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/SAPInstance 2012-02-02 04:57:16.000000000 +0100
@@ -72,7 +72,7 @@
<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
<resource-agent name="SAPInstance">
-<version>2.12</version>
+<version>2.13</version>
<shortdesc lang="en">Manages a SAP instance as an HA resource.</shortdesc>
<longdesc lang="en">
@@ -100,12 +100,12 @@
<shortdesc lang="en">Instance name: SID_INSTANCE_VIR-HOSTNAME</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="DIR_EXECUTABLE" unique="1" required="0">
+ <parameter name="DIR_EXECUTABLE" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find sapstartsrv and sapcontrol. Specify this parameter, if you have changed the SAP kernel directory location after the default SAP installation.</longdesc>
<shortdesc lang="en">Path of sapstartsrv and sapcontrol</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="DIR_PROFILE" unique="1" required="0">
+ <parameter name="DIR_PROFILE" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find the SAP START profile. Specify this parameter, if you have changed the SAP profile directory location after the default SAP installation.</longdesc>
<shortdesc lang="en">Path of start profile</shortdesc>
<content type="string" default="" />
@@ -115,7 +115,7 @@
<shortdesc lang="en">Start profile name</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="START_WAITTIME" unique="1" required="0">
+ <parameter name="START_WAITTIME" unique="0" required="0">
<longdesc lang="en">After that time in seconds a monitor operation is executed by the resource agent. Does the monitor return SUCCESS, the start ishandled as SUCCESS. This is useful to resolve timing problems with e.g. the J2EE-Addin instance.Usually the resource agent waits until all services are started and the SAP Management Console reports a GREEN status. A double stack installation (ABAP + Java AddIn) consists of an ABAP dispatcher and aJAVA instance. Normally the start of the JAVA instance takes much longer than the start of the ABAP instance. For a JAVA Instance you may need to configure a much higher timeout for the start operation of the resource in Heartbeat. The disadvantage here is, that the discovery of a failed start by the cluster takes longer. Somebody might say: For me it is important, that the ABAP instance is up and running. A failure of the JAVA instance shall not cause a failover of the SAP instance.
Actually the SAP MC reports a YELLOW status, if the JAVA instance of a double stack system fails. From the resource agent point of view YELLOW means:everything is OK. Setting START_WAITTIME to a lower value determines the resource agent to check the status of the instance during a start operation after that time. As it would wait normally for a GREEN status, now it reports SUCCESS to the cluster in case of a YELLOW status already after the specified time.
@@ -124,12 +124,12 @@
<shortdesc lang="en">Check the successful start after that time (do not wait for J2EE-Addin)</shortdesc>
<content type="string" default="3600" />
</parameter>
- <parameter name="AUTOMATIC_RECOVER" unique="1" required="0">
+ <parameter name="AUTOMATIC_RECOVER" unique="0" required="0">
<longdesc lang="en">The SAPInstance resource agent tries to recover a failed start attempt automaticaly one time. This is done by killing runing instance processes, removing the kill.sap file and executing cleanipc. Sometimes a crashed SAP instance leaves some processes and/or shared memory segments behind. Setting this option to true will try to remove those leftovers during a start operation. That is to reduce manual work for the administrator.</longdesc>
<shortdesc lang="en">Enable or disable automatic startup recovery</shortdesc>
<content type="boolean" default="false"/>
</parameter>
- <parameter name="MONITOR_SERVICES" unique="1" required="0">
+ <parameter name="MONITOR_SERVICES" unique="0" required="0">
<longdesc lang="en">Within a SAP instance there can be several services. Usually you will find the defined services in the START profile of the related instance (Attention: with SAP Release 7.10 the START profile content was moved to the instance profile). Not all of those services are worth to monitor by the cluster. For example you properly do not like to failover your SAP instance, if the central syslog collector daemon fails.
Those services are monitored within the SAPInstance resource agent:
@@ -147,7 +147,7 @@
<shortdesc lang="en">Services to monitor</shortdesc>
<content type="string" default="disp+work|msg_server|enserver|enrepserver|jcontrol|jstart"/>
</parameter>
- <parameter name="SHUTDOWN_METHOD" unique="1" required="0">
+ <parameter name="SHUTDOWN_METHOD" unique="0" required="0">
<longdesc lang="en">Usual a SAP Instance is stopped by the command 'sapcontrol -nr InstanceNr -function Stop'. SHUTDOWN_METHOD=KILL means to kill the SAP Instance using OS commands. SAP processes of the instance are terminated with 'kill -9', shared memory is deleted with 'cleanipc' and the 'kill.sap' file will be deleted. That method is much faster than the gracefull stop, but the instance does not have the chance to say goodbye to other SAPinstances in the same system. USE AT YOUR OWN RISK !!</longdesc>
<shortdesc lang="en">Shutdown graceful or kill a SAP instance by terminating the processes. (normal|KILL)</shortdesc>
<content type="string" default="normal"/>
@@ -174,22 +174,22 @@
<shortdesc lang="en">Enqueue replication start profile name</shortdesc>
<content type="string" default=""/>
</parameter>
- <parameter name="PRE_START_USEREXIT" unique="1" required="0">
+ <parameter name="PRE_START_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed before this resource gets started.</longdesc>
<shortdesc lang="en">Path to a pre-start script</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="POST_START_USEREXIT" unique="1" required="0">
+ <parameter name="POST_START_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed after this resource got started.</longdesc>
<shortdesc lang="en">Path to a post-start script</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="PRE_STOP_USEREXIT" unique="1" required="0">
+ <parameter name="PRE_STOP_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed before this resource gets stopped.</longdesc>
<shortdesc lang="en">Path to a pre-start script</shortdesc>
<content type="string" default="" />
</parameter>
- <parameter name="POST_STOP_USEREXIT" unique="1" required="0">
+ <parameter name="POST_STOP_USEREXIT" unique="0" required="0">
<longdesc lang="en">The full qualified path where to find a script or program which should be executed after this resource got stopped.</longdesc>
<shortdesc lang="en">Path to a post-start script</shortdesc>
<content type="string" default="" />
@@ -321,6 +321,8 @@
fi
fi
+ sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
+
[ -z "$DIR_EXECUTABLE" ] && abnormal_end "Cannot find sapstartsrv and sapcontrol executable, please set DIR_EXECUTABLE parameter!"
if [ -z "$OCF_RESKEY_DIR_PROFILE" ]
@@ -360,8 +362,6 @@
export LD_LIBRARY_PATH
fi
- sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
-
return $OCF_SUCCESS
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/apache new/resource-agents/heartbeat/apache
--- old/resource-agents/heartbeat/apache 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/apache 2012-02-02 04:57:16.000000000 +0100
@@ -447,6 +447,15 @@
<content type="string" default="/etc/apache2/envvars"/>
</parameter>
+<parameter name="use_ipv6">
+<longdesc lang="en">
+We will try to detect if the URL (for monitor) is IPv6, but if
+that doesn't work set this to true to enforce IPv6.
+</longdesc>
+<shortdesc lang="en">use ipv6 with http clients</shortdesc>
+<content type="boolean" default="false"/>
+</parameter>
+
</parameters>
<actions>
@@ -585,7 +594,7 @@
: OK
else
ocf_log err "Cannot parse config file [$CONFIGFILE]"
- exit $OCF_ERR_CONFIGURED
+ exit $OCF_ERR_INSTALLED
fi
case $COMMAND in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/exportfs new/resource-agents/heartbeat/exportfs
--- old/resource-agents/heartbeat/exportfs 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/exportfs 2012-02-02 04:57:16.000000000 +0100
@@ -181,9 +181,12 @@
exportfs_monitor ()
{
- # "grep -z" matches across newlines, which is necessary as
- # exportfs output wraps lines for long export directory names
- exportfs | grep -zqs "${OCF_RESKEY_directory}[[:space:]]*${OCF_RESKEY_clientspec}"
+ # exportfs output wraps lines for long export directory names.
+ # We unwrap here with sed.
+ # We then do a literal match on the full line (grep -x -F)
+ exportfs |
+ sed -e '$! N; s/\n[[:space:]]\+/ /; t; s/[[:space:]]\+\([^[:space:]]\+\)\(\n\|$\)/ \1\2/g; P;D;' |
+ grep -q -x -F "${OCF_RESKEY_directory} ${OCF_RESKEY_clientspec}"
#Adapt grep status code to OCF return code
case $? in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/http-mon.sh new/resource-agents/heartbeat/http-mon.sh
--- old/resource-agents/heartbeat/http-mon.sh 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/http-mon.sh 2012-02-02 04:57:16.000000000 +0100
@@ -15,8 +15,14 @@
# default options for http clients
# NB: We _always_ test a local resource, so it should be
# safe to connect from the local interface.
-WGETOPTS="-O- -q -L --no-proxy --bind-address=127.0.0.1"
-CURLOPTS="-o - -Ss -L --interface lo"
+bind_address="127.0.0.1"
+curl_ipv6_opts=""
+if ocf_is_true "$OCF_RESKEY_use_ipv6" || echo "$STATUSURL" | grep -qs "::"; then
+ bind_address="::1"
+ curl_ipv6_opts="-g"
+fi
+WGETOPTS="-O- -q -L --no-proxy --bind-address=$bind_address"
+CURLOPTS="-o - -Ss -L --interface lo $curl_ipv6_opts"
#
# run the http client
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/iSCSILogicalUnit new/resource-agents/heartbeat/iSCSILogicalUnit
--- old/resource-agents/heartbeat/iSCSILogicalUnit 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/iSCSILogicalUnit 2012-02-02 04:57:16.000000000 +0100
@@ -53,7 +53,7 @@
: ${OCF_RESKEY_scsi_id=${OCF_RESKEY_scsi_id_default}}
# To have a reasonably unique default SCSI SN, use the first 8 bytes
# of an MD5 hash of of $OCF_RESOURCE_INSTANCE
-sn=`echo -n "${OCF_RESOURCE_INSTANCE}" | openssl md5`
+sn=`echo -n "${OCF_RESOURCE_INSTANCE}" | openssl md5 | sed -e 's/(stdin)= //'`
OCF_RESKEY_scsi_sn_default=${sn:0:8}
: ${OCF_RESKEY_scsi_sn=${OCF_RESKEY_scsi_sn_default}}
#######################################################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/iscsi new/resource-agents/heartbeat/iscsi
--- old/resource-agents/heartbeat/iscsi 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/iscsi 2012-02-02 04:57:16.000000000 +0100
@@ -274,7 +274,7 @@
done
}
iscsi_status() {
- if $disk_status $portal $OCF_RESKEY_target; then
+ if $disk_status "$portal" $OCF_RESKEY_target; then
return $OCF_SUCCESS
else
return $OCF_NOT_RUNNING
@@ -316,11 +316,11 @@
}
iscsi_monitor() {
- if $disk_status $portal $OCF_RESKEY_target; then
+ if $disk_status "$portal" $OCF_RESKEY_target; then
return $OCF_SUCCESS
- else
+ else
return $OCF_NOT_RUNNING
- fi
+ fi
}
#
@@ -388,7 +388,14 @@
[ "$1" = status ] && exit $LSB_STATUS_STOPPED
exit $OCF_ERR_GENERIC
;;
-2) exit $OCF_ERR_GENERIC;;
+2) [ "$1" = stop ] && {
+ iscsi_monitor || exit $OCF_SUCCESS
+ }
+ ocf_is_probe && {
+ iscsi_monitor; exit
+ }
+ exit $OCF_ERR_GENERIC
+;;
3) ocf_is_probe && exit $OCF_NOT_RUNNING
exit $OCF_ERR_GENERIC
;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/named new/resource-agents/heartbeat/named
--- old/resource-agents/heartbeat/named 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/named 2012-02-02 04:57:16.000000000 +0100
@@ -274,7 +274,7 @@
output=`$OCF_RESKEY_host $OCF_RESKEY_monitor_request $OCF_RESKEY_monitor_ip`
- if [ $? -ne 0 ] || ! echo $output | grep -q '.* has address '"$OCF_RESKEY_monitor_response"
+ if [ $? -ne 0 ] || ! echo $output | grep -q '.* has .*address '"$OCF_RESKEY_monitor_response"
then
ocf_log err "named didn't answer properly for $OCF_RESKEY_monitor_request."
ocf_log err "Expected: $OCF_RESKEY_monitor_response."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/ocf-shellfuncs.in new/resource-agents/heartbeat/ocf-shellfuncs.in
--- old/resource-agents/heartbeat/ocf-shellfuncs.in 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/ocf-shellfuncs.in 2012-02-02 04:57:16.000000000 +0100
@@ -22,7 +22,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Build version: 72fdc8b2a413ee2820f78a84c4afc1c66bc9bf9d
+# Build version: de3074ce2c9718725a374bcd2199ebc077a7d796
# TODO: Some of this should probably split out into a generic OCF
# library for shell scripts, but for the time being, we'll just use it
@@ -181,6 +181,7 @@
}
ha_log() {
+ local loglevel
[ none = "$HA_LOGFACILITY" ] && HA_LOGFACILITY=""
# if we're connected to a tty, then output to stderr
if tty >/dev/null; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/rsyslog new/resource-agents/heartbeat/rsyslog
--- old/resource-agents/heartbeat/rsyslog 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/rsyslog 2012-02-02 04:57:16.000000000 +0100
@@ -204,6 +204,10 @@
ocf_log err "undefined parameter:configfile"
exit $OCF_ERR_CONFIGURED
fi
+if [[ ! -f "$CONFIGFILE" ]]; then
+ ocf_log err "Config file $CONFIGFILE does not exist."
+ exit $OCF_ERR_CONFIGURED
+fi
RSYSLOG_EXE="${OCF_RESKEY_rsyslog_binary-/sbin/rsyslogd}"
if [[ ! -x "$RSYSLOG_EXE" ]]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/slapd new/resource-agents/heartbeat/slapd
--- old/resource-agents/heartbeat/slapd 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/slapd 2012-02-02 04:57:16.000000000 +0100
@@ -37,8 +37,8 @@
# Initialization:
-: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/resource.d/heartbeat}
-. ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs
+: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
+. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
: ${OCF_RESKEY_slapd="/usr/sbin/slapd"}
: ${OCF_RESKEY_ldapsearch="ldapsearch"}
@@ -385,6 +385,7 @@
local state
local suffix
local suffixes
+ local err_option="-err"
slapd_status `slapd_pid`; state=$?
if [ $state -eq $OCF_NOT_RUNNING ]; then
@@ -433,8 +434,9 @@
options="$options -D '$bind_dn' -w '$password'"
fi
+ [ -z "$1" ] && err_option=""
for suffix in $suffixes; do
- ocf_run -q "$ldapsearch" -H "$services" -b "$suffix" $options >/dev/null 2>&1; result=$?
+ ocf_run -q $err_option "$ldapsearch" -H "$services" -b "$suffix" $options >/dev/null 2>&1; result=$?
case "$result" in
"0")
@@ -445,8 +447,10 @@
return $OCF_ERR_CONFIGURED
;;
*)
- ocf_log err "slapd database with suffix '$suffix' unreachable."
- state=$OCF_ERR_GENERIC
+ if [ -z "$1" ] || [ -n "$1" -a $result -ne 1 ]; then
+ ocf_log err "slapd database with suffix '$suffix' unreachable. exit code ($result)"
+ state=$OCF_ERR_GENERIC
+ fi
;;
esac
done
@@ -531,8 +535,8 @@
esac
slapd_validate_all
-
-[ $? -eq $OCF_SUCCESS ] || exit $?
+rc=$?
+[ $rc -eq $OCF_SUCCESS ] || exit $rc
case $1 in
status)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents/heartbeat/tomcat new/resource-agents/heartbeat/tomcat
--- old/resource-agents/heartbeat/tomcat 2011-12-09 06:05:01.000000000 +0100
+++ new/resource-agents/heartbeat/tomcat 2012-02-02 04:57:16.000000000 +0100
@@ -26,7 +26,7 @@
# OCF_RESKEY_script_log - A destination of the log of this script. Default /var/log/OCF_RESKEY_tomcat_name.log
# OCF_RESKEY_tomcat_stop_timeout - Time-out at the time of the stop. Default is 5. DEPRECATED
# OCF_RESKEY_tomcat_suspend_trialcount - The re-try number of times awaiting a stop. Default is 10. DEPRECATED
-# OCF_RESKEY_tomcat_user - A user name to start a resource. Default is root
+# OCF_RESKEY_tomcat_user - A user name to start a resource.
# OCF_RESKEY_statusurl - URL for state confirmation. Default is http://127.0.0.1:8080
# OCF_RESKEY_java_home - Home directory of Java. Default is none
# OCF_RESKEY_java_opts - Options to pass to Java JVM for start and stop. Default is none
@@ -82,8 +82,16 @@
#
isalive_tomcat()
{
- pgrep -f "${SEARCH_STR}" > /dev/null
+ if [ -f $CATALINA_PID ]; then
+ PID=`head -n 1 $CATALINA_PID`
+ # Retry message for restraint
+ kill -s 0 $PID >/dev/null 2>&1
+ return $?
+ fi
+ # No PID file
+ false
}
+
############################################################################
# Check tomcat process and service availability
monitor_tomcat()
@@ -203,7 +211,10 @@
sleep 1
lapse_sec=`expr $lapse_sec + 1`
ocf_log debug "stop_tomcat[$TOMCAT_NAME]: stop failed, killing with SIGKILL ($lapse_sec)"
- pkill -KILL -f "${SEARCH_STR}"
+ if [ -f $CATALINA_PID ]; then
+ PID=`head -n 1 $CATALINA_PID`
+ kill -KILL $PID
+ fi
done
if [ ${CATALINA_ROTATE_LOG} = "YES" ]; then
@@ -214,12 +225,6 @@
return $OCF_SUCCESS
}
-status_tomcat()
-{
- return $OCF_SUCCESS
-}
-
-
metadata_tomcat()
{
cat <