- findif.sh: ignore unreachable, blackhole, and prohibit routes

Resolves: RHEL-32265
This commit is contained in:
Oyvind Albrigtsen 2024-08-19 09:24:02 +02:00
parent ce2c2f6c48
commit 17a65de88d
2 changed files with 38 additions and 8 deletions

View File

@ -0,0 +1,25 @@
From f561e272e9b7fe94ba598b70c6d2f44d034446ed Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Wed, 14 Aug 2024 12:05:54 +0200
Subject: [PATCH] findif.sh: ignore unreachable, blackhole, and prohibit routes
---
heartbeat/findif.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/heartbeat/findif.sh b/heartbeat/findif.sh
index ca5d1a5c1..7b817f75c 100644
--- a/heartbeat/findif.sh
+++ b/heartbeat/findif.sh
@@ -218,9 +218,9 @@ findif()
fi
if [ -n "$nic" ] ; then
# NIC supports more than two.
- 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)
+ routematch=$(ip -o -f $family route list match $match $proto $scope | grep -v "^\(unreachable\|prohibit\|blackhole\)" | grep "dev $nic " | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr)
else
- 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)
+ routematch=$(ip -o -f $family route list match $match $proto $scope | grep -v "^\(unreachable\|prohibit\|blackhole\)" | 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")

View File

@ -45,7 +45,7 @@
Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.10.0
Release: 61%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
Release: 62%{?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
@ -127,11 +127,12 @@ Patch74: RHEL-24683-2-Filesystem-return-success-stop-action.patch
Patch75: RHEL-32265-1-findif.sh-fix-corner-cases.patch
Patch76: RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch
Patch77: RHEL-32265-3-IPaddr2-only-set-metric-value-for-IPv6-when-detected.patch
Patch78: RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch
Patch79: RHEL-40393-Filesystem-2-update-bsd-logic.patch
Patch80: RHEL-32829-db2-fix-OCF_SUCESS-typo.patch
Patch81: RHEL-43579-galera-mysql-redis-remove-Unpromoted-monitor-action.patch
Patch82: RHEL-22715-LVM-activate-fix-false-positive.patch
Patch78: RHEL-32265-4-findif.sh-ignore-unreachable-blackhole-prohibit-routes.patch
Patch79: RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch
Patch80: RHEL-40393-Filesystem-2-update-bsd-logic.patch
Patch81: RHEL-32829-db2-fix-OCF_SUCESS-typo.patch
Patch82: RHEL-43579-galera-mysql-redis-remove-Unpromoted-monitor-action.patch
Patch83: RHEL-22715-LVM-activate-fix-false-positive.patch
# bundled ha-cloud-support libs
Patch500: ha-cloud-support-aws.patch
@ -338,6 +339,7 @@ exit 1
%patch -p1 -P 80
%patch -p1 -P 81
%patch -p1 -P 82
%patch -p1 -P 83
# bundled ha-cloud-support libs
%patch -p1 -P 500
@ -659,6 +661,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
%changelog
* Mon Aug 19 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-62
- IPsrcaddr: add IPv6 support
Resolves: RHEL-32265
* Tue Aug 13 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-61
- LVM-activate: fail when both "system_id_source" and "volume_list"
are set in lvm.conf to avoid false positive activation of the VG
@ -666,10 +673,8 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
Resolves: RHEL-22715
* Fri Jun 28 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-60
- IPsrcaddr: add IPv6 support
- galera/mysql/redis: remove Unpromoted monitor-action
Resolves: RHEL-32265
Resolves: RHEL-43579
* Tue Jun 25 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-59