- Route: update 'destination' description and add warning message
when 'default' destination is used Resolves: RHEL-224062
This commit is contained in:
parent
40b8bf0a68
commit
ab46b50e34
@ -0,0 +1,28 @@
|
||||
From 5dc076738621f75db5d2760f596507ba7a3b73d3 Mon Sep 17 00:00:00 2001
|
||||
From: Arslan Ahmad <arahmad@redhat.com>
|
||||
Date: Fri, 31 Jul 2026 22:07:12 +0530
|
||||
Subject: [PATCH] Route: update destination parameter to non-unique
|
||||
|
||||
Allows multiple routes to use the string "default" for
|
||||
different address families (e.g. dual-stack IPv4/IPv6).
|
||||
|
||||
Fixes #2182
|
||||
|
||||
Signed-off-by: Arslan Ahmad <arahmad@redhat.com>
|
||||
---
|
||||
heartbeat/Route | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/heartbeat/Route b/heartbeat/Route
|
||||
index 7db41d0ae9..75da16fa75 100755
|
||||
--- a/heartbeat/Route
|
||||
+++ b/heartbeat/Route
|
||||
@@ -88,7 +88,7 @@ of the Route resource agent:
|
||||
|
||||
<parameters>
|
||||
|
||||
-<parameter name="destination" unique="1" required="1">
|
||||
+<parameter name="destination" unique="0" required="1">
|
||||
<longdesc lang="en">
|
||||
The destination network (or host) to be configured for the route.
|
||||
Specify the netmask suffix in CIDR notation (e.g. "/24").
|
||||
@ -0,0 +1,57 @@
|
||||
From 536ff237c1045d4f207577381b8738c5ce55f246 Mon Sep 17 00:00:00 2001
|
||||
From: Arslan Ahmad <arahmad@redhat.com>
|
||||
Date: Tue, 4 Aug 2026 13:33:11 +0530
|
||||
Subject: [PATCH] Route: restore unique="1" for destination and warn on
|
||||
"default"
|
||||
|
||||
The PR#2193 change to `unique="0"` fixed dual-stack default routes
|
||||
but unintentionally removed the safety guardrail against
|
||||
accidentally duplicating normal subnet routes.
|
||||
|
||||
This commit addresses the issue safely by:
|
||||
- Reverting the destination parameter back to `unique="1"` to ensure
|
||||
strict route validation.
|
||||
- Updating the metadata description to advise using explicit CIDR
|
||||
notation (0.0.0.0/0 and ::/0) for dual-stack default routes.
|
||||
- Adding a runtime warning when the string `default` is used.
|
||||
|
||||
Refs #2182
|
||||
|
||||
Signed-off-by: Arslan Ahmad <arahmad@redhat.com>
|
||||
---
|
||||
heartbeat/Route | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/Route b/heartbeat/Route
|
||||
index 75da16fa7..12e0fcfed 100755
|
||||
--- a/heartbeat/Route
|
||||
+++ b/heartbeat/Route
|
||||
@@ -88,13 +88,16 @@ of the Route resource agent:
|
||||
|
||||
<parameters>
|
||||
|
||||
-<parameter name="destination" unique="0" required="1">
|
||||
+<parameter name="destination" unique="1" required="1">
|
||||
<longdesc lang="en">
|
||||
The destination network (or host) to be configured for the route.
|
||||
Specify the netmask suffix in CIDR notation (e.g. "/24").
|
||||
If no suffix is given, a host route will be created.
|
||||
-Specify "0.0.0.0/0" or "default" if you want this resource to set
|
||||
-the system default route.
|
||||
+Specify "0.0.0.0/0" or "::/0" if you want this resource to set
|
||||
+the system default route. The keyword "default" is also accepted,
|
||||
+but the unique constraint on this parameter will prevent from
|
||||
+adding both IPv4 and IPv6 default routes at the same time in
|
||||
+this way.
|
||||
</longdesc>
|
||||
<shortdesc lang="en">Destination network</shortdesc>
|
||||
<content type="string" />
|
||||
@@ -262,6 +265,8 @@ route_validate() {
|
||||
if [ -z "${OCF_RESKEY_destination}" ]; then
|
||||
ocf_exit_reason "Missing required parameter \"destination\"."
|
||||
return $OCF_ERR_CONFIGURED
|
||||
+ elif [ "${OCF_RESKEY_destination}" = "default" ]; then
|
||||
+ ocf_log warn "While 'default' is accepted as 'destination', it is highly recommended to use explicit CIDR notation ('0.0.0.0/0' for IPv4 or '::/0' for IPv6) instead."
|
||||
fi
|
||||
# Did we get either a device or a gateway address?
|
||||
if [ -z "${OCF_RESKEY_device}" -a -z "${OCF_RESKEY_gateway}" ]; then
|
||||
@ -45,7 +45,7 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.10.0
|
||||
Release: 128%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
Release: 129%{?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
|
||||
@ -225,6 +225,8 @@ Patch172: RHEL-184272-nfsserver-monitor-nfsdcld-and-nfs-mountd-services-to-trigg
|
||||
Patch173: RHEL-171180-portblock-add-IPv6-support.patch
|
||||
Patch174: RHEL-183132-portblock-fix-IPv6-rule-detection-in-the-iptables-backend.patch
|
||||
Patch175: RHEL-191368-db2-avoid-promoting-in-standby_remote_catchup_pending-state.patch
|
||||
Patch176: RHEL-224062-1-Route-update-destination-parameter-to-non-unique.patch
|
||||
Patch177: RHEL-224062-2-Route-update-destination-description-and-add-warning-message.patch
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
Patch500: ha-cloud-support-aliyun.patch
|
||||
@ -545,6 +547,8 @@ exit 1
|
||||
%patch -p1 -P 173
|
||||
%patch -p1 -P 174
|
||||
%patch -p1 -P 175
|
||||
%patch -p1 -P 176
|
||||
%patch -p1 -P 177
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
%patch -p1 -P 500
|
||||
@ -879,6 +883,12 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
|
||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||
|
||||
%changelog
|
||||
* Tue Aug 04 2026 Arslan Ahmad <arahmad@redhat.com> - 4.10.0-129
|
||||
- Route: update 'destination' description and add warning message
|
||||
when 'default' destination is used
|
||||
|
||||
Resolves: RHEL-224062
|
||||
|
||||
* Thu Jul 02 2026 Arslan Ahmad <arahmad@redhat.com> - 4.10.0-128
|
||||
- db2: avoid promoting in STANDBY/REMOTE_CATCHUP_PENDING state
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user