Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory
checked in at 2019-10-07 13:40:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
and /work/SRC/openSUSE:Factory/.resource-agents.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents"
Mon Oct 7 13:40:08 2019 rev:100 rq:734079 version:4.3.0+git178.b102c209
Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes
2019-09-25 01:26:32.989733384 +0200
+++
/work/SRC/openSUSE:Factory/.resource-agents.new.2352/resource-agents.changes
2019-10-07 13:40:11.356481521 +0200
@@ -1,0 +2,14 @@
+Mon Sep 30 13:08:03 UTC 2019 - [email protected]
+
+- Update to version 4.3.0+git178.b102c209:
+ * Adapt azure-lb Resource Agent to support socat usage too (bsc#1150046)
+ * redis: consider redis-cli features to choose optimal password passing
method and warning filtering workaround (#1403)
+ * fix master_is_active() erroneously reporting there is master when there is
no fixes #1399
+ * nfsserver: use "--no-legend" for systemctl "list-unit-files" calls
+ * nfsserver: performance improvements for systemd enabled systems
+ * IPaddr2: IPv6 return empty string when sanitation fails
+ * Low: IPaddr2: fix to work properly with unsanitized IPv6 addresses
+ * Filesystem: improve "/" check for bind mounts
+ * IPsrcaddr: add destination and table parameters
+
+-------------------------------------------------------------------
Old:
----
resource-agents-4.3.0+git161.00cb192d.tar.xz
New:
----
resource-agents-4.3.0+git178.b102c209.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.jGx9t1/_old 2019-10-07 13:40:11.908479995 +0200
+++ /var/tmp/diff_new_pack.jGx9t1/_new 2019-10-07 13:40:11.908479995 +0200
@@ -17,7 +17,7 @@
Name: resource-agents
-Version: 4.3.0+git161.00cb192d
+Version: 4.3.0+git178.b102c209
Release: 0
Summary: HA Reusable Cluster Resource Scripts
License: GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.jGx9t1/_old 2019-10-07 13:40:11.948479884 +0200
+++ /var/tmp/diff_new_pack.jGx9t1/_new 2019-10-07 13:40:11.948479884 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/ClusterLabs/resource-agents.git</param>
-<param name="changesrevision">00cb192d4b27402093265da2b8fe4a87671589a6</param>
+<param name="changesrevision">b102c209d524449fe202d6ed7094bb5d86cad613</param>
</service>
</servicedata>
\ No newline at end of file
++++++ resource-agents-4.3.0+git161.00cb192d.tar.xz ->
resource-agents-4.3.0+git178.b102c209.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.3.0+git161.00cb192d/heartbeat/Filesystem
new/resource-agents-4.3.0+git178.b102c209/heartbeat/Filesystem
--- old/resource-agents-4.3.0+git161.00cb192d/heartbeat/Filesystem
2019-09-09 14:05:39.000000000 +0200
+++ new/resource-agents-4.3.0+git178.b102c209/heartbeat/Filesystem
2019-09-30 14:51:57.000000000 +0200
@@ -337,17 +337,8 @@
ocf_log warn "kernel `uname -r` cannot handle read only bind
mounts"
}
-bind_rootfs_check() {
- local SOURCE
- local TARGET
- local ROOTFS
-
- SOURCE=$1
- TARGET=$(df --output=target $SOURCE | tail -n 1)
-
- ROOTFS=$(list_mounts | grep -w rootfs | cut -d' ' -f 2)
-
- if [ "${TARGET}" = "${ROOTFS}" ]; then
+bind_root_mount_check() {
+ if [ "$(df -P "$1" | awk 'END{print $6}')" = "/" ]; then
return 1
else
return 0
@@ -516,7 +507,7 @@
local procs
local mmap_procs
- if is_bind_mount && ocf_is_true "$FORCE_UNMOUNT" && !
bind_rootfs_check "$DEVICE"; then
+ if is_bind_mount && ocf_is_true "$FORCE_UNMOUNT" && !
bind_root_mount_check "$DEVICE"; then
ocf_log debug "Change force_umount from '$FORCE_UNMOUNT' to
'safe'"
FORCE_UNMOUNT=safe
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.3.0+git161.00cb192d/heartbeat/IPaddr2
new/resource-agents-4.3.0+git178.b102c209/heartbeat/IPaddr2
--- old/resource-agents-4.3.0+git161.00cb192d/heartbeat/IPaddr2 2019-09-09
14:05:39.000000000 +0200
+++ new/resource-agents-4.3.0+git178.b102c209/heartbeat/IPaddr2 2019-09-30
14:51:57.000000000 +0200
@@ -477,6 +477,12 @@
fi
else
FAMILY=inet6
+ # address sanitization defined in RFC5952
+ SANITIZED_IP=$($IP2UTIL route get $OCF_RESKEY_ip 2> /dev/null |
awk '$1~/:/ {print $1} $2~/:/ {print $2}')
+ if [ -n "$SANITIZED_IP" ]; then
+ OCF_RESKEY_ip="$SANITIZED_IP"
+ fi
+
if ocf_is_true $OCF_RESKEY_lvs_support ;then
ocf_exit_reason "The IPv6 does not support lvs_support"
exit $OCF_ERR_CONFIGURED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.3.0+git161.00cb192d/heartbeat/IPsrcaddr
new/resource-agents-4.3.0+git178.b102c209/heartbeat/IPsrcaddr
--- old/resource-agents-4.3.0+git161.00cb192d/heartbeat/IPsrcaddr
2019-09-09 14:05:39.000000000 +0200
+++ new/resource-agents-4.3.0+git178.b102c209/heartbeat/IPsrcaddr
2019-09-30 14:51:57.000000000 +0200
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Description: IPsrcaddr - Preferred source address modification
+# Description: IPsrcaddr - Preferred source(/dest) address modification
#
# Author: John Sutton <[email protected]>
# Support: [email protected]
@@ -11,7 +11,7 @@
#
# This script manages the preferred source address associated with
# packets which originate on the localhost and are routed through the
-# default route. By default, i.e. without the use of this script or
+# matching route. By default, i.e. without the use of this script or
# similar, these packets will carry the IP of the primary i.e. the
# non-aliased interface. This can be a nuisance if you need to ensure
# that such packets carry the same IP irrespective of which host in
@@ -27,7 +27,7 @@
#
# NOTES:
#
-# 1) There must be one and not more than 1 default route! Mainly because
+# 1) There must be one and not more than 1 matching route! Mainly because
# I can't see why you should have more than one. And if there is more
# than one, we would have to box clever to find out which one is to be
# modified, or we would have to pass its identity as an argument.
@@ -56,19 +56,23 @@
# Defaults
OCF_RESKEY_ipaddress_default=""
OCF_RESKEY_cidr_netmask_default=""
+OCF_RESKEY_destination_default="0.0.0.0/0"
OCF_RESKEY_proto_default=""
+OCF_RESKEY_table_default=""
: ${OCF_RESKEY_ipaddress=${OCF_RESKEY_ipaddress_default}}
: ${OCF_RESKEY_cidr_netmask=${OCF_RESKEY_cidr_netmask_default}}
+: ${OCF_RESKEY_destination=${OCF_RESKEY_destination_default}}
: ${OCF_RESKEY_proto=${OCF_RESKEY_proto_default}}
-
+: ${OCF_RESKEY_table=${OCF_RESKEY_table_default}}
#######################################################################
[ -z "$OCF_RESKEY_proto" ] && PROTO="" || PROTO="proto $OCF_RESKEY_proto"
+[ -z "$OCF_RESKEY_table" ] && TABLE="" || TABLE="table $OCF_RESKEY_table"
USAGE="usage: $0 {start|stop|status|monitor|validate-all|meta-data}";
- CMDSHOW="$IP2UTIL route show to exact 0.0.0.0/0"
+ CMDSHOW="$IP2UTIL route show $TABLE to exact $OCF_RESKEY_destination"
CMDCHANGE="$IP2UTIL route change to "
SYSTYPE="`uname -s`"
@@ -108,6 +112,14 @@
<content type="string" default="${OCF_RESKEY_cidr_netmask_default}"/>
</parameter>
+<parameter name="destination">
+<longdesc lang="en">
+The destination IP/subnet for the route (default:
$OCF_RESKEY_destination_default)
+</longdesc>
+<shortdesc lang="en">Destination IP/subnet</shortdesc>
+<content type="string" default="${OCF_RESKEY_destination_default}" />
+</parameter>
+
<parameter name="proto">
<longdesc lang="en">
Proto to match when finding network. E.g. "kernel".
@@ -115,6 +127,16 @@
<shortdesc lang="en">Proto</shortdesc>
<content type="string" default="${OCF_RESKEY_proto_default}" />
</parameter>
+
+<parameter name="table">
+<longdesc lang="en">
+Table to modify. E.g. "local".
+
+The table has to have a route matching the "destination" parameter.
+</longdesc>
+<shortdesc lang="en">Table</shortdesc>
+<content type="string" default="${OCF_RESKEY_table_default}" />
+</parameter>
</parameters>
<actions>
@@ -156,21 +178,22 @@
export OCF_RESKEY_ip=$OCF_RESKEY_ipaddress
srca_read() {
- # Capture the default route - doublequotes prevent word splitting...
- DEFROUTE="`$CMDSHOW`" || errorexit "command '$CMDSHOW' failed"
+ # Capture matching route - doublequotes prevent word splitting...
+ ROUTE="`$CMDSHOW`" || errorexit "command '$CMDSHOW' failed"
- # ... so we can make sure there is only 1 default route
- [ 1 -eq `echo "$DEFROUTE" | wc -l` ] || \
- errorexit "more than 1 default route exists"
-
- # But there might still be no default route
- [ -z "$DEFROUTE" ] && errorexit "no default route exists"
+ # ... so we can make sure there is only 1 matching route
+ [ 1 -eq `echo "$ROUTE" | wc -l` ] || \
+ errorexit "more than 1 matching route exists"
+
+ # But there might still be no matching route
+ [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] && [ -z "$ROUTE" ] && \
+ ! ocf_is_probe && errorexit "no matching route exists"
# Sed out the source ip address if it exists
- SRCIP=`echo $DEFROUTE | sed -n "s/$MATCHROUTE/\3/p"`
+ SRCIP=`echo $ROUTE | sed -n "s/$MATCHROUTE/\3/p"`
# and what remains after stripping out the source ip address clause
- ROUTE_WO_SRC=`echo $DEFROUTE | sed "s/$MATCHROUTE/\1\5/"`
+ ROUTE_WO_SRC=`echo $ROUTE | sed "s/$MATCHROUTE/\1\5/"`
[ -z "$SRCIP" ] && return 1
[ $SRCIP = $1 ] && return 0
@@ -190,11 +213,13 @@
rc=$OCF_SUCCESS
ocf_log info "The ip route has been already set.($NETWORK,
$INTERFACE, $ROUTE_WO_SRC)"
else
- $IP2UTIL route replace $NETWORK dev $INTERFACE src $1 || \
- errorexit "command 'ip route replace $NETWORK dev
$INTERFACE src $1' failed"
+ $IP2UTIL route replace $TABLE $NETWORK dev $INTERFACE src $1 ||
\
+ errorexit "command 'ip route replace $TABLE $NETWORK
dev $INTERFACE src $1' failed"
- $CMDCHANGE $ROUTE_WO_SRC src $1 || \
- errorexit "command '$CMDCHANGE $ROUTE_WO_SRC src $1'
failed"
+ if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] ;then
+ $CMDCHANGE $ROUTE_WO_SRC src $1 || \
+ errorexit "command '$CMDCHANGE $ROUTE_WO_SRC
src $1' failed"
+ fi
rc=$?
fi
@@ -206,7 +231,7 @@
# If one exists but it's not the same as the one specified, that's
# an error. Maybe that's the wrong behaviour because if this fails
# then when IPaddr releases the associated interface (if there is one)
-# your default route will also get dropped ;-(
+# your matching route will also get dropped ;-(
# The exit code should conform to LSB exit codes.
#
@@ -222,11 +247,13 @@
[ $rc = 2 ] && errorexit "The address you specified to stop does not
match the preferred source address"
- $IP2UTIL route replace $NETWORK dev $INTERFACE || \
- errorexit "command 'ip route replace $NETWORK dev $INTERFACE'
failed"
+ $IP2UTIL route replace $TABLE $NETWORK dev $INTERFACE || \
+ errorexit "command 'ip route replace $TABLE $NETWORK dev
$INTERFACE' failed"
- $CMDCHANGE $ROUTE_WO_SRC || \
- errorexit "command '$CMDCHANGE $ROUTE_WO_SRC' failed"
+ if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] ;then
+ $CMDCHANGE $ROUTE_WO_SRC || \
+ errorexit "command '$CMDCHANGE $ROUTE_WO_SRC' failed"
+ fi
return $?
}
@@ -411,6 +438,10 @@
return $OCF_ERR_CONFIGURED
fi
+ if ! echo "$OCF_RESKEY_destination" | grep -q "/"; then
+ return $OCF_ERR_CONFIGURED
+ fi
+
if ! [ "x$SYSTYPE" = "xLinux" ]; then
# checks after this point are only relevant for linux.
@@ -491,7 +522,11 @@
}
INTERFACE=`echo $findif_out | awk '{print $1}'`
-NETWORK=`$IP2UTIL route list dev $INTERFACE scope link $PROTO match
$ipaddress|grep -m 1 -o '^[^ ]*'`
+if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] ;then
+ NETWORK=`$IP2UTIL route list dev $INTERFACE scope link $PROTO match
$ipaddress|grep -m 1 -o '^[^ ]*'`
+else
+ NETWORK="$OCF_RESKEY_destination"
+fi
case $1 in
start) srca_start $ipaddress
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.3.0+git161.00cb192d/heartbeat/azure-lb
new/resource-agents-4.3.0+git178.b102c209/heartbeat/azure-lb
--- old/resource-agents-4.3.0+git161.00cb192d/heartbeat/azure-lb
2019-09-09 14:05:39.000000000 +0200
+++ new/resource-agents-4.3.0+git178.b102c209/heartbeat/azure-lb
2019-09-30 14:51:57.000000000 +0200
@@ -53,9 +53,11 @@
<parameter name="nc">
<longdesc lang="en">
-The full name of the nc binary.
+The full path of the used binary. This can be nc or socat path.
+The default is /usr/bin/nc.
+If you need /usr/bin/socat this parameter should be set.
</longdesc>
-<shortdesc lang="en">Full path name of the nc binary</shortdesc>
+<shortdesc lang="en">Full path of the used binary (nc or socat are
allowed)</shortdesc>
<content type="string" default="${OCF_RESKEY_nc_default}"/>
</parameter>
@@ -100,6 +102,10 @@
lb_start() {
cmd="$OCF_RESKEY_nc -l -k $OCF_RESKEY_port"
+ if [ $( basename $OCF_RESKEY_nc ) = 'socat' ]; then
+ #socat has different parameters
+ cmd="$OCF_RESKEY_nc -U
TCP-LISTEN:$OCF_RESKEY_port,backlog=10,fork,reuseaddr /dev/null"
+ fi
if ! lb_monitor; then
ocf_log debug "Starting $process: $cmd"
# Execute the command as created above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.3.0+git161.00cb192d/heartbeat/nfsserver
new/resource-agents-4.3.0+git178.b102c209/heartbeat/nfsserver
--- old/resource-agents-4.3.0+git161.00cb192d/heartbeat/nfsserver
2019-09-09 14:05:39.000000000 +0200
+++ new/resource-agents-4.3.0+git178.b102c209/heartbeat/nfsserver
2019-09-30 14:51:57.000000000 +0200
@@ -233,24 +233,25 @@
return 0
fi
- ##
- # Attempt systemd (with nfs-lock.service).
- ##
if which systemctl > /dev/null 2>&1; then
- if systemctl list-unit-files | grep nfs-server > /dev/null &&
systemctl list-unit-files | grep nfs-lock > /dev/null; then
- EXEC_MODE=2
- # when using systemd, the nfs-lock service file handles
nfsv3 locking daemons for us.
- return 0
- fi
- fi
+ if systemctl --no-legend list-unit-files 'nfs-*' | grep
nfs-server > /dev/null; then
- ##
- # Attempt systemd (with rpc-statd.service).
- ##
- if which systemctl > /dev/null 2>&1; then
- if systemctl list-unit-files | grep nfs-server > /dev/null &&
systemctl list-unit-files | grep rpc-statd > /dev/null; then
- EXEC_MODE=3
- return 0
+ ##
+ # Attempt systemd (with nfs-lock.service).
+ ##
+ if systemctl --no-legend list-unit-files 'nfs-*' | grep
nfs-lock > /dev/null; then
+ EXEC_MODE=2
+ # when using systemd, the nfs-lock service file
handles nfsv3 locking daemons for us.
+ return 0
+ fi
+
+ ##
+ # Attempt systemd (with rpc-statd.service).
+ ##
+ if systemctl --no-legend list-unit-files 'rpc-*' | grep
rpc-statd > /dev/null; then
+ EXEC_MODE=3
+ return 0
+ fi
fi
fi
@@ -272,12 +273,12 @@
2) if ! echo $svc | grep -q "\."; then
svc="${svc}.service"
fi
- systemctl $cmd $svc
+ systemctl -n0 $cmd $svc
;;
3) if ! echo $svc | grep -q "\."; then
svc="${svc}.service"
fi
- systemctl $cmd $svc
+ systemctl -n0 $cmd $svc
;;
esac
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.3.0+git161.00cb192d/heartbeat/redis.in
new/resource-agents-4.3.0+git178.b102c209/heartbeat/redis.in
--- old/resource-agents-4.3.0+git161.00cb192d/heartbeat/redis.in
2019-09-09 14:05:39.000000000 +0200
+++ new/resource-agents-4.3.0+git178.b102c209/heartbeat/redis.in
2019-09-30 14:51:57.000000000 +0200
@@ -237,12 +237,42 @@
MASTER_HOST=""
MASTER_ACTIVE_CACHED=""
MASTER_ACTIVE=""
+CLI_HAVE_AUTH_WARNING=0
+CLI_HAVE_ARG_NO_AUTH_WARNING=0
+CLI_HAVE_ENV_AUTH=0
+
+redis_cli_features()
+{
+
+ CLI_VER=$("$REDIS_CLIENT" -v | awk '{print $NF}')
+ # Starting with 4.0.10 there is a warning on stderr when using a pass
+ # Starting with 5.0.0 there is an argument to silence the warning:
--no-auth-warning
+ # Starting with 5.0.3 there is an option to use REDISCLI_AUTH
evironment variable for password, no warning in this case
+
+ ocf_version_cmp $CLI_VER 5.0.3
+ res=$?
+ if [[ res -ge 1 ]]; then
+ CLI_HAVE_ENV_AUTH=1
+ fi
+
+ ocf_version_cmp $CLI_VER 5.0.0
+ res=$?
+ if [[ res -ge 1 ]]; then
+ CLI_HAVE_ARG_NO_AUTH_WARNING=1
+ fi
+
+ ocf_version_cmp $CLI_VER 4.0.10
+ res=$?
+ if [[ res -ge 1 ]]; then
+ CLI_HAVE_AUTH_WARNING=1
+ fi
+}
master_is_active()
{
if [ -z "$MASTER_ACTIVE_CACHED" ]; then
# determine if a master instance is already up and is healthy
- crm_mon --as-xml | grep
"resource.*id=\"${OCF_RESOURCE_INSTANCE}\".*role=\"Master\".*active=\"true\".*orphaned=\"false\".*failed=\"false\""
> /dev/null 2>&1
+ crm_mon --as-xml | grep
"resource.*id=\"${OCF_RESOURCE_INSTANCE}\".* role=\"Master\".*
active=\"true\".* orphaned=\"false\".* failed=\"false\"" > /dev/null 2>&1
MASTER_ACTIVE=$?
MASTER_ACTIVE_CACHED="true"
fi
@@ -315,9 +345,16 @@
redis_client() {
ocf_log debug "redis_client: '$REDIS_CLIENT' -s '$REDIS_SOCKET' $*"
if [ -n "$clientpasswd" ]; then
- # Starting with 4.0.10 there is a warning on stderr when using
a pass
- # Once we stop supporting versions < 5.0.0 we can add
--no-auth-warning here
- ("$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd" "$@"
2>&1 >&3 3>&- | grep -v "Using a password" >&2 3>&-) 3>&1 | sed 's/\r//'
+ # Consider redis-cli features to choose optimal password
passing method and warning filtering workaround
+ if [[ CLI_HAVE_ENV_AUTH -eq 1 ]]; then
+ REDISCLI_AUTH=$clientpasswd "$REDIS_CLIENT" -s
"$REDIS_SOCKET" "$@" | sed 's/\r//'
+ elif [[ CLI_HAVE_ARG_NO_AUTH_WARNING -eq 1 ]]; then
+ "$REDIS_CLIENT" -s "$REDIS_SOCKET" --no-auth-warning -a
"$clientpasswd" "$@" | sed 's/\r//'
+ elif [[ CLI_HAVE_AUTH_WARNING -eq 1 ]]; then
+ ("$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd"
"$@" 2>&1 >&3 3>&- | grep -v "Using a password" >&2 3>&-) 3>&1 | sed 's/\r//'
+ else
+ "$REDIS_CLIENT" -s "$REDIS_SOCKET" -a "$clientpasswd"
"$@" | sed 's/\r//'
+ fi
else
"$REDIS_CLIENT" -s "$REDIS_SOCKET" "$@" | sed 's/\r//'
fi
@@ -686,6 +723,8 @@
clientpasswd="$(sed -n -e 's/^\s*requirepass\s*\(.*\)\s*$/\1/p' <
$REDIS_CONFIG | tail -n 1)"
fi
+redis_cli_features
+
ocf_log debug "action=${1:-$__OCF_ACTION}
notify_type=${OCF_RESKEY_CRM_meta_notify_type}
notify_operation=${OCF_RESKEY_CRM_meta_notify_operation}
master_host=${OCF_RESKEY_CRM_meta_notify_master_uname}
slave_host=${OCF_RESKEY_CRM_meta_notify_slave_uname}
promote_host=${OCF_RESKEY_CRM_meta_notify_promote_uname}
demote_host=${OCF_RESKEY_CRM_meta_notify_demote_uname}; params:
bin=${OCF_RESKEY_bin} client_bin=${OCF_RESKEY_client_bin}
config=${OCF_RESKEY_config} user=${OCF_RESKEY_user} rundir=${OCF_RESKEY_rundir}
port=${OCF_RESKEY_port}"
case "${1:-$__OCF_ACTION}" in