commit heartbeat for openSUSE:Factory
Hello community, here is the log from the commit of package heartbeat for openSUSE:Factory checked in at Mon Mar 9 22:53:45 CET 2009. -------- --- heartbeat/heartbeat.changes 2009-03-05 15:53:30.000000000 +0100 +++ heartbeat/heartbeat.changes 2009-03-06 13:25:51.000000000 +0100 @@ -1,0 +2,5 @@ +Fri Mar 6 13:24:16 CET 2009 - abeekhof@suse.de + +- HBcomm.h and HBauth.h need to be in the common devel package + +------------------------------------------------------------------- @@ -6,0 +12,27 @@ +Wed Feb 25 16:30:12 CET 2009 - abeekhof@suse.de + +- Remove the dependancy on libdlm, it doesnt belong here + Move to Pacemaker as a Recommends: + +------------------------------------------------------------------- +Mon Feb 23 15:30:00 CET 2009 - lmb@suse.de + +- RA: IPv6addr: failed on /64 prefixes +- RA: scsi2reservation: fix wrong logic in check for scsi_reserve +- lrmd: add more logging in case client disappeared (bnc#475218) +- lrmd: make sure that the client gets the message on async failure + request (bnc#475218) +- Tools: hb_report: fix quoting in find binary for core +- Tools: hb_report: improve getting the name of the program which caused + a coredump +- ocf-tester: monitor a stopped resource must always return 7, not 1. + +------------------------------------------------------------------- +Tue Feb 03 12:15:00 CET 2009 - lmb@suse.de + +- hb_report: minor cleanups. +- RA: VirtualDomain: exit with proper code if there is a problem with + the configuration file (LF#1982). +- Remove a glib2/PILS compile-time warning (LF#2039). + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ heartbeat.spec ++++++ --- /var/tmp/diff_new_pack.q23309/_old 2009-03-09 22:44:49.000000000 +0100 +++ /var/tmp/diff_new_pack.q23309/_new 2009-03-09 22:44:49.000000000 +0100 @@ -37,7 +37,7 @@ Name: heartbeat Summary: The Heartbeat Subsystem for High-Availability Linux Version: 2.99.3 -Release: 10 +Release: 11 License: GPL v2 only; LGPL v2.1 or later Url: http://linux-ha.org/ Group: Productivity/Clustering/HA @@ -155,7 +155,6 @@ License: GPL v2 or later; LGPL v2.1 or later Summary: OCF Compliant Cluster Resource Scripts Group: Productivity/Clustering/HA -Requires: libdlm %description resources OCF resource agents suitable for use with the Pacemaker cluster @@ -716,8 +715,10 @@ %{_includedir}/heartbeat/lrm %{_includedir}/heartbeat/apphb.h %{_includedir}/heartbeat/apphb_notify.h -%{_includedir}/heartbeat/compress.h +%{_includedir}/heartbeat/HBauth.h +%{_includedir}/heartbeat/HBcomm.h %{_includedir}/heartbeat/ha_msg.h +%{_includedir}/heartbeat/compress.h %{_includedir}/heartbeat/hb_config.h %{_includedir}/heartbeat/heartbeat.h %{_includedir}/heartbeat/replace_uuid.h @@ -736,8 +737,6 @@ #%doc %{_datadir}/doc/%{name}-%{version} %{_includedir}/saf/ %{_includedir}/ocf/ -%{_includedir}/heartbeat/HBauth.h -%{_includedir}/heartbeat/HBcomm.h %{_includedir}/heartbeat/hb_api.h %exclude %{_libdir}/libclm*.so %exclude %{_libdir}/libhbclient*.so @@ -798,8 +797,28 @@ %config(noreplace) %{_sysconfdir}/logrotate.d/ldirectord %changelog +* Fri Mar 06 2009 abeekhof@suse.de +- HBcomm.h and HBauth.h need to be in the common devel package * Thu Mar 05 2009 ro@suse.de - ignore return value from subshells to fix build +* Wed Feb 25 2009 abeekhof@suse.de +- Remove the dependancy on libdlm, it doesnt belong here + Move to Pacemaker as a Recommends: +* Mon Feb 23 2009 lmb@suse.de +- RA: IPv6addr: failed on /64 prefixes +- RA: scsi2reservation: fix wrong logic in check for scsi_reserve +- lrmd: add more logging in case client disappeared (bnc#475218) +- lrmd: make sure that the client gets the message on async failure + request (bnc#475218) +- Tools: hb_report: fix quoting in find binary for core +- Tools: hb_report: improve getting the name of the program which caused + a coredump +- ocf-tester: monitor a stopped resource must always return 7, not 1. +* Tue Feb 03 2009 lmb@suse.de +- hb_report: minor cleanups. +- RA: VirtualDomain: exit with proper code if there is a problem with + the configuration file (LF#1982). +- Remove a glib2/PILS compile-time warning (LF#2039). * Mon Jan 26 2009 lmb@suse.de - hb_report: try root user first with ssh, and better ssh logging (bnc#467991). ++++++ heartbeat.tar.gz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/debian/rules new/heartbeat/debian/rules --- old/heartbeat/debian/rules 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/debian/rules 2009-02-23 15:49:35.000000000 +0100 @@ -33,7 +33,8 @@ UPSTREAM := $(shell echo "$(RELEASE)" | sed 's/:\?\([0-9\.]\+\)-[0-9].*/\1/') -configure: checkbuild +build: checkbuild build-stamp +build-stamp: dh_testdir # Allow debian packages to also be built directly from Hg archives # Official debian packages are built from dist tarballs @@ -42,10 +43,8 @@ $(MAKE) touch build-stamp -build: checkbuild configure build-stamp -build-stamp: - -clean: configure +clean: + dh_testdir dh_testroot dh_clean rm -f build-stamp install-stamp diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/.hg_archival.txt new/heartbeat/.hg_archival.txt --- old/heartbeat/.hg_archival.txt 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/.hg_archival.txt 2009-02-23 15:49:35.000000000 +0100 @@ -1,2 +1,2 @@ repo: 8448b17e67437947c48c639c6faa4371c4a14b3b -node: cad9fde7630c548b626b14964c1c689ee8239cf4 +node: 5e1a6f65bda19abbb66f3e8d442e22d9e473a970 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/.hgtags new/heartbeat/.hgtags --- old/heartbeat/.hgtags 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/.hgtags 2009-02-23 15:49:35.000000000 +0100 @@ -35,3 +35,6 @@ 7d5b329e13ca485b43826bfb80679ce6b9dc5324 beta-2.99.2 9dbbc2cbd414036ea5e4e3a901fc3f48f5d5f1ad sle11-beta6 69386699962181fa8f8d6a1f4ace39d4a46df2e7 sle11-rc2 +cad9fde7630c548b626b14964c1c689ee8239cf4 sle11-rc3 +90ff997faa7288248ac57583b0c03df4c8e41bda sle11-rc5 +4403e840c159912b460806febdf160beca7c986e sle11-rc5 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/include/pils/plugin.h.in new/heartbeat/include/pils/plugin.h.in --- old/heartbeat/include/pils/plugin.h.in 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/include/pils/plugin.h.in 2009-02-23 15:49:35.000000000 +0100 @@ -401,6 +401,18 @@ typedef void (*PILLogFun)(PILLogLevel priority, const char * fmt, ...); /* + * The size glib2 type du jour? + * (once, this used to be size_t, so this change could break + * distributions with older glib2 versions; if so, just add an + * #ifelse below) + */ +#if GLIB_MINOR_VERSION <= 14 + typedef gulong glib_size_t; +#else + typedef gsize glib_size_t; +#endif + +/* * struct PILPluginImports_s (typedef PILPluginImports) defines * the functions and capabilities that every plugin imports when it is loaded. */ @@ -442,9 +454,9 @@ , void* plugin_private); void (*log) (PILLogLevel priority, const char * fmt, ...); - void* (*alloc)(size_t size); - void* (*mrealloc)(void * ptr, size_t size); - void (*mfree)(void* space); + gpointer (*alloc)(glib_size_t size); + gpointer (*mrealloc)(gpointer space, glib_size_t size); + void (*mfree)(gpointer space); char* (*mstrdup)(const char *s); }; @@ -465,8 +477,8 @@ /* Change memory allocation functions right after creating universe */ void PilPluginUnivSetMemalloc(PILPluginUniv* -, void* (*alloc)(size_t size) -, void* (*mrealloc)(void *, size_t size) +, gpointer (*alloc)(glib_size_t size) +, gpointer (*mrealloc)(gpointer, glib_size_t size) , void (*mfree)(void* space) , char* (*mstrdup)(const char *s)); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/lib/pils/pils.c new/heartbeat/lib/pils/pils.c --- old/heartbeat/lib/pils/pils.c 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/lib/pils/pils.c 2009-02-23 15:49:35.000000000 +0100 @@ -492,8 +492,8 @@ /* Change memory allocation functions immediately after creating universe */ void PilPluginUnivSetMemalloc(PILPluginUniv* u -, void* (*allocfun)(size_t size) -, void* (*reallocfun)(void * ptr, size_t size) +, gpointer (*allocfun)(glib_size_t size) +, gpointer (*reallocfun)(gpointer ptr, glib_size_t size) , void (*freefun)(void* space) , char* (*strdupfun)(const char *s)) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/lrm/lrmd/lrmd.c new/heartbeat/lrm/lrmd/lrmd.c --- old/heartbeat/lrm/lrmd/lrmd.c 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/lrm/lrmd/lrmd.c 2009-02-23 15:49:35.000000000 +0100 @@ -593,8 +593,8 @@ lrmd_rsc_t* rsc; rsc = (lrmd_rsc_t *)calloc(sizeof(lrmd_rsc_t),1); if (rsc == NULL) { - lrmd_log(LOG_ERR, "lrmd_rsc_new(): out of memory when calloc " - "a lrmd_rsc_t"); + lrmd_log(LOG_ERR, "%s: out of memory when calloc " + "a lrmd_rsc_t", __FUNCTION__); return NULL; } rsc->delay_timeout = (guint)0; @@ -2031,19 +2031,8 @@ if (!client) { lrmd_log(LOG_INFO, "%s: client %s not found, probably signed out", __FUNCTION__, (char *)key); - return; - } - if (HA_OK != ha_msg_mod(msg,F_LRM_APP,client->app_name)) { - lrmd_log(LOG_ERR,"%s:%d: cannot add field to a message" - , __FUNCTION__, __LINE__); - return; - } - if (!client->ch_cbk) { - lrmd_log(LOG_WARNING, - "%s: callback channel is null", __FUNCTION__); - } else if (HA_OK != msg2ipcchan(msg, client->ch_cbk)) { - lrmd_log(LOG_WARNING, - "%s: can not send the ret msg", __FUNCTION__); + } else { + send_msg(msg, client); } } @@ -2082,7 +2071,13 @@ , "received asynchronous failure for rsc %s (rc: %d, reason: %s)" , lrmd_nullcheck(id), fail_rc, fail_reason); /* notify all clients from last_op table about the failure */ - g_hash_table_foreach(rsc->last_op_table,async_notify,msg); + if (rsc->last_op_table) { + g_hash_table_foreach(rsc->last_op_table,async_notify,msg); + } else { + lrmd_log(LOG_INFO + , "rsc to be failed %s had no operations so far", lrmd_nullcheck(id)); + send_msg(msg, client); + } return HA_OK; } @@ -3343,6 +3338,39 @@ return HA_OK; } +static void +send_cbk_msg(struct ha_msg* msg, lrmd_client_t* client) +{ + if (!client) { + lrmd_log(LOG_WARNING, + "%s: zero client", __FUNCTION__); + return; + } + if (!client->ch_cbk) { + lrmd_log(LOG_WARNING, + "%s: callback channel is null", __FUNCTION__); + } else if (HA_OK != msg2ipcchan(msg, client->ch_cbk)) { + lrmd_log(LOG_WARNING, + "%s: can not send the ret msg", __FUNCTION__); + } +} + +static void +send_msg(struct ha_msg* msg, lrmd_client_t* client) +{ + if (!client) { + lrmd_log(LOG_WARNING, + "%s: zero client", __FUNCTION__); + return; + } + if (HA_OK != ha_msg_mod(msg,F_LRM_APP,client->app_name)) { + lrmd_log(LOG_ERR,"%s:%d: cannot add field to a message" + , __FUNCTION__, __LINE__); + return; + } + send_cbk_msg(msg, client); +} + void notify_client(lrmd_op_t* op) { @@ -3350,13 +3378,7 @@ if (client) { /* send the result to client */ - if (!client->ch_cbk) { - lrmd_log(LOG_ERR, - "%s: callback channel is null", __FUNCTION__); - } else if (HA_OK != msg2ipcchan(op->msg, client->ch_cbk)) { - lrmd_log(LOG_ERR, - "%s: can not send the ret msg", __FUNCTION__); - } + send_cbk_msg(op->msg, client); } else { lrmd_log(LOG_ERR , "%s: client for the operation %s does not exist" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/lrm/lrmd/lrmd_fdecl.h new/heartbeat/lrm/lrmd/lrmd_fdecl.h --- old/heartbeat/lrm/lrmd/lrmd_fdecl.h 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/lrm/lrmd/lrmd_fdecl.h 2009-02-23 15:49:35.000000000 +0100 @@ -48,6 +48,8 @@ static int unregister_client(lrmd_client_t* client); static int on_op_done(lrmd_rsc_t* rsc, lrmd_op_t* op); static int send_ret_msg ( IPC_Channel* ch, int rc); +static void send_cbk_msg(struct ha_msg* msg, lrmd_client_t* client); +static void send_msg(struct ha_msg* msg, lrmd_client_t* client); static void notify_client(lrmd_op_t* op); static lrmd_client_t* lookup_client (pid_t pid); static lrmd_rsc_t* lookup_rsc (const char* rid); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/resources/OCF/anything new/heartbeat/resources/OCF/anything --- old/heartbeat/resources/OCF/anything 1970-01-01 01:00:00.000000000 +0100 +++ new/heartbeat/resources/OCF/anything 2009-02-23 15:49:35.000000000 +0100 @@ -0,0 +1,279 @@ +#!/bin/sh +# +# OCF Resource Agent compliant resource script. +# +# Copyright (c) 2009 IN-telegence GmbH & Co. KG, Dominik Klein +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Further, this software is distributed without any warranty that it is +# free of the rightful claim of any third person regarding infringement +# or the like. Any license provided herein, whether implied or +# otherwise, applies only to this software file. Patent licenses, if +# any, provided herein do not apply to combinations of this program with +# other software, or any other product whatsoever. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + +# OCF instance parameters +# OCF_RESKEY_binfile +# OCF_RESKEY_cmdline_options +# OCF_RESKEY_pidfile +# OCF_RESKEY_logfile +# OCF_RESKEY_errlogfile +# OCF_RESKEY_user +# OCF_RESKEY_monitor_hook +# +# This RA starts $binfile with $cmdline_options as $user and writes a $pidfile from that. +# If you want it to, it logs: +# - stdout to $logfile, stderr to $errlogfile or +# - stdout and stderr to $logfile +# - or to will be captured by lrmd if these options are omitted. +# Monitoring is done through $pidfile or your custom $monitor_hook script. +# The RA expects the program to keep running "daemon-like" and +# not just quit and exit. So this is NOT (yet - feel free to +# enhance) a way to just run a single one-shot command which just +# does something and then exits. + +# Initialization: +. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs + +getpid() { # make sure that the file contains a number + # FIXME: pidfiles could contain spaces + grep '^[0-9][0-9]*$' $1 +} + +anything_status() { + # FIXME: This should use pidofproc + # FIXME: pidfile w/o process means the process died, so should + # be ERR_GENERIC + if test -f "$pidfile" && pid=`getpid $pidfile` && kill -0 $pid + then + return $OCF_RUNNING + else + return $OCF_NOT_RUNNING + fi +} + +anything_start() { + if ! anything_status + # FIXME: use start_daemon + # FIXME: What about daemons which can manage their own pidfiles? + then + if [ -n "$logfile" -a -n "$errlogfile" ] + then + # We have logfile and errlogfile, so redirect STDOUT und STDERR to different files + cmd="su - $user -c \"nohup $binfile $cmdline_options >> $logfile 2>> $errlogfile & \"'echo \$!' " + else if [ -n "$logfile" ] + then + # We only have logfile so redirect STDOUT and STDERR to the same file + cmd="su - $user -c \"nohup $binfile $cmdline_options >> $logfile 2>&1 & \"'echo \$!' " + else + # We have neither logfile nor errlogfile, so we're not going to redirect anything + cmd="su - $user -c \"nohup $binfile $cmdline_options & \"'echo \$!'" + fi + fi + ocf_log debug "Starting $process: $cmd" + # Execute the command as created above + eval $cmd > $pidfile + if anything_status + then + ocf_log debug "$process: $cmd started successfully" + return $OCF_SUCCESS + else + ocf_log err "$process: $cmd could not be started" + return $OCF_ERR_GENERIC + fi + else + # If already running, consider start successful + ocf_log debug "$process: $cmd is already running" + return $OCF_SUCCESS + fi +} + +anything_stop() { + # FIXME: use killproc + if anything_status + then + pid=`getpid $pidfile` + kill $pid + i=0 + # FIXME: escalate to kill -9 before timeout + while sleep 1 + do + if ! anything_status + then + rm -f $pidfile > /dev/null 2>&1 + return $OCF_SUCCESS + fi + let "i++" + done + else + # was not running, so stop can be considered successful + rm -f $pidfile + return $OCF_SUCCESS + fi + # FIXME: Never reached. + return $OCF_ERR_GENERIC +} + +anything_monitor() { + anything_status + ret=$? + if [ $ret -eq $OCF_SUCCESS ] + then + # implement your deeper monitor operation here + if [ -n "$OCF_RESKEY_monitor_hook" ]; then + eval "$OCF_RESKEY_monitor_hook" + # FIXME: Implement a check that this doesn't + # accidentially return NOT_RUNNING? + return + else + true + fi + else + return $ret + fi +} + +# FIXME: Attributes special meaning to the resource id +process="$OCF_RESOURCE_INSTANCE" +binfile="$OCF_RESKEY_binfile" +cmdline_options="$OCF_RESKEY_cmdline_options" +pidfile="$OCF_RESKEY_pidfile" +# FIXME: Why test for $binfile here? +[ -z "$pidfile" -a -n "$binfile" ] && pidfile=${HA_VARRUN}/anything_${process}.pid +logfile="$OCF_RESKEY_logfile" +errlogfile="$OCF_RESKEY_errlogfile" +user="$OCF_RESKEY_user" +[ -z "$user" ] && user=root + +anything_validate() { + # FIXME: Actually this needs to test from the point of view of + # the user. + if [ ! -x "$binfile" ] + then + ocf_log err "binfile $binfile does not exist or is not executable." + exit $OCF_ERR_INSTALLED + fi + if ! getent passwd $user >/dev/null 2>&1 + then + ocf_log err "user $user does not exist." + exit $OCF_ERR_INSTALLED + fi + for logfilename in "$logfile" "$errlogfile" + do + if [ -n "$logfilename" ]; then + mkdir -p `dirname $logfilename` || { + ocf_log err "cannot create $(dirname $logfilename)" + exit $OCF_ERR_INSTALLED + } + fi + done + return $OCF_SUCCESS +} + +anything_meta() { +cat <<END +<?xml version="1.0"?> +<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> +<resource-agent name="anything_ra"> +<version>1.0</version> +<longdesc lang="en"> +This is a generic OCF RA to manage almost anything. +</longdesc> +<shortdesc lang="en">anything</shortdesc> + +<parameters> +<parameter name="binfile" required="1" unique="1"> +<longdesc lang="en"> +The full name of the binary to be executed. This is expected to keep running with the same pid and not just do something and exit. +</longdesc> +<shortdesc lang="en">Full path name of the binary to be executed</shortdesc> +<content type="string" default=""/> +</parameter> +<parameter name="cmdline_options" required="0"> +<longdesc lang="en"> +Command line options to pass to the binary +</longdesc> +<shortdesc lang="en">Command line options</shortdesc> +<content type="string" /> +</parameter> +<parameter name="pidfile"> +<longdesc lang="en"> +File to read/write the PID from/to. +</longdesc> +<shortdesc lang="en">File to write STDOUT to</shortdesc> +<content type="string" default="${HA_VARRUN}/anything_${process}.pid"/> +</parameter> +<parameter name="logfile" required="0"> +<longdesc lang="en"> +File to write STDOUT to +</longdesc> +<shortdesc lang="en">File to write STDOUT to</shortdesc> +<content type="string" /> +</parameter> +<parameter name="errlogfile" required="0"> +<longdesc lang="en"> +File to write STDERR to +</longdesc> +<shortdesc lang="en">File to write STDERR to</shortdesc> +<content type="string" /> +</parameter> +<parameter name="user" required="0"> +<longdesc lang="en"> +User to run the command as +</longdesc> +<shortdesc lang="en">User to run the command as</shortdesc> +<content type="string" default="root"/> +</parameter> +<parameter name="monitor_hook"> +<longdesc lang="en"> +Command to run in monitor operation +</longdesc> +<shortdesc lang="en">Command to run in monitor operation</shortdesc> +<content type="string"/> +</parameter> +</parameters> +<actions> +<action name="start" timeout="90" /> +<action name="stop" timeout="100" /> +<action name="monitor" depth="0" timeout="20" interval="10" /> +<action name="meta-data" timeout="5" /> +<action name="validate-all" timeout="5" /> +</actions> +</resource-agent> +END +exit 0 +} + +case "$1" in + meta-data|metadata|meta_data) + anything_meta + ;; + start) + anything_start + ;; + stop) + anything_stop + ;; + monitor) + anything_monitor + ;; + validate-all) + anything_validate + ;; + *) + ocf_log err "$0 was called with unsupported arguments: $*" + exit $OCF_ERR_UNIMPLEMENTED + ;; +esac diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/resources/OCF/IPv6addr.c new/heartbeat/resources/OCF/IPv6addr.c --- old/heartbeat/resources/OCF/IPv6addr.c 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/resources/OCF/IPv6addr.c 2009-02-23 15:49:35.000000000 +0100 @@ -499,7 +499,10 @@ n = plen / 32; memset(mask.s6_addr32 + n + 1, 0, (3 - n) * 4); s = 32 - plen % 32; - mask.s6_addr32[n] = 0xffffffff << s; + if (s == 32) + mask.s6_addr32[n] = 0x0; + else + mask.s6_addr32[n] = 0xffffffff << s; mask.s6_addr32[n] = htonl(mask.s6_addr32[n]); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/resources/OCF/Makefile.am new/heartbeat/resources/OCF/Makefile.am --- old/heartbeat/resources/OCF/Makefile.am 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/resources/OCF/Makefile.am 2009-02-23 15:49:35.000000000 +0100 @@ -47,6 +47,7 @@ IPaddr \ IPaddr2 \ drbd \ + anything \ apache \ AudibleAlarm \ db2 \ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/resources/OCF/scsi2reservation new/heartbeat/resources/OCF/scsi2reservation --- old/heartbeat/resources/OCF/scsi2reservation 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/resources/OCF/scsi2reservation 2009-02-23 15:49:35.000000000 +0100 @@ -96,7 +96,7 @@ scsi2reserve_validate () { : ${OCF_RESKEY_start_loop=10} - if [ -x "${OCF_RESKEY_scsi_reserve}" ]; then + if [ ! -x "${OCF_RESKEY_scsi_reserve}" ]; then exit $OCF_ERR_INSTALLED fi if [ -z "${OCF_RESKEY_sharedisk}" ]; then diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/resources/OCF/VirtualDomain new/heartbeat/resources/OCF/VirtualDomain --- old/heartbeat/resources/OCF/VirtualDomain 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/resources/OCF/VirtualDomain 2009-02-23 15:49:35.000000000 +0100 @@ -264,7 +264,7 @@ # deduce $DOMAIN_NAME from it, see below) if [ ! -r $OCF_RESKEY_config ]; then ocf_log error "Configuration file $OCF_RESKEY_config does not exist or is not readable." - return $OCF_ERR_CONFIGURED + return $OCF_ERR_INSTALLED fi } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/tools/hb_report.in new/heartbeat/tools/hb_report.in --- old/heartbeat/tools/hb_report.in 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/tools/hb_report.in 2009-02-23 15:49:35.000000000 +0100 @@ -373,7 +373,7 @@ # replace sensitive info with '****' # sanitize() { - for f in $1/$B_CONF $1/$CIB_F $1/pengine/*; do + for f in $1/$B_CONF $1/$CIB_F $1/$CIB_TXT_F $1/pengine/*; do [ -f "$f" ] && sanitize_one $f done } @@ -572,7 +572,7 @@ } finalword() { cat<<EOF -The report is saved in $DESTDIR.tar$COMPRESS_EXT. +The report is saved in $DESTDIR.tar$COMPRESS_EXT Thank you for taking time to create this report. EOF @@ -668,7 +668,7 @@ PACKAGES="openais $COMMON_PACKAGES" CF_SUPPORT=$HA_NOARCHBIN/openais_conf_support.sh CORES_DIRS="$CORES_DIRS /var/lib/openais" - MEMBERSHIP_TOOL_OPTS="-A" + MEMBERSHIP_TOOL_OPTS="" unset HOSTCACHE HB_UUID_F ;; heartbeat) @@ -719,7 +719,8 @@ CRM_VERIFY_F=crm_verify.txt PERMISSIONS_F=permissions.txt CIB_F=cib.xml -export CRM_MON_F MEMBERSHIP_F CRM_VERIFY_F CIB_F HB_UUID_F PERMISSIONS_F +CIB_TXT_F=cib.txt +export CRM_MON_F MEMBERSHIP_F CRM_VERIFY_F CIB_F CIB_TXT_F HB_UUID_F PERMISSIONS_F # this only on master if [ "$SLAVE" = "" ]; then diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/tools/ocf-tester.in new/heartbeat/tools/ocf-tester.in --- old/heartbeat/tools/ocf-tester.in 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/tools/ocf-tester.in 2009-02-23 15:49:35.000000000 +0100 @@ -252,11 +252,6 @@ if [ $rc -eq 3 ]; then assert $rc 7 "Your agent does not support the monitor action" 1 -elif [ $rc -eq 1 ]; then - assert $rc 7 "Monitoring a stopped resources should return 0" - echo "Test updated to expect 1 for stopped resources for the remainder of this run" - stopped_rc=1 - elif [ $rc -eq 8 ]; then test_command demote "Cleanup, demote" assert $? 0 "Your agent was a master and could not be demoted" 1 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/heartbeat/tools/utillib.sh new/heartbeat/tools/utillib.sh --- old/heartbeat/tools/utillib.sh 2009-01-23 14:19:11.000000000 +0100 +++ new/heartbeat/tools/utillib.sh 2009-02-23 15:49:35.000000000 +0100 @@ -36,7 +36,7 @@ echo_membership_tool() { membership_tools="ccm_tool crm_node" for f in $membership_tools; do - which $f && break + which $f 2>/dev/null && break done } # @@ -300,6 +300,20 @@ binary=`gdb $random_binary $1 < /dev/null 2>/dev/null | grep 'Core was generated' | awk '{print $5}' | sed "s/^.//;s/[.':]*$//"` + if [ x = x"$binary" ]; then + binary=$(file $1 | awk '/from/{ + for( i=1; i<=NF; i++ ) + if( $i == "from" ) { + print $(i+1) + break + } + }') + binary=`echo $binary | tr -d "'"` + binary=$(echo $binary | tr -d '`') + if [ "$binary" ]; then + binary=`which $binary 2>/dev/null` + fi + fi [ x = x"$binary" ] && return fullpath=`which $binary 2>/dev/null` if [ x = x"$fullpath" ]; then @@ -367,6 +381,9 @@ crm_uuid -r > $1/$HB_UUID_F 2>&1 [ -f "$1/$CIB_F" ] && crm_verify -V -x $1/$CIB_F >$1/$CRM_VERIFY_F 2>&1 + [ -f "$1/$CIB_F" ] && which crm >/dev/null 2>&1 && + CIB_file=$1/$CIB_F crm configure show >$1/$CIB_TXT_F 2>&1 + } get_crm_nodes() { cibadmin -Ql -o nodes | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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