Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2014-06-19 13:08:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
and /work/SRC/openSUSE:Factory/.resource-agents.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents"
Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes 2014-06-01 18:57:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.resource-agents.new/resource-agents.changes 2014-06-19 13:08:26.000000000 +0200
@@ -1,0 +2,22 @@
+Sun Jun 15 12:59:03 UTC 2014 - kgronlund@suse.com
+
+- Update xm/xl patch with additional fixes (bnc#882548)
+- Modified: xen-replace-xm-with-xl.patch
+
+-------------------------------------------------------------------
+Fri Jun 13 08:55:07 UTC 2014 - kgronlund@suse.com
+
+- High: Xen: Replace use of xm with xl (bnc#882548)
+- Add: xen-replace-xm-with-xl.patch
+
+-------------------------------------------------------------------
+Mon Jun 9 07:43:27 UTC 2014 - kgronlund@suse.com
+
+- rgmanager/fs: typo preventing passing some mount opts
+- nfsserver.sh: add an optional option for rpc.statd
+- fs-lib.sh: Fix usage of findmnt to work for filesystems containing bind mounts
+- addition of bind-mount resource agent for rgmanager
+- postgres-8.sh: add startup_wait option to rgmanager postgres agent
+- upstream cs: v3.9.5-410-g6f1dffee54d1
+
+-------------------------------------------------------------------
Old:
----
resource-agents-3.9.5+git404.tar.xz
New:
----
resource-agents-3.9.5+git410.tar.xz
xen-replace-xm-with-xl.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.3KXsZ4/_old 2014-06-19 13:08:27.000000000 +0200
+++ /var/tmp/diff_new_pack.3KXsZ4/_new 2014-06-19 13:08:27.000000000 +0200
@@ -44,7 +44,7 @@
Summary: Open Source HA Reusable Cluster Resource Scripts
License: GPL-2.0 and LGPL-2.1+
Group: Productivity/Clustering/HA
-Version: 3.9.5+git404
+Version: 3.9.5+git410
Release: 0
Url: http://linux-ha.org/
Source: resource-agents-%{version}.tar.xz
@@ -77,6 +77,8 @@
Patch19: fix-sg_persist-devs-required-and-not-defined.patch
# sg_persist: change sg_persist ocft not configure isci and let user prepare it manually
Patch20: sg_persist-ocft-not-configure-iscsi.patch
+# PATCH-FIX-UPSTREAM: Replace use of xm with xl (bnc#882548), kgronlund@suse.com
+Patch21: xen-replace-xm-with-xl.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: heartbeat-resources
@@ -162,6 +164,7 @@
%patch18 -p1
%patch19 -p1
%patch20 -p1
+%patch21 -p1
###########################################################
%build
++++++ resource-agents-3.9.5+git404.tar.xz -> resource-agents-3.9.5+git410.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git404/configure.ac new/resource-agents-3.9.5+git410/configure.ac
--- old/resource-agents-3.9.5+git404/configure.ac 2014-05-15 17:36:10.000000000 +0200
+++ new/resource-agents-3.9.5+git410/configure.ac 2014-05-29 23:00:27.000000000 +0200
@@ -883,7 +883,7 @@
AC_MSG_RESULT([])
AC_MSG_RESULT([$PACKAGE configuration:])
AC_MSG_RESULT([ Version = ${VERSION}])
-AC_MSG_RESULT([ Build Version = 61a2ccc8b7b1eb8c3f13f53f250dfc10cc187ee3])
+AC_MSG_RESULT([ Build Version = 6f1dffee54d1d537b601204ef1c90913ee820201])
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-3.9.5+git404/heartbeat/ocf-shellfuncs.in new/resource-agents-3.9.5+git410/heartbeat/ocf-shellfuncs.in
--- old/resource-agents-3.9.5+git404/heartbeat/ocf-shellfuncs.in 2014-05-15 17:36:10.000000000 +0200
+++ new/resource-agents-3.9.5+git410/heartbeat/ocf-shellfuncs.in 2014-05-29 23:00:27.000000000 +0200
@@ -22,7 +22,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Build version: 61a2ccc8b7b1eb8c3f13f53f250dfc10cc187ee3
+# Build version: 6f1dffee54d1d537b601204ef1c90913ee820201
# 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git404/rgmanager/src/resources/Makefile.am new/resource-agents-3.9.5+git410/rgmanager/src/resources/Makefile.am
--- old/resource-agents-3.9.5+git404/rgmanager/src/resources/Makefile.am 2014-05-15 17:36:10.000000000 +0200
+++ new/resource-agents-3.9.5+git410/rgmanager/src/resources/Makefile.am 2014-05-29 23:00:27.000000000 +0200
@@ -28,7 +28,8 @@
postgres-8.sh tomcat-5.sh lvm.sh \
vm.sh SAPInstance SAPDatabase named.sh \
ASEHAagent.sh drbd.sh nfsserver.sh \
- tomcat-6.sh orainstance.sh oralistener.sh oracledb.sh
+ tomcat-6.sh orainstance.sh oralistener.sh oracledb.sh \
+ bind-mount.sh
METADATA = apache.metadata openldap.metadata samba.metadata \
mysql.metadata postgres-8.metadata \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git404/rgmanager/src/resources/bind-mount.sh new/resource-agents-3.9.5+git410/rgmanager/src/resources/bind-mount.sh
--- old/resource-agents-3.9.5+git404/rgmanager/src/resources/bind-mount.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/resource-agents-3.9.5+git410/rgmanager/src/resources/bind-mount.sh 2014-05-29 23:00:27.000000000 +0200
@@ -0,0 +1,157 @@
+#!/bin/bash
+#
+# Copyright Red Hat Inc., 2014
+#
+# This program 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, or (at your option) any
+# later version.
+#
+# This program 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; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+# MA 02139, USA.
+#
+
+#
+# Bind mount script - mounts parent file system -o bind in another
+# location
+#
+
+LC_ALL=C
+LANG=C
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
+export LC_ALL LANG PATH
+
+. $(dirname $0)/ocf-shellfuncs
+. $(dirname $0)/utils/fs-lib.sh
+
+export IS_BIND_MOUNT=1
+export OCF_RESKEY_use_findmnt=0
+export OCF_RESKEY_options="bind"
+export OCF_RESKEY_device="$OCF_RESKEY_source"
+rv=0
+
+do_meta_data()
+{
+ cat < /dev/null &
- # We need to sleep for a second to allow pg_ctl to detect that we've started.
- sleep $PSQL_wait_after_start
+ # We need to sleep briefly to allow pg_ctl to detect that we've started.
# We need to fetch "-D /path/to/pgsql/data" from $OCF_RESKEY_postmaster_options
- su - "$OCF_RESKEY_postmaster_user" -c "$PSQL_CTL status $OCF_RESKEY_postmaster_options" &> /dev/null
+ until [ "$count" -gt "$OCF_RESKEY_startup_wait" ] ||
+ [ `su - "$OCF_RESKEY_postmaster_user" -c \
+ "$PSQL_CTL status $OCF_RESKEY_postmaster_options" &> /dev/null; echo $?` = '0' ]
+ do
+ sleep 1
+ let count=$count+1
+ done
- if [ $? -ne 0 ]; then
+ if [ "$count" -gt "$OCF_RESKEY_startup_wait" ]; then
clog_service_start $CLOG_FAILED
return $OCF_ERR_GENERIC
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-3.9.5+git404/rgmanager/src/resources/utils/fs-lib.sh new/resource-agents-3.9.5+git410/rgmanager/src/resources/utils/fs-lib.sh
--- old/resource-agents-3.9.5+git404/rgmanager/src/resources/utils/fs-lib.sh 2014-05-15 17:36:10.000000000 +0200
+++ new/resource-agents-3.9.5+git410/rgmanager/src/resources/utils/fs-lib.sh 2014-05-29 23:00:27.000000000 +0200
@@ -130,6 +130,10 @@
declare dev="$1"
declare realdev
+ if [ $IS_BIND_MOUNT -eq 1 ]; then
+ REAL_DEVICE="$dev"
+ return $OCF_SUCCESS
+ fi
REAL_DEVICE=""
[ -z "$dev" ] && return $OCF_ERR_ARGS
@@ -192,6 +196,15 @@
return $OCF_ERR_ARGS
}
+list_mounts()
+{
+ if [ $IS_BIND_MOUNT -eq 1 ]; then
+ cat /etc/mtab
+ else
+ cat /proc/mounts
+ fi
+}
+
##
# Tries to use findmnt util to return list
# of mountpoints for a device
@@ -217,11 +230,11 @@
which findmnt > /dev/null 2>&1
if [ $? -eq 0 ]; then
- FINDMNT_OUTPUT=$(findmnt -o TARGET --noheadings $1)
+ FINDMNT_OUTPUT="$(findmnt -o TARGET --noheadings $1)"
if [ $? -ne 0 ]; then
# workaround mount helpers inconsistency that still
# add / on the device entry in /proc/mounts
- FINDMNT_OUTPUT=$(findmnt -o TARGET --noheadings $1/)
+ FINDMNT_OUTPUT="$(findmnt -o TARGET --noheadings $1/)"
if [ $? -ne 0 ]; then
return 1
else
@@ -325,7 +338,7 @@
if [ "$tmp_mp" = "$mp" ]; then
return $YES
fi
- done < <(echo $FINDMNT_OUTPUT)
+ done < <(echo "$FINDMNT_OUTPUT")
;;
*)
return $YES
@@ -368,7 +381,7 @@
if [ -n "$tmp_mp" -a "$tmp_mp" = "$mp" ]; then
return $YES
fi
- done < <(cat /proc/mounts)
+ done < <(list_mounts)
return $NO
}
@@ -403,7 +416,7 @@
found=0
break
fi
- done < <(echo $FINDMNT_OUTPUT)
+ done < <(echo "$FINDMNT_OUTPUT")
;;
1)
# findmnt found no mount points for the device
@@ -450,7 +463,7 @@
fi
fi
fi
- done < <(cat /proc/mounts)
+ done < <(list_mounts)
esac
if [ $found -ne 0 ]; then
++++++ xen-replace-xm-with-xl.patch ++++++
commit 1e3db5dc3d40dfca556a21c73ee988670da8c0a0
Author: Kristoffer Grönlund
Date: Fri Jun 13 10:40:30 2014 +0200
High: Xen: Replace use of xm with xl (bnc#882548)
The xm command line tool has been deprecated in favor of the xl
toolstack.
For more information, see:
- http://wiki.xen.org/wiki/MigrationGuideToXen4.1
- http://wiki.xen.org/wiki/XL#Upgrading_from_xend
Use xl if available, else fall back on using xm.
diff --git a/heartbeat/Xen b/heartbeat/Xen
index cbc7c373bfa2..03c4f4d7a271 100755
--- a/heartbeat/Xen
+++ b/heartbeat/Xen
@@ -45,6 +45,9 @@ usage() {
: ${OCF_RESKEY_allow_mem_management=0}
: ${OCF_RESKEY_reserved_Dom0_memory=512}
+# prefer xl
+xentool=$(which xl 2> /dev/null || which xm)
+
meta_data() {
cat </dev/null | grep status 2>/dev/null`
+ STATUS=`$xentool list --long $1 2>/dev/null | grep status 2>/dev/null`
if [ "X${STATUS}" != "X" ]; then
# we have Xen 3.0.4 or higher
STATUS_NOSPACES=`echo "$STATUS" | awk '{ print $1,$2}'`
@@ -198,7 +201,7 @@ Xen_Status() {
fi
else
# we have Xen 3.0.3 or lower
- STATUS=`xm list --long $1 2>/dev/null | grep state 2>/dev/null`
+ STATUS=`$xentool list --long $1 2>/dev/null | grep state 2>/dev/null`
echo "${STATUS}" | grep -qs "[-r][-b][-p]---"
if [ $? -ne 0 ]; then
return $OCF_NOT_RUNNING
@@ -210,7 +213,7 @@ Xen_Status() {
}
# If the guest is rebooting, it may completely disappear from the
-# list of defined guests, thus xm/xen-list would return with not
+# list of defined guests, thus xl/xen-list would return with not
# running; apparently, this period lasts only for a second or
# two
# If a status returns not running, then test status
@@ -251,16 +254,16 @@ Xen_Adjust_Memory() {
#NEWMEM=`echo "(${MAXMEM}-${OCF_RESKEY_reserved_Dom0_memory})/(${RUNCNT}+${CNTNEW})"|bc`
NEWMEM=$(( (${MAXMEM} - ${OCF_RESKEY_reserved_Dom0_memory}) / (${RUNCNT} + ${CNTNEW} ) ))
# do not rely on ballooning add dom0_mem=512 instead to force memory for dom0
- #xm mem-set Domain-0 ${OCF_RESKEY_reserved_Dom0_memory}
+ #$xentool mem-set Domain-0 ${OCF_RESKEY_reserved_Dom0_memory}
for DOM in ${RUNNING}; do
- xm mem-set ${DOM} ${NEWMEM}
+ $xentool mem-set ${DOM} ${NEWMEM}
done
ocf_log info "Adjusted memory to: $NEWMEM, for the following $RUNCNT domains: $RUNNING"
fi
}
Xen_List_all() {
- xm list | grep -v -e "Name" -e "Domain-0" | awk '{print $1}'
+ $xentool list | grep -v -e "Name" -e "Domain-0" | awk '{print $1}'
}
Xen_List_running() {
ALL_DOMS=`Xen_List_all`
@@ -298,7 +301,7 @@ Xen_Monitor() {
}
Xen_Total_Memory() {
- xm info | grep "^total_memory" | awk '{print $3}'
+ $xentool info | grep "^total_memory" | awk '{print $3}'
}
Xen_Start() {
@@ -316,16 +319,16 @@ Xen_Start() {
Xen_Adjust_Memory 1
ocf_log info "New memory for virtual domains: ${NEWMEM}"
sed -i -e "/^memory=/ s/^memory=.*/memory=${NEWMEM}/" ${OCF_RESKEY_xmfile}
- xm mem-set ${DOMAIN_NAME} ${NEWMEM}
+ $xentool mem-set ${DOMAIN_NAME} ${NEWMEM}
fi
- xm create ${OCF_RESKEY_xmfile} name=$DOMAIN_NAME
+ $xentool create ${OCF_RESKEY_xmfile} name=$DOMAIN_NAME
rc=$?
if [ $rc -ne 0 ]; then
return $OCF_ERR_GENERIC
else
if ocf_is_true "${OCF_RESKEY_allow_mem_management}"; then
- xm mem-set ${DOMAIN_NAME} ${NEWMEM}
+ $xentool mem-set ${DOMAIN_NAME} ${NEWMEM}
fi
fi
while sleep 1; do
@@ -350,9 +353,9 @@ xen_domain_stop() {
if [ "$timeout" -gt 0 ]; then
ocf_log info "Xen domain $dom will be stopped (timeout: ${timeout}s)"
if ocf_is_true "${OCF_RESKEY_shutdown_acpi}"; then
- xm trigger $dom power
+ $xentool trigger $dom power
else
- xm shutdown $dom
+ $xentool shutdown $dom
fi
while Xen_Status $dom && [ "$timeout" -gt 0 ]; do
@@ -369,7 +372,7 @@ xen_domain_stop() {
sleep 1
done
# Note: This does not give up. stop isn't allowed to to fail.
- # If xm destroy fails, stop will eventually timeout.
+ # If $xentool destroy fails, stop will eventually timeout.
# This is the correct behaviour.
fi
@@ -390,9 +393,9 @@ Xen_Stop() {
if [ "$vm" ]; then
xen_domain_stop $vm
else
- # It is supposed to be gone, but there have been situations where xm
- # list / xen-list showed it as stopped but it was still instantiated.
- # Nuke it once more to make sure:
+ # It is supposed to be gone, but there have been situations where
+ # $xentool list / xen-list showed it as stopped but it was still
+ # instantiated. Nuke it once more to make sure:
$xenkill ${DOMAIN_NAME}
fi
@@ -406,8 +409,8 @@ Xen_Migrate_To() {
target_addr="$target_node"
if Xen_Status ${DOMAIN_NAME}; then
- ocf_log info "$DOMAIN_NAME: Starting xm migrate to $target_node"
-
+ ocf_log info "$DOMAIN_NAME: Starting $xentool migrate to $target_node"
+
if [ -n "$target_attr" ]; then
nodevalue=`crm_attribute --type nodes --node-uname $target_node --attr-name $target_attr --get-value -q`
if [ -n "${nodevalue}" -a "${nodevalue}" != "(null)" ]; then
@@ -416,15 +419,18 @@ Xen_Migrate_To() {
fi
fi
- xm migrate --live $DOMAIN_NAME $target_addr
-
+ if [[ "$xentool" == *xm ]]; then
+ $xentool migrate --live $DOMAIN_NAME $target_addr
+ else
+ $xentool migrate $DOMAIN_NAME $target_addr
+ fi
rc=$?
if [ $rc -ne 0 ]; then
- ocf_log err "$DOMAIN_NAME: xm migrate to $target_node failed: $rc"
+ ocf_log err "$DOMAIN_NAME: $xentool migrate to $target_node failed: $rc"
return $OCF_ERR_GENERIC
else
Xen_Adjust_Memory 0
- ocf_log info "$DOMAIN_NAME: xm migrate to $target_node succeeded."
+ ocf_log info "$DOMAIN_NAME: $xentool migrate to $target_node succeeded."
return $OCF_SUCCESS
fi
else
@@ -495,14 +501,14 @@ else
DOMAIN_NAME=${DOMAIN_NAME:-${OCF_RESOURCE_INSTANCE}}
fi
-for binary in xm sed awk; do
+for binary in sed awk; do
check_binary $binary
done
if have_binary xen-destroy ; then
xenkill="xen-destroy"
else
- xenkill="xm destroy"
+ xenkill="$xentool destroy"
fi
if [ -n "$OCF_RESKEY_shutdown_timeout" ]; then
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org