Hello community,

here is the log from the commit of package resource-agents for openSUSE:Factory
checked in at Wed Sep 21 17:22:23 CEST 2011.



--------
--- resource-agents/resource-agents.changes     2011-08-05 08:34:52.000000000 
+0200
+++ /mounts/work_src_done/STABLE/resource-agents/resource-agents.changes        
2011-09-20 16:54:37.000000000 +0200
@@ -1,0 +2,69 @@
+Tue Sep 20 14:51:43 UTC 2011 - tser...@suse.com
+
+- Filesystem: add tmpfs to the list of supported filesystems
+- exportfs: fix adding the fsid parameter to options
+- pgsql: fix meta-data the config param type in meta-data
+- IPaddr: don't search for the IP address in the route table on
+  remove
+- CTDB: Improve monitor op (check output of ctdb status, bnc#712192)
+- CTDB: Set ctdb_start_as_disabled=no by default (bnc#712410)
+- Filesystem: add support for glusterfs (lf#2620)
+- ocf-shellfuncs: fix wrong logic introduced in commit 8468b5
+  (fixes wrong cluster prefix in log messages)
+- Filesystem: don't use direct dd option in monitor depth 20 for
+  non-blockdevice fs
+- CTDB: Add smb_fileid_algorithm parameter
+- Implemetation of Dynamic utilization detection and setting.
+  Based on FATE#310117 and FATE#310115.
+- ocf-shellfuncs: add RA instance name to ocf_log/debug
+- Raid1: support for multiple MD arrays, as specified in raidconf
+- ethmonitor: new RA to monitor network interfaces
+- conntrackd: new RA
+- lxc: new RA to manage lxc linux containers
+- symlink: new RA to manage symbolic links
+- VirtualDomain: if there's no config exit with success on stop
+- Tools: send_arp: fix the PID file location (bnc#702099)
+- iscsi: fix support for open-iscsi version 2.0-872 (lf#2562)
+- pgsql: don't check directories on probes
+- db2: new implementation with master/slave mode
+- exportfs: backup and restore rmtab to ensure smooth client
+  failover on node failures
+- CTDB: Allow stop to succeed when using pkill on ctdbd (bnc#695829)
+- CTDB: Use op timeout when invoking ctdb client (bnc#697428)
+- CTDB: Use 'chmod' instead of 'ctdb enablescript' (bnc#697152)
+- mysql: --skip-slave-start option is default now
+- mysql: set connect timeout to 10 seconds rather than 1 second
+- mysql: keep replication state (prevents data loss on master reset)
+- mysql: don't rely on state information from pacemaker, but
+  check if the instance is in the read-only mode
+- mysql: if test parameters are all set, assume OCF_CHECK_LEVEL=10
+- mysql: support for master/slave for more than two nodes
+- mysql: don't wait for replication to finish, when not replicating
+- mysql: store replication state in separate attributes for each master
+- pgsql: improve configuration check and probe handling
+- VirtualDomain: correctly create migration URI when target is an FQDN
+- VirtualDomain: properly wait until domain_name is non-empty
+- ldirectord: add a support of "netmask" directive for IPv6
+- ldirectord: fix fwmark behavior for IPv6
+- ldirectord: ignore children in Net::DNS
+- iscsi: add support for open-iscsi version 2.0-872 (lf#2562)
+- postfix: issue error if 'postfix abort' failed
+- postfix: improve exit codes on installation problems
+- postfix: use monitor to test if postfix works after the start action
+- ocft: fix make command for compatibility with mawk/Debian (lf#2600)
+- ocft: test case for pgsql
+- ocft: test case for postfix
+- ocft: test case for iscsi
+- ocft: new testcases for db2, Filesystem, and LVM
+- doc: add man page for sfex_init
+- doc: improve man pages output
+- doc: add examples for master/slave resource agents
+- doc: improve legibility of generated man pages
+- ocf-tester: tolerate OCF_ERR_INSTALLED on probes and missing binaries
+- update spec file to match the new autoconf setup
+- add OCF_ROOT/lib/heartbeat directory for ocf-shellfuncs et al
+- remove compatibility scripts /usr/lib/heartbeat/ocf-*
+- oracle: improve oracle process list test (bnc#673027)
+- upstream cs: 957d32 (v3.9.2)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  resource-agents-1.0.3.tar.bz2

New:
----
  0001-Build-Add-a-new-agent-NodeUtilization.patch
  0001-Low-VirtualDomain-Add-a-functionality-that-modifies.patch
  ctdb-bnc-696978-01-add-smb_fileid_algorithm.patch
  ctdb-bnc-712192-monitor-status.patch
  ctdb-bnc-712410-default-enabled.patch
  resource-agents-3.9.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.mCIqWw/_old  2011-09-21 17:22:18.000000000 +0200
+++ /var/tmp/diff_new_pack.mCIqWw/_new  2011-09-21 17:22:18.000000000 +0200
@@ -38,8 +38,8 @@
 
 Name:           resource-agents
 Summary:        The Heartbeat Subsystem for High-Availability Linux
-Version:        1.0.3
-Release:        12
+Version:        3.9.2
+Release:        0
 License:        GPLv2 ; LGPLv2.1+
 Url:            http://linux-ha.org/
 Group:          Productivity/Clustering/HA
@@ -48,6 +48,11 @@
 Patch2:         lvm-vg-partial-active.diff
 Patch3:         resource-agents-nfsserver-sle11.patch
 Patch4:         no-var-lock-subsys.patch
+Patch6:         0001-Build-Add-a-new-agent-NodeUtilization.patch
+Patch7:         0001-Low-VirtualDomain-Add-a-functionality-that-modifies.patch
+Patch8:         ctdb-bnc-696978-01-add-smb_fileid_algorithm.patch
+Patch10:        ctdb-bnc-712410-default-enabled.patch
+Patch11:        ctdb-bnc-712192-monitor-status.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 AutoReqProv:    on
 Obsoletes:      heartbeat-resources
@@ -160,22 +165,26 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch10 -p1
+%patch11 -p1
 ###########################################################
 
 %build
 CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
 export CFLAGS
+CONF_OPTS="--with-ras-set=linux-ha \
+    --enable-fatal-warnings=yes \
+    --with-package-name=%{name}"
 ./autogen.sh
 %if 0%{?suse_version} >= 1020 || 0%{?fedora} >= 11 || 0%{?centos_version} > 5 
|| 0%{?rhel} > 5
-%configure \
-    --enable-fatal-warnings=yes \
-    --with-package-name=%{name} \
+%configure $CONF_OPTS \
     --docdir=%{agents_docdir}
 %else
 export docdir=%{agents_docdir}
-%configure \
-    --enable-fatal-warnings=yes \
-    --with-package-name=%{name}
+%configure $CONF_OPTS
 %endif
 export MAKE="make %{?jobs:-j%jobs}"
 make %{?jobs:-j%jobs}
@@ -199,11 +208,18 @@
 find $RPM_BUILD_ROOT -name '*.pyc' -type f -print0 | xargs -0 rm -f
 find $RPM_BUILD_ROOT -name '*.pyo' -type f -print0 | xargs -0 rm -f
 # Unset execute permissions from things that shouln't have it
-find $RPM_BUILD_ROOT -name '.ocf-*' -type f -print0 | xargs -0 chmod a-x
 find $RPM_BUILD_ROOT -name 'ocf-*'  -type f -print0 | xargs -0 chmod a-x
 find $RPM_BUILD_ROOT -name '*.dtd'  -type f -print0 | xargs -0 chmod a-x
 chmod 0755 $RPM_BUILD_ROOT/usr/sbin/ocf-tester
 chmod 0755 $RPM_BUILD_ROOT/usr/sbin/ocft
+
+(
+cd $RPM_BUILD_ROOT/%{_libdir}/heartbeat
+for f in ocf-returncodes ocf-shellfuncs
+do
+    ln -s /usr/lib/ocf/lib/heartbeat/$f
+done
+)
 ###########################################################
 
 %clean
@@ -239,6 +255,7 @@
 %defattr(-,root,root)
 %dir /usr/lib/ocf
 %dir /usr/lib/ocf/resource.d
+%dir /usr/lib/ocf/lib
 %dir %{_datadir}/%{name}
 %dir %{_datadir}/%{name}/ocft
 %dir %{_datadir}/%{name}/ocft/configs
@@ -247,6 +264,7 @@
 %{_datadir}/%{name}/ocft/README
 %{_datadir}/%{name}/ocft/README.zh_CN
 /usr/lib/ocf/resource.d/heartbeat
+/usr/lib/ocf/lib/heartbeat
 %{_sbindir}/ocf-tester
 %{_sbindir}/ocft
 %{_sbindir}/sfex_init
@@ -258,13 +276,15 @@
 %doc COPYING.GPLv3
 %doc %{_datadir}/%{name}/ra-api-1.dtd
 %doc %{_mandir}/man7/*.7*
+%doc %{_mandir}/man8/ocf-tester.8*
+%doc %{_mandir}/man8/sfex_init.8*
 %doc doc/README.webapps
 # For compatability with pre-existing agents
+%dir /etc/ha.d
+/etc/ha.d/shellfuncs
 %dir %{_libdir}/heartbeat
 %{_libdir}/heartbeat/ocf-shellfuncs
 %{_libdir}/heartbeat/ocf-returncodes
-%dir /etc/ha.d
-/etc/ha.d/shellfuncs
 %{_libdir}/heartbeat/send_arp
 %{_libdir}/heartbeat/sfex_daemon
 %{_libdir}/heartbeat/findif

++++++ 0001-Build-Add-a-new-agent-NodeUtilization.patch ++++++
>From e721f4986c0ac48a39b7fce36c27e98657258d15 Mon Sep 17 00:00:00 2001
From: John Shi <j...@novell.com>
Date: Mon, 18 Jul 2011 14:48:21 +0800
Subject: [PATCH] Build: Add a new agent: NodeUtilization.
 This agent detects system parameters and put them into CIB by crm_attribute,
 and it runs on every node as clone resource.

---
 heartbeat/Makefile.am     |    3 +-
 heartbeat/NodeUtilization |  187 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 189 insertions(+), 1 deletions(-)
 create mode 100755 heartbeat/NodeUtilization

Index: resource-agents/heartbeat/Makefile.am
===================================================================
--- resource-agents.orig/heartbeat/Makefile.am  2011-07-18 16:26:54.000000000 
+0800
+++ resource-agents/heartbeat/Makefile.am       2011-07-18 16:26:56.000000000 
+0800
@@ -108,7 +108,8 @@
                        WAS6                    \
                        WinPopup                \
                        Xen                     \
-                       Xinetd
+                       Xinetd                  \
+                       NodeUtilization
 
 ocfcommondir           = $(OCF_LIB_DIR_PREFIX)/heartbeat
 ocfcommon_DATA         = ocf-shellfuncs        \
Index: resource-agents/heartbeat/NodeUtilization
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ resource-agents/heartbeat/NodeUtilization   2011-07-18 16:29:15.000000000 
+0800
@@ -0,0 +1,230 @@
+#!/bin/sh
+#
+#
+#      NodeUtilization OCF Resource Agent
+#
+# Copyright (c) 2011 SUSE LINUX, John Shi
+#                    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.
+#
+#######################################################################
+# Initialization:
+
+. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
+
+: ${OCF_RESKEY_utilization_cpu_reservation="1"}
+: ${OCF_RESKEY_utilization_host_memory_reservation="512"}
+: ${OCF_RESKEY_utilization_hv_memory_reservation="512"}
+
+#######################################################################
+
+meta_data() {
+       cat <<END
+<?xml version="1.0"?>
+<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
+<resource-agent name="NodeUtilization">
+<version>1.0</version>
+
+<longdesc lang="en">
+This is an NodeUtilization Resource Agent.
+This agent detects system parameters and put them into HA by crm_attribute,
+and it runs on every node as clone resource.
+</longdesc>
+<shortdesc lang="en">NodeUtilization resource agent</shortdesc>
+
+<parameters>
+<parameter name="dynamic" unique="0" required="0">
+<longdesc lang="en">
+If set, some of the HA parameters will be reset if there are
+difference between HA parameters and system parameters when HA monitor.
+Otherwise, the HA parameters will be set once when the resource instance 
starts.
+</longdesc>
+<shortdesc lang="en">Set HA parameters when start or monitor</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="utilization_cpu" unique="0" required="0">
+<longdesc lang="en">Enable setting cpu utilization.</longdesc>
+<shortdesc lang="en">Enable setting cpu utilization.</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="utilization_cpu_reservation" unique="0" required="0">
+<longdesc lang="en">CPU reserved for non-HA related usage.</longdesc>
+<shortdesc lang="en">CPU reserved for non-HA related usage.</shortdesc>
+<content type="integer" default="1" />
+</parameter>
+
+<parameter name="utilization_host_memory" unique="0" required="0">
+<longdesc lang="en">Enable setting memory utilization of host.</longdesc>
+<shortdesc lang="en">Enable setting memory utilization of host.</shortdesc>
+<content type="boolean" default="true" />
+
+<parameter name="utilization_host_memory_reservation" unique="0" required="0">
+<longdesc lang="en">Memory reserved for other services inside host, in 
MB.</longdesc>
+<shortdesc lang="en">Memory reserved for other services inside host, in 
MB.</shortdesc>
+<content type="integer" default="512" />
+
+<parameter name="utilization_hv_memory" unique="0" required="0">
+<longdesc lang="en">Enable setting the memory utilization of 
hypervisor.</longdesc>
+<shortdesc lang="en">Enable setting the memory utilization of 
hypervisor.</shortdesc>
+<content type="boolean" default="true" />
+
+<parameter name="utilization_hv_memory_reservation" unique="0" required="0">
+<longdesc lang="en">Memory reserved for the hypervisor, in MB.</longdesc>
+<shortdesc lang="en">Memory reserved for the hypervisor, in MB.</shortdesc>
+<content type="integer" default="512" />
+
+</parameter>
+
+</parameters>
+
+<actions>
+<action name="start"   timeout="90" />
+<action name="stop"    timeout="100" />
+<action name="monitor" timeout="20s" interval="60s"/>
+<action name="meta-data"  timeout="5" />
+<action name="validate-all"  timeout="30" />
+</actions>
+</resource-agent>
+END
+}
+
+set_utilization() {
+    host_name="$(hostname)"
+
+    if [ "$OCF_RESKEY_utilization_cpu" = "true" -o 
"$OCF_RESKEY_utilization_cpu" = "1" ]; then
+        sys_cpu=$(grep -c processor /proc/cpuinfo)
+               let sys_cpu=$sys_cpu-$OCF_RESKEY_utilization_cpu_reservation
+        uti_cpu=$(crm_attribute -Q -t nodes -U "$host_name" -z -n cpu 
2>/dev/null)
+
+        if [ "$sys_cpu" != "$uti_cpu" ]; then
+            if ! crm_attribute -t nodes -U "$host_name" -z -n cpu -v $sys_cpu; 
then
+                ocf_log err "Failed to set cpu of utilization by 
crm_attribute."
+                return 1
+            fi
+        fi
+    fi
+
+    if [ "$OCF_RESKEY_utilization_host_memory" = "true" -o 
"$OCF_RESKEY_utilization_host_memory" = "1" ]; then
+        sys_mem=$(awk '/MemTotal/{printf("%d\n",$2/1024);exit(0)}' 
/proc/meminfo)
+               let 
sys_mem=$sys_mem-$OCF_RESKEY_utilization_host_memory_reservation
+        uti_mem=$(crm_attribute -Q -t nodes -U "$host_name" -z -n host_memory 
2>/dev/null)
+
+        if [ "$sys_mem" != "$uti_mem" ]; then
+            if ! crm_attribute -t nodes -U "$host_name" -z -n host_memory -v 
$sys_mem; then
+                ocf_log err "Failed to set memory of utilization by 
crm_attribute."
+                return 1
+            fi
+        fi
+    fi
+
+       if [ -x /usr/sbin/xm ]; then
+               if [ "$OCF_RESKEY_utilization_hv_memory" = "true" -o 
"$OCF_RESKEY_utilization_hv_memory" = "1" ]; then
+                       hv_mem=$(xm info | awk 
'/max_free_memory/{printf("%d\n",$3);exit(0)}')
+                       let hv_mem=$hv_mem-$utilization_hv_memory_reservation
+                       uti_mem=$(crm_attribute -Q -t nodes -U "$host_name" -z 
-n hv_memory 2>/dev/null)
+
+                       if [ "$sys_mem" != "$uti_mem" ]; then
+                               if ! crm_attribute -t nodes -U "$host_name" -z 
-n hv_memory -v $sys_mem; then
+                                       ocf_log err "Failed to set memory of 
utilization by crm_attribute."
+                                       return 1
+                               fi
+                       fi
+               fi
+       fi
+}
+
+NodeUtilization_usage() {
+       cat <<END
+usage: $0 {start|stop|monitor|validate-all|meta-data}
+
+Expects to have a fully populated OCF RA-compliant environment set.
+END
+}
+
+NodeUtilization_start() {
+    if ! touch "$OCF_RESKEY_pidfile"; then
+        ocf_log err "Failed to touch pidfile: ${OCF_RESKEY_pidfile}."
+        exit $OCF_ERR_GENERIC
+    fi
+    if [ "$OCF_RESKEY_dynamic" = "false" -o "$OCF_RESKEY_dynamic" = "0" ]; then
+        if ! set_utilization; then
+            exit $OCF_ERR_GENERIC
+        fi
+    fi
+    exit $OCF_SUCCESS
+}
+
+NodeUtilization_stop() {
+    rm -f $OCF_RESKEY_pidfile
+    exit $OCF_SUCCESS
+}
+
+NodeUtilization_monitor() {
+    if [ ! -f $OCF_RESKEY_pidfile ]; then
+        exit $OCF_NOT_RUNNING
+    fi
+
+    if [ "$OCF_RESKEY_dynamic" = "true" -o "$OCF_RESKEY_dynamic" = "1" ]; then
+        if ! set_utilization; then
+            exit $OCF_ERR_GENERIC
+        fi
+    fi
+    exit $OCF_SUCCESS
+}
+
+NodeUtilization_validate() {
+    exit $OCF_SUCCESS
+}
+
+
+if [ $# -ne 1 ]; then
+    NodeUtilization_usage
+    exit $OCF_ERR_ARGS
+fi
+
+: ${OCF_RESKEY_pidfile:="$HA_VARRUN/NodeUtilization-${OCF_RESOURCE_INSTANCE}"}
+: ${OCF_RESKEY_dynamic:="true"}
+: ${OCF_RESKEY_utilization_cpu:="true"}
+: ${OCF_RESKEY_utilization_memory:="true"}
+
+case $__OCF_ACTION in
+meta-data)     meta_data
+               exit $OCF_SUCCESS
+               ;;
+start)         NodeUtilization_start
+               ;;
+stop)          NodeUtilization_stop
+               ;;
+monitor)       NodeUtilization_monitor
+               ;;
+validate-all)  NodeUtilization_validate
+               ;;
+usage|help)    NodeUtilization_usage
+               exit $OCF_SUCCESS
+               ;;
+*)             NodeUtilization_usage
+               exit $OCF_ERR_UNIMPLEMENTED
+               ;;
+esac
+
+exit $?
++++++ 0001-Low-VirtualDomain-Add-a-functionality-that-modifies.patch ++++++
>From fa9ac65f510b58025e234e066d1cff26f8c2d6ed Mon Sep 17 00:00:00 2001
From: John Shi <j...@novell.com>
Date: Mon, 18 Jul 2011 14:54:00 +0800
Subject: [PATCH] Low: VirtualDomain: Add a functionality that modifies
 utilization of resource automatically.

---
 heartbeat/VirtualDomain |   67 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

Index: resource-agents/heartbeat/VirtualDomain
===================================================================
--- resource-agents.orig/heartbeat/VirtualDomain        2011-07-18 
16:26:44.000000000 +0800
+++ resource-agents/heartbeat/VirtualDomain     2011-07-18 16:55:41.000000000 
+0800
@@ -19,9 +19,15 @@
 # Defaults
 OCF_RESKEY_force_stop_default=0
 OCF_RESKEY_hypervisor_default="$(virsh --quiet uri)"
+OCF_RESKEY_dynamic_utilization_default="true"
+OCF_RESKEY_set_utilization_cpu_default="true"
+OCF_RESKEY_set_utilization_memory_default="true"
 
 : ${OCF_RESKEY_force_stop=${OCF_RESKEY_force_stop_default}}
 : ${OCF_RESKEY_hypervisor=${OCF_RESKEY_hypervisor_default}}
+: ${OCF_RESKEY_dynamic_utilization=${OCF_RESKEY_dynamic_utilization_default}}
+: ${OCF_RESKEY_set_utilization_cpu=${OCF_RESKEY_set_utilization_cpu_default}}
+: 
${OCF_RESKEY_set_utilization_memory=${OCF_RESKEY_set_utilization_memory_default}}
 #######################################################################
 
 ## I'd very much suggest to make this RA use bash,
@@ -117,6 +123,28 @@
 <content type="string" default="" />
 </parameter>
 
+<parameter name="dynamic_utilization" unique="0" required="0">
+<longdesc lang="en">
+If set, the utilization parameter of resource will be reset if there are
+difference between resource parameters and system parameters when agent 
monitor.
+Otherwise, the resource parameters will be set once when agent start.
+</longdesc>
+<shortdesc lang="en">Set utilization of resource when agent monitor</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="set_utilization_cpu" unique="0" required="0">
+<longdesc lang="en">Enable setting cpu of utilization.</longdesc>
+<shortdesc lang="en">Enable setting cpu of utilization</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
+<parameter name="set_utilization_memory" unique="0" required="0">
+<longdesc lang="en">Enable setting memory of utilization.</longdesc>
+<shortdesc lang="en">Enable setting memory of utilization</shortdesc>
+<content type="boolean" default="true" />
+</parameter>
+
 </parameters>
 
 <actions>
@@ -133,6 +161,33 @@
 EOF
 }
 
+set_utilization() {
+    local dom_cpu dom_mem
+    local uti_cpu uti_mem
+
+    read dom_cpu dom_mem <<EOF
+$(LANG=C virsh $VIRSH_OPTIONS dominfo ${DOMAIN_NAME} |
+awk '/CPU\(s\)/{cpu=$2} /Max memory/{mem=$3} END{printf("%d %d\n", cpu, 
mem/1024)}')
+EOF
+    uti_cpu=$(crm_resource -Q -r $OCF_RESOURCE_INSTANCE -z -g cpu 2>/dev/null)
+    uti_mem=$(crm_resource -Q -r $OCF_RESOURCE_INSTANCE -z -g hv_memory 
2>/dev/null)
+
+    if [ "$OCF_RESKEY_set_utilization_cpu" = "true" -o 
"$OCF_RESKEY_set_utilization_cpu" = "1" ]; then
+        if [ "$dom_cpu" != "$uti_cpu" ]; then
+            if ! crm_resource -r $OCF_RESOURCE_INSTANCE -z -p cpu -v $dom_cpu; 
then
+                ocf_log warn "Failed to set cpu of utilization by 
crm_resource."
+            fi
+        fi
+    fi
+    if [ "$OCF_RESKEY_set_utilization_memory" = "true" -o 
"$OCF_RESKEY_set_utilization_memory" = "1" ]; then
+        if [ "$dom_mem" != "$uti_mem" ]; then
+            if ! crm_resource -r $OCF_RESOURCE_INSTANCE -z -p hv_memory -v 
$dom_mem; then
+                ocf_log warn "Failed to set memory of utilization by 
crm_resource."
+            fi
+        fi
+    fi
+}
+
 # Set options to be passed to virsh:
 VIRSH_OPTIONS="--connect=${OCF_RESKEY_hypervisor} --quiet"
 
@@ -236,6 +291,11 @@
     while ! VirtualDomain_Monitor; do
        sleep 1
     done
+
+    if [ "$OCF_RESKEY_dynamic_utilization" = "false" -o 
"$OCF_RESKEY_dynamic_utilization" = "0" ]; then
+        set_utilization
+    fi
+
     return $OCF_SUCCESS
 }
 
@@ -404,6 +464,13 @@
            fi
        done
     fi
+
+       if ocf_is_probe; then
+        if [ "$OCF_RESKEY_dynamic_utilization" = "true" -o 
"$OCF_RESKEY_dynamic_utilization" = "1" ]; then
+            set_utilization
+        fi
+    fi
+
     return ${rc}
 }
 
++++++ ctdb-bnc-696978-01-add-smb_fileid_algorithm.patch ++++++
diff --git a/heartbeat/CTDB b/heartbeat/CTDB
index bc21cbe..cdb5da4 100755
--- a/heartbeat/CTDB
+++ b/heartbeat/CTDB
@@ -306,6 +306,17 @@ if CTDB is managing Samba.
 <content type="string" default="tdb2" />
 </parameter>
 
+<parameter name="smb_fileid_algorithm" unique="0" required="0">
+<longdesc lang="en">
+Which fileid:algorithm to use with vfs_fileid.  The correct
+value depends on which clustered filesystem is in use, e.g.:
+for OCFS2, this should be set to "fsid".  Only necessary if
+CTDB is managing Samba.
+</longdesc>
+<shortdesc lang="en">Samba VFS fileid algorithm</shortdesc>
+<content type="string" default="" />
+</parameter>
+
 </parameters>
 
 <actions>
@@ -401,16 +412,44 @@ init_smb_conf() {
        # Don't screw around with the config if CTDB isn't managing Samba!
        ocf_is_true "$OCF_RESKEY_ctdb_manages_samba" || return 0
 
+       # replace these things in smb.conf
+       local repl='# CTDB-RA:|passdb backend|clustering|idmap backend|private 
dir|ctdbd socket'
+
        local private_dir
        [ -n "$OCF_RESKEY_smb_private_dir" ] && private_dir="\tprivate dir = 
$OCF_RESKEY_smb_private_dir\n"
-       grep -Eiv \
-               '^[[:space:]]*(# CTDB-RA:|passdb backend|clustering|idmap 
backend|private dir|ctdbd socket)' \
-               $OCF_RESKEY_smb_conf | sed "/^[[:space:]]*\[global\]/ a\\
+
+       local vfs_fileid
+       local do_vfs=0
+       if  [ -n "$OCF_RESKEY_smb_fileid_algorithm" ]; then
+               repl="${repl}|fileid:algorithm|fileid:mapping"
+               vfs_fileid="\tfileid:algorithm = 
$OCF_RESKEY_smb_fileid_algorithm\n"
+               if sed -n '/^[[:space:]]*\[global\]/,/^[[:space:]]*\[/p' 
$OCF_RESKEY_smb_conf | \
+                  grep -Eq '^[[:space:]]*vfs objects'; then
+                       # vfs objects already specified, will append fileid to 
existing line
+                       do_vfs=1
+               else
+                       vfs_fileid="$vfs_fileid\tvfs objects = fileid\n"
+               fi
+       fi
+       awk '
+               /^[[:space:]]*\[/ { global = 0 }
+               /^[[:space:]]*\[global\]/ { global = 1 }
+               {
+                       if(global) {
+                               if ('$do_vfs' && $0 ~ /^[[:space:]]vfs objects/ 
&& $0 !~ /fileid/) {
+                                       print $0" fileid"
+                               } else if ($0 !~ /^[[:space:]]*('"$repl"')/) {
+                                       print
+                               }
+                       } else {
+                               print
+                       }
+               }' $OCF_RESKEY_smb_conf | sed "/^[[:space:]]*\[global\]/ a\\
 \t# CTDB-RA: Begin auto-generated section (do not change below)\n\
 \tpassdb backend = $OCF_RESKEY_smb_passdb_backend\n\
 \tclustering = yes\n\
 \tidmap backend = $OCF_RESKEY_smb_idmap_backend\n\
-\tctdbd socket = $OCF_RESKEY_ctdb_socket\n$private_dir\
+\tctdbd socket = $OCF_RESKEY_ctdb_socket\n$private_dir$vfs_fileid\
 \t# CTDB-RA: End auto-generated section (do not change above)" > 
$OCF_RESKEY_smb_conf.$$
        mv -f $OCF_RESKEY_smb_conf.$$ $OCF_RESKEY_smb_conf
 }
++++++ ctdb-bnc-712192-monitor-status.patch ++++++
Index: resource-agents/heartbeat/CTDB
===================================================================
--- resource-agents.orig/heartbeat/CTDB
+++ resource-agents/heartbeat/CTDB
@@ -59,9 +59,6 @@
 # - Do we need to verify globally unique setting?
 # - Should set CTDB_NODES to ${HA_RSCTMP}/ctdb (generated based on
 #   current nodes)
-# - Be more clever about monitor op, something like:
-#   "ctdb pnn" to get PNN, then "ctdb -Y status" for machine-readable
-#   status.
 # - Look at enabling set_ctdb_variables() if necessary.
 # - Probably possible for sysconfig file to not be restored if
 #   CTDB dies unexpectedly.
@@ -662,8 +659,27 @@ ctdb_stop() {
 
 
 ctdb_monitor() {
-       invoke_ctdb ping > /dev/null 2>&1 && return $OCF_SUCCESS
-       return $OCF_NOT_RUNNING
+       local status
+       # "ctdb status" exits non-zero if CTDB isn't running.
+       # It can also exit non-zero if there's a timeout (ctdbd blocked,
+       # stalled, massive load, or otherwise wedged).  If it's actually
+       # not running, STDERR will say "Errno:Connection refused(111)",
+       # whereas if it's wedged, it'll say various other unpleasant things.
+       status=$(invoke_ctdb status 2>&1)
+       if [ $? -ne 0 ]; then
+               if echo $status | grep -qs 'Connection refused'; then
+                       return $OCF_NOT_RUNNING
+               else
+                       ocf_log err "CTDB status call failed: $status"
+                       return $OCF_ERR_GENERIC
+               fi
+       fi
+       if echo $status | grep -Eqs '(OK|DISABLED) \(THIS'; then
+               return $OCF_SUCCESS
+       fi
+
+       ocf_log err "CTDB status is bad: $status"
+       return $OCF_ERR_GENERIC
 }
 
 
++++++ ctdb-bnc-712410-default-enabled.patch ++++++
Index: resource-agents/heartbeat/CTDB
===================================================================
--- resource-agents.orig/heartbeat/CTDB
+++ resource-agents/heartbeat/CTDB
@@ -82,7 +82,7 @@
 : ${OCF_RESKEY_ctdb_service_winbind:=""}
 : ${OCF_RESKEY_ctdb_samba_skip_share_check:=yes}
 : ${OCF_RESKEY_ctdb_monitor_free_memory:=100}
-: ${OCF_RESKEY_ctdb_start_as_disabled:=yes}
+: ${OCF_RESKEY_ctdb_start_as_disabled:=no}
 
 : ${OCF_RESKEY_ctdb_config_dir:=/etc/ctdb}
 : ${OCF_RESKEY_ctdb_binary:=/usr/bin/ctdb}
@@ -203,7 +203,7 @@ When set to yes, the CTDB node will star
 host any public ip addresses.
 </longdesc>
 <shortdesc lang="en">Start CTDB disabled?</shortdesc>
-<content type="boolean" default="yes" />
+<content type="boolean" default="no" />
 </parameter>
 
 <parameter name="ctdb_config_dir" unique="0" required="0">
++++++ resource-agents-1.0.3.tar.bz2 -> resource-agents-3.9.2.tar.bz2 ++++++
++++ 29656 lines of diff (skipped)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to