From 9e605117dc93dde850ac8bb9b4f59d22e6318d6c Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Tue, 11 Jun 2024 09:31:26 +0200 Subject: [PATCH] - IPsrcaddr: add IPv6 support - Filesystem: dont kill unrelated processes during stop-action - db2: fix OCF_SUCESS typo Resolves: RHEL-32265 Resolves: RHEL-40393 Resolves: RHEL-32829 --- RHEL-32265-1-findif.sh-fix-corner-cases.patch | 25 ++ RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch | 365 ++++++++++++++++++ RHEL-32829-db2-fix-OCF_SUCESS-typo.patch | 23 ++ ...stem-1-dont-kill-unrelated-processes.patch | 22 ++ ...-40393-Filesystem-2-update-bsd-logic.patch | 26 ++ resource-agents.spec | 20 +- 6 files changed, 480 insertions(+), 1 deletion(-) create mode 100644 RHEL-32265-1-findif.sh-fix-corner-cases.patch create mode 100644 RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch create mode 100644 RHEL-32829-db2-fix-OCF_SUCESS-typo.patch create mode 100644 RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch create mode 100644 RHEL-40393-Filesystem-2-update-bsd-logic.patch diff --git a/RHEL-32265-1-findif.sh-fix-corner-cases.patch b/RHEL-32265-1-findif.sh-fix-corner-cases.patch new file mode 100644 index 0000000..8284aef --- /dev/null +++ b/RHEL-32265-1-findif.sh-fix-corner-cases.patch @@ -0,0 +1,25 @@ +From f717b4a3aa83c9124e62716f421b99e314d00233 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Fri, 12 Apr 2024 12:23:21 +0200 +Subject: [PATCH] findif.sh: fix corner cases + +--- + heartbeat/findif.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/heartbeat/findif.sh b/heartbeat/findif.sh +index 7c766e6e0..13484f827 100644 +--- a/heartbeat/findif.sh ++++ b/heartbeat/findif.sh +@@ -215,9 +215,9 @@ findif() + fi + if [ -n "$nic" ] ; then + # NIC supports more than two. +- set -- $(ip -o -f $family route list match $match $scope | grep "dev $nic " | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}') ++ set -- $(ip -o -f $family route list match $match $scope | grep "dev $nic " | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) + else +- set -- $(ip -o -f $family route list match $match $scope | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}') ++ set -- $(ip -o -f $family route list match $match $scope | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) + fi + if [ $# = 0 ] ; then + case $OCF_RESKEY_ip in diff --git a/RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch b/RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch new file mode 100644 index 0000000..90a648d --- /dev/null +++ b/RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch @@ -0,0 +1,365 @@ +From 12d73d53026d219be67c0d5353010ba08ab49e98 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 28 May 2024 09:45:55 +0200 +Subject: [PATCH 1/3] findif.sh: add metric for IPv6 support and fail when + matching more than 1 route + +--- + heartbeat/findif.sh | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +diff --git a/heartbeat/findif.sh b/heartbeat/findif.sh +index 13484f827..ca5d1a5c1 100644 +--- a/heartbeat/findif.sh ++++ b/heartbeat/findif.sh +@@ -196,10 +196,13 @@ findif() + { + local match="$OCF_RESKEY_ip" + local family ++ local proto + local scope + local nic="$OCF_RESKEY_nic" + local netmask="$OCF_RESKEY_cidr_netmask" + local brdcast="$OCF_RESKEY_broadcast" ++ local metric ++ local routematch + + echo $match | grep -qs ":" + if [ $? = 0 ] ; then +@@ -215,10 +218,19 @@ findif() + fi + if [ -n "$nic" ] ; then + # NIC supports more than two. +- set -- $(ip -o -f $family route list match $match $scope | grep "dev $nic " | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) ++ routematch=$(ip -o -f $family route list match $match $proto $scope | grep "dev $nic " | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) + else +- set -- $(ip -o -f $family route list match $match $scope | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) ++ routematch=$(ip -o -f $family route list match $match $proto $scope | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) + fi ++ if [ "$family" = "inet6" ]; then ++ routematch=$(echo "$routematch" | grep -v "^default") ++ fi ++ ++ if [ $(echo "$routematch" | wc -l) -gt 1 ]; then ++ ocf_exit_reason "More than 1 routes match $match. Unable to decide which route to use." ++ return $OCF_ERR_GENERIC ++ fi ++ set -- $routematch + if [ $# = 0 ] ; then + case $OCF_RESKEY_ip in + 127.*) +@@ -255,6 +267,7 @@ findif() + return $OCF_ERR_GENERIC + fi + fi +- echo "$nic netmask $netmask broadcast $brdcast" ++ metric=$(echo "$@" | sed "s/.*metric[[:blank:]]\([^ ]\+\).*/\1/") ++ echo "$nic netmask $netmask broadcast $brdcast metric $metric" + return $OCF_SUCCESS + } + +From 488c096d63fe0f7e15938e65483ba20628080198 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 28 May 2024 09:47:11 +0200 +Subject: [PATCH 2/3] IPaddr2: use metric for IPv6 + +--- + heartbeat/IPaddr2 | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2 +index 5f30b8f98..091bea418 100755 +--- a/heartbeat/IPaddr2 ++++ b/heartbeat/IPaddr2 +@@ -561,10 +561,11 @@ ip_init() { + if + [ $rc -eq 0 ] + then +- NICINFO=`echo "$NICINFO" | sed -e 's/netmask\ //;s/broadcast\ //'` ++ NICINFO=`echo "$NICINFO" | sed -e 's/netmask\ //;s/broadcast\ //;s/metric\ //'` + NIC=`echo "$NICINFO" | cut -d" " -f1` + NETMASK=`echo "$NICINFO" | cut -d" " -f2` + BRDCAST=`echo "$NICINFO" | cut -d" " -f3` ++ METRIC=`echo "$NICINFO" | cut -d" " -f4` + else + # findif couldn't find the interface + if ocf_is_probe; then +@@ -659,13 +660,14 @@ delete_interface () { + # Add an interface + # + add_interface () { +- local cmd msg extra_opts ipaddr netmask broadcast iface label ++ local cmd msg extra_opts ipaddr netmask broadcast iface label metric + + ipaddr="$1" + netmask="$2" + broadcast="$3" + iface="$4" + label="$5" ++ metric="$6" + + if [ "$FAMILY" = "inet" ] && ocf_is_true $OCF_RESKEY_run_arping && + check_binary arping; then +@@ -688,6 +690,9 @@ add_interface () { + fi + + extra_opts="" ++ if [ "$FAMILY" = "inet6" ]; then ++ extra_opts="$extra_opts metric $metric" ++ fi + if [ "$FAMILY" = "inet6" ] && ocf_is_true "${OCF_RESKEY_nodad}"; then + extra_opts="$extra_opts nodad" + fi +@@ -1083,7 +1088,7 @@ ip_start() { + done + fi + +- add_interface $OCF_RESKEY_ip $NETMASK ${BRDCAST:-none} $NIC $IFLABEL ++ add_interface "$OCF_RESKEY_ip" "$NETMASK" "${BRDCAST:-none}" "$NIC" "$IFLABEL" "$METRIC" + rc=$? + + if [ $rc -ne $OCF_SUCCESS ]; then + +From d1c4d1969381d3e35cfaaaaae522e5687a9ed88a Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 28 May 2024 09:47:56 +0200 +Subject: [PATCH 3/3] IPsrcaddr: add IPv6 support + +--- + heartbeat/IPsrcaddr | 116 ++++++++++++++++++++++++++++++++------------ + 1 file changed, 85 insertions(+), 31 deletions(-) + +diff --git a/heartbeat/IPsrcaddr b/heartbeat/IPsrcaddr +index c732ce8df..1c87d5b7f 100755 +--- a/heartbeat/IPsrcaddr ++++ b/heartbeat/IPsrcaddr +@@ -60,6 +60,7 @@ OCF_RESKEY_cidr_netmask_default="" + OCF_RESKEY_destination_default="0.0.0.0/0" + OCF_RESKEY_proto_default="" + OCF_RESKEY_metric_default="" ++OCF_RESKEY_pref_default="" + OCF_RESKEY_table_default="" + + : ${OCF_RESKEY_ipaddress=${OCF_RESKEY_ipaddress_default}} +@@ -67,6 +68,7 @@ OCF_RESKEY_table_default="" + : ${OCF_RESKEY_destination=${OCF_RESKEY_destination_default}} + : ${OCF_RESKEY_proto=${OCF_RESKEY_proto_default}} + : ${OCF_RESKEY_metric=${OCF_RESKEY_metric_default}} ++: ${OCF_RESKEY_pref=${OCF_RESKEY_pref_default}} + : ${OCF_RESKEY_table=${OCF_RESKEY_table_default}} + ####################################################################### + +@@ -75,10 +77,13 @@ OCF_RESKEY_table_default="" + + USAGE="usage: $0 {start|stop|status|monitor|validate-all|meta-data}"; + +- CMDSHOW="$IP2UTIL route show $TABLE to exact $OCF_RESKEY_destination" +-CMDCHANGE="$IP2UTIL route change to " ++echo "$OCF_RESKEY_ipaddress" | grep -q ":" && FAMILY="inet6" || FAMILY="inet" ++[ "$FAMILY" = "inet6" ] && [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] && OCF_RESKEY_destination="::/0" + +-if [ "$OCF_RESKEY_destination" != "0.0.0.0/0" ]; then ++ CMDSHOW="$IP2UTIL -f $FAMILY route show $TABLE to exact $OCF_RESKEY_destination" ++CMDCHANGE="$IP2UTIL -f $FAMILY route change to " ++ ++if [ "$OCF_RESKEY_destination" != "0.0.0.0/0" ] && [ "$OCF_RESKEY_destination" != "::/0" ]; then + CMDSHOW="$CMDSHOW src $OCF_RESKEY_ipaddress" + fi + +@@ -153,6 +158,14 @@ Metric. Only needed if incorrect metric value is used. + + + ++ ++ ++IPv6 route preference (low, medium or high). Only needed if incorrect pref value is used. ++ ++IPv6 route preference. ++ ++ ++ + + + Table to modify and use for interface lookup. E.g. "local". +@@ -196,12 +209,21 @@ errorexit() { + # where the src clause "src Y.Y.Y.Y" may or may not be present + + WS="[[:blank:]]" +-OCTET="[0-9]\{1,3\}" +-IPADDR="\($OCTET\.\)\{3\}$OCTET" ++case "$FAMILY" in ++ inet) ++ GROUP="[0-9]\{1,3\}" ++ IPADDR="\($GROUP\.\)\{3\}$GROUP" ++ ;; ++ inet6) ++ GROUP="[0-9a-f]\{0,4\}" ++ IPADDR="\($GROUP\:\)\{0,\}$GROUP" ++ ;; ++esac + SRCCLAUSE="src$WS$WS*\($IPADDR\)" +-MATCHROUTE="\(.*${WS}\)\($SRCCLAUSE\)\($WS.*\|$\)" +-METRICCLAUSE=".*\(metric$WS[^ ]\+\)" ++MATCHROUTE="\(.*${WS}\)proto [^ ]\+\(.*${WS}\)\($SRCCLAUSE\)\($WS.*\|$\)" ++METRICCLAUSE=".*\(metric$WS[^ ]\+\).*" + PROTOCLAUSE=".*\(proto$WS[^ ]\+\).*" ++PREFCLAUSE=".*\(pref$WS[^ ]\+\).*" + FINDIF=findif + + # findif needs that to be set +@@ -216,17 +238,17 @@ srca_read() { + 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_RESKEY_destination" = "0.0.0.0/0" ] || [ "$OCF_RESKEY_destination" = "::/0" ]) && [ -z "$ROUTE" ] && \ + ! ocf_is_probe && [ "$__OCF_ACTION" != stop ] && errorexit "no matching route exists" + + # Sed out the source ip address if it exists +- SRCIP=`echo $ROUTE | sed -n "s/$MATCHROUTE/\3/p"` ++ SRCIP=`echo $ROUTE | sed -n "s/$MATCHROUTE/\4/p"` + + # and what remains after stripping out the source ip address clause +- ROUTE_WO_SRC=`echo $ROUTE | sed "s/$MATCHROUTE/\1\5/"` ++ ROUTE_WO_SRC=`echo $ROUTE | sed "s/$MATCHROUTE/\1\2\6/"` + + # using "src " only returns output if there's a match +- if [ "$OCF_RESKEY_destination" != "0.0.0.0/0" ]; then ++ if [ "$OCF_RESKEY_destination" != "0.0.0.0/0" ] && [ "$OCF_RESKEY_destination" != "::/0" ]; then + [ -z "$ROUTE" ] && return 1 || return 0 + fi + +@@ -249,12 +271,15 @@ srca_start() { + rc=$OCF_SUCCESS + ocf_log info "The ip route has been already set.($NETWORK, $INTERFACE, $ROUTE_WO_SRC)" + else +- $IP2UTIL route replace $TABLE $NETWORK dev $INTERFACE $PROTO src $1 $METRIC || \ +- errorexit "command 'ip route replace $TABLE $NETWORK dev $INTERFACE $PROTO src $1 $METRIC' failed" ++ # NetworkManager manages routes with proto static/kernel ++ [ -z "$OCF_RESKEY_proto" ] && echo "$PROTO" | grep -q "proto \(kernel\|static\)" && PROTO="proto keepalived" + +- 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" ++ $IP2UTIL route replace $TABLE $NETWORK dev $INTERFACE $PROTO src $1 $METRIC $PREF || \ ++ errorexit "command 'ip route replace $TABLE $NETWORK dev $INTERFACE $PROTO src $1 $METRIC $PREF' failed" ++ ++ if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] || [ "$OCF_RESKEY_destination" = "::/0" ]; then ++ $CMDCHANGE $ROUTE_WO_SRC $PROTO src $1 || \ ++ errorexit "command '$CMDCHANGE $ROUTE_WO_SRC $PROTO src $1' failed" + fi + rc=$? + fi +@@ -290,14 +315,15 @@ srca_stop() { + fi + + PRIMARY_IP="$($IP2UTIL -4 -o addr show dev $INTERFACE primary | awk '{split($4,a,"/");print a[1]}')" +- OPTS="proto kernel scope $SCOPE src $PRIMARY_IP" ++ OPTS="proto kernel scope $SCOPE" ++ [ "$FAMILY" = "inet" ] && OPTS="$OPTS src $PRIMARY_IP" + +- $IP2UTIL route replace $TABLE $NETWORK dev $INTERFACE $OPTS $METRIC || \ +- errorexit "command 'ip route replace $TABLE $NETWORK dev $INTERFACE $OPTS $METRIC' failed" ++ $IP2UTIL route replace $TABLE $NETWORK dev $INTERFACE $OPTS $METRIC $PREF || \ ++ errorexit "command 'ip route replace $TABLE $NETWORK dev $INTERFACE $OPTS $METRIC $PREF' failed" + +- if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] ;then +- $CMDCHANGE $ROUTE_WO_SRC src $PRIMARY_IP || \ +- errorexit "command '$CMDCHANGE $ROUTE_WO_SRC src $PRIMARY_IP' failed" ++ if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] || [ "$OCF_RESKEY_destination" = "::/0" ]; then ++ $CMDCHANGE $ROUTE_WO_SRC proto static || \ ++ errorexit "command '$CMDCHANGE $ROUTE_WO_SRC proto static' failed" + fi + + return $? +@@ -330,7 +356,7 @@ CheckIP() { + case $ip in + *[!0-9.]*) #got invalid char + false;; +- .*|*.) #begin or end by ".", which is invalid ++ .*|*.) #begin or end with ".", which is invalid + false;; + *..*) #consecutive ".", which is invalid + false;; +@@ -356,6 +382,18 @@ CheckIP() { + return $? # This return is unnecessary, this comment too :) + } + ++CheckIP6() { ++ ip="$1" ++ case $ip in ++ *[!0-9a-f:]*) #got invalid char ++ false;; ++ *:::*) # more than 2 consecutive ":", which is invalid ++ false;; ++ *::*::*) # more than 1 "::", which is invalid ++ false;; ++ esac ++} ++ + # + # Find out which interface or alias serves the given IP address + # The argument is an IP address, and its output +@@ -396,8 +434,7 @@ find_interface_solaris() { + # is an (aliased) interface name (e.g., "eth0" and "eth0:0"). + # + find_interface_generic() { +- +- local iface=`$IP2UTIL -o -f inet addr show | grep "\ $BASEIP" \ ++ local iface=`$IP2UTIL -o -f $FAMILY addr show | grep "\ $BASEIP" \ + | cut -d ' ' -f2 | grep -v '^ipsec[0-9][0-9]*$'` + if [ -z "$iface" ]; then + return $OCF_ERR_GENERIC +@@ -502,7 +539,9 @@ srca_validate_all() { + + # The IP address should be in good shape + if CheckIP "$ipaddress"; then +- : ++ : ++ elif CheckIP6 "$ipaddress"; then ++ : + else + ocf_exit_reason "Invalid IP address [$ipaddress]" + return $OCF_ERR_CONFIGURED +@@ -570,21 +609,36 @@ rc=$? + } + + INTERFACE=`echo $findif_out | awk '{print $1}'` +-LISTROUTE=`$IP2UTIL route list dev $INTERFACE scope link $PROTO match $ipaddress` ++case "$FAMILY" in ++ inet) ++ LISTCMD="$IP2UTIL -f $FAMILY route list dev $INTERFACE scope link $PROTO match $ipaddress" ++ ;; ++ inet6) ++ LISTCMD="$IP2UTIL -f $FAMILY route list dev $INTERFACE $PROTO match $ipaddress" ++ ;; ++esac ++LISTROUTE=`$LISTCMD` ++ + [ -z "$PROTO" ] && PROTO=`echo $LISTROUTE | sed -n "s/$PROTOCLAUSE/\1/p"` + if [ -n "$OCF_RESKEY_metric" ]; then + METRIC="metric $OCF_RESKEY_metric" +-elif [ -z "$TABLE" ] || [ "${TABLE#table }" = "main" ]; then ++elif [ -z "$TABLE" ] || [ "${TABLE#table }" = "main" ] || [ "$FAMILY" = "inet6" ]; then + METRIC=`echo $LISTROUTE | sed -n "s/$METRICCLAUSE/\1/p"` + else + METRIC="" + fi +-if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] ;then ++if [ "$FAMILY" = "inet6" ]; then ++ if [ -z "$OCF_RESKEY_pref" ]; then ++ PREF=`echo $LISTROUTE | sed -n "s/$PREFCLAUSE/\1/p"` ++ else ++ PREF="pref $OCF_RESKEY_pref" ++ fi ++fi ++if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] || [ "$OCF_RESKEY_destination" = "::/0" ] ;then + NETWORK=`echo $LISTROUTE | grep -m 1 -o '^[^ ]*'` + + if [ -z "$NETWORK" ]; then +- err_str="command '$IP2UTIL route list dev $INTERFACE scope link $PROTO" +- err_str="$err_str match $ipaddress' failed to find a matching route" ++ err_str="command '$LISTCMD' failed to find a matching route" + + if [ "$__OCF_ACTION" = "start" ]; then + ocf_exit_reason "$err_str" diff --git a/RHEL-32829-db2-fix-OCF_SUCESS-typo.patch b/RHEL-32829-db2-fix-OCF_SUCESS-typo.patch new file mode 100644 index 0000000..bbe2847 --- /dev/null +++ b/RHEL-32829-db2-fix-OCF_SUCESS-typo.patch @@ -0,0 +1,23 @@ +From a9c4aeb971e9f4963345d0e215b729def62dd27c Mon Sep 17 00:00:00 2001 +From: pepadelic <162310096+pepadelic@users.noreply.github.com> +Date: Mon, 15 Apr 2024 13:52:54 +0200 +Subject: [PATCH] Update db2: fix OCF_SUCESS name in db2_notify + +fix OCF_SUCESS to OCF_SUCCESS in db2_notify +--- + heartbeat/db2 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/heartbeat/db2 b/heartbeat/db2 +index 95447ab6cb..1cd66f15af 100755 +--- a/heartbeat/db2 ++++ b/heartbeat/db2 +@@ -848,7 +848,7 @@ db2_notify() { + + # only interested in pre-start + [ $OCF_RESKEY_CRM_meta_notify_type = pre \ +- -a $OCF_RESKEY_CRM_meta_notify_operation = start ] || return $OCF_SUCESS ++ -a $OCF_RESKEY_CRM_meta_notify_operation = start ] || return $OCF_SUCCESS + + # gets FIRST_ACTIVE_LOG + db2_get_cfg $dblist || return $? diff --git a/RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch b/RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch new file mode 100644 index 0000000..ca24f32 --- /dev/null +++ b/RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch @@ -0,0 +1,22 @@ +From 4b09b3e467a7f8076bbf20f5b027efecf16303e7 Mon Sep 17 00:00:00 2001 +From: Gianluca Piccolo +Date: Thu, 6 Jun 2024 17:34:41 +0200 +Subject: [PATCH] Fix #1944 + +--- + heartbeat/Filesystem | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem +index a445349b9..59b6c1b51 100755 +--- a/heartbeat/Filesystem ++++ b/heartbeat/Filesystem +@@ -664,7 +664,7 @@ get_pids() + if [ "X${HOSTOS}" = "XOpenBSD" ];then + fstat | grep $dir | awk '{print $3}' + else +- $FUSER -m $dir 2>/dev/null ++ $FUSER -Mm $dir 2>/dev/null + fi + elif [ "$FORCE_UNMOUNT" = "safe" ]; then + procs=$(find /proc/[0-9]*/ -type l -lname "${dir}/*" -or -lname "${dir}" 2>/dev/null | awk -F/ '{print $3}') diff --git a/RHEL-40393-Filesystem-2-update-bsd-logic.patch b/RHEL-40393-Filesystem-2-update-bsd-logic.patch new file mode 100644 index 0000000..8299fa8 --- /dev/null +++ b/RHEL-40393-Filesystem-2-update-bsd-logic.patch @@ -0,0 +1,26 @@ +From c9ba6ac66ee27a70c69e1156f17aa6beac277bc5 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Fri, 7 Jun 2024 14:23:28 +0200 +Subject: [PATCH] Filesystem: use fuser -c on FreeBSD, as -m and -M are used + for other functionality + +--- + heartbeat/Filesystem | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem +index 59b6c1b51..88fe2e2eb 100755 +--- a/heartbeat/Filesystem ++++ b/heartbeat/Filesystem +@@ -661,8 +661,10 @@ get_pids() + fi + + if ocf_is_true "$FORCE_UNMOUNT"; then +- if [ "X${HOSTOS}" = "XOpenBSD" ];then ++ if [ "X${HOSTOS}" = "XOpenBSD" ]; then + fstat | grep $dir | awk '{print $3}' ++ elif [ "X${HOSTOS}" = "XFreeBSD" ]; then ++ $FUSER -c $dir 2>/dev/null + else + $FUSER -Mm $dir 2>/dev/null + fi diff --git a/resource-agents.spec b/resource-agents.spec index 47c4b5b..771d7a9 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -45,7 +45,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.10.0 -Release: 57%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 58%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: %{upstream_prefix}-%{upstream_version}.tar.gz @@ -123,6 +123,11 @@ Patch70: RHEL-31763-galera-fix-joiner-promotion-fails-issue.patch Patch71: RHEL-16246-aws-agents-use-curl_retry.patch Patch72: RHEL-34777-Filesystem-fail-when-incorrect-device-mounted.patch Patch73: RHEL-24683-Filesystem-fail-leading-trailing-whitespace.patch +Patch74: RHEL-32265-1-findif.sh-fix-corner-cases.patch +Patch75: RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch +Patch76: RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch +Patch77: RHEL-40393-Filesystem-2-update-bsd-logic.patch +Patch78: RHEL-32829-db2-fix-OCF_SUCESS-typo.patch # bundled ha-cloud-support libs Patch500: ha-cloud-support-aws.patch @@ -320,6 +325,11 @@ exit 1 %patch -p1 -P 71 %patch -p1 -P 72 %patch -p1 -P 73 +%patch -p1 -P 74 +%patch -p1 -P 75 +%patch -p1 -P 76 +%patch -p1 -P 77 +%patch -p1 -P 78 # bundled ha-cloud-support libs %patch -p1 -P 500 @@ -641,6 +651,14 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm %changelog +* Tue Jun 11 2024 Oyvind Albrigtsen - 4.10.0-58 +- IPsrcaddr: add IPv6 support +- Filesystem: dont kill unrelated processes during stop-action +- db2: fix OCF_SUCESS typo + Resolves: RHEL-32265 + Resolves: RHEL-40393 + Resolves: RHEL-32829 + * Wed May 15 2024 Oyvind Albrigtsen - 4.10.0-57 - Filesystem: fail when incorrect device mounted on mountpoint, and dont unmount the mountpoint in this case, or if mountpoint set to "/"