- Route: update 'destination' description and add warning message
when 'default' destination is used Resolves: RHEL-224054
This commit is contained in:
parent
32a40dcae4
commit
d56db284e0
@ -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.16.0
|
||||
Release: 72%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
Release: 73%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
||||
@ -144,6 +144,8 @@ Patch91: RHEL-182592-nfsserver-monitor-nfsdcld-and-nfs-mountd-services-to-trigge
|
||||
Patch92: RHEL-171167-portblock-add-IPv6-support.patch
|
||||
Patch93: RHEL-183131-portblock-fix-IPv6-rule-detection-in-the-iptables-backend.patch
|
||||
Patch94: RHEL-166371-db2-avoid-promoting-in-standby_remote_catchup_pending-state.patch
|
||||
Patch95: RHEL-224054-1-Route-update-destination-parameter-to-non-unique.patch
|
||||
Patch96: RHEL-224054-2-Route-update-destination-description-and-add-warning-message.patch
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
Patch500: ha-cloud-support-aliyun.patch
|
||||
@ -409,6 +411,8 @@ exit 1
|
||||
%patch -p1 -P 92
|
||||
%patch -p1 -P 93
|
||||
%patch -p1 -P 94
|
||||
%patch -p1 -P 95
|
||||
%patch -p1 -P 96
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
%patch -p1 -P 500
|
||||
@ -741,6 +745,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.16.0-73
|
||||
- Route: update 'destination' description and add warning message
|
||||
when 'default' destination is used
|
||||
|
||||
Resolves: RHEL-224054
|
||||
|
||||
* Thu Jul 02 2026 Arslan Ahmad <arahmad@redhat.com> - 4.16.0-72
|
||||
- db2: avoid promoting in STANDBY/REMOTE_CATCHUP_PENDING state
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user