Bug 2040110 - [RFE] findif.sh: Support policy-based routing
Summary: [RFE] findif.sh: Support policy-based routing
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: resource-agents
Version: 8.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 8.7
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe
Steven J. Levine
URL:
Whiteboard:
Depends On:
Blocks: 2142518
TreeView+ depends on / blocked
 
Reported: 2022-01-13 00:50 UTC by Reid Wahl
Modified: 2023-08-17 13:33 UTC (History)
8 users (show)

Fixed In Version: resource-agents-4.9.0-44.el8
Doc Type: Enhancement
Doc Text:
.`IPaddr2` and `IPsrcaddr` cluster resource agents now support policy-based routing The `IPaddr2` and `IPsrcaddr` cluster resource agents now support policy-based routing, which enables you to configure complex routing scenarios. Policy-based routing requires that you configure the resource agent's `table` parameter.
Clone Of:
: 2142518 (view as bug list)
Environment:
Last Closed:
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6608 0 None None None 2023-04-19 21:53:42 UTC
Red Hat Issue Tracker RHELPLAN-107736 0 None None None 2022-01-13 00:58:48 UTC
Red Hat Knowledge Base (Solution) 6774601 0 None None None 2022-03-02 17:00:35 UTC

Description Reid Wahl 2022-01-13 00:50:59 UTC
Description of problem:

A customer has opened a support case stating that findif.sh fails with "Unable to find nic or netmask" if policy-based routing [1] is in use. I'll post details in a private comment. They've said:

"So script tries to find the interface by executing command 'ip -o -f inet route list match <addr> scope link', this returns nothing since <iface> has policy routing configured and is not present in default routing table.

It works fine if nic and cidr_netmask are specified as resource attributes.

The request is to do one of the following:
  (a) add support for policy-based routing, or
  (b) add a note to the cidr_netmask option in the IPaddr2 metadata, noting that it's required if policy-based routing is in use.

My comments:

Option (a) could turn out to be quite difficult to implement due to added complexity. Adding this feature could inadvertently cause route detection to break in other circumstances, and these breaks may go undetected for a while if they occur in uncommon configurations. There may also be OS compatibility issues. There's probably a way to do everything with the `ip` command (which is standard enough) -- e.g., with `ip rule list` and then choosing the appropriate table. With all of that said, I have not yet explored our options for implementing support for policy-based routing. Maybe it ends up being straightforward.

Option (b) opens the door to clunky documentation. There's nothing special about the policy-based routing case IMO, compared to other cases where cidr_netmask must be specified explicitly. If we document this in the metadata, why not all the other cases? Still, it's the easier of the two.


[1] Chapter 23. Configuring policy-based routing to define alternative routes (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-policy-based-routing-to-define-alternative-routes_configuring-and-managing-networking)

-----

Version-Release number of selected component (if applicable):

resource-agents-4.1.1-90.el8_4.7

-----

How reproducible:

Sounds like "always"

-----

Steps to Reproduce:

Not exactly sure. You'd need to configure policy-based routing as described in the link under "Description of problem". I'll post the customer's details privately.

-----

Actual results:

findif fails with "ERROR: Unable to find nic or netmask."

-----

Expected results:

findif succeeds at finding the proper netmask.

-----

Additional info:

We have made it clear to the customer that findif.sh makes an effort to find the correct nic and/or netmask (the IPaddr2 metadata says "try"), but that it's more of a convenience tool; explicit configuration may be required.

Comment 2 Oyvind Albrigtsen 2022-03-25 13:27:14 UTC
It seems like we could do this simply by adding a table parameter that can be used in findif.sh when present.

Comment 4 Oyvind Albrigtsen 2022-11-14 10:03:21 UTC
https://github.com/ClusterLabs/resource-agents/pull/1818

Comment 9 Oyvind Albrigtsen 2023-06-21 10:03:09 UTC
Additional patch: https://github.com/ClusterLabs/resource-agents/pull/1875


Note You need to log in before you can comment on or make changes to this bug.