RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1574914 - heartbeat: IPsrcaddr: Routes are not replaced when containing different metric and tos values
Summary: heartbeat: IPsrcaddr: Routes are not replaced when containing different metri...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: resource-agents
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-04 10:55 UTC by freaker56
Modified: 2021-02-15 07:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-15 07:38:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description freaker56 2018-05-04 10:55:32 UTC
Description of problem:
The IPsrcaddr replaces ip routes to change the source ip for routing.

In the resource it replaces the rule, however if the rule that it should replace contains metric or tos values (different from the defaults) it adds a rule instead of replacing.

This is the issue the author of https://bugzilla.redhat.com/show_bug.cgi?id=1400172 is facing.
The author has ip routes with metrices and due to this issue it adds a rule instead of replacing.

In that bug report a fix is suggested and implemented:
https://github.com/ClusterLabs/resource-agents/pull/904/commits

However this causes other issues, when the system is booted, the ip route will have the 'proto kernel' attribute, if the resources has been started and stopped, it will no longer have this attribute and subsequent startup's fail.

Version-Release number of selected component (if applicable):
resource-agents-3.9.5-105.el7_4.11.x86_64

How reproducible:
Always.

Steps to Reproduce:
(Copied from bug 1400172)
Run:

export OCF_ROOT=/usr/lib/ocf
export PATH="/usr/sbin:/sbin:$PATH"
export OCF_RESKEY_ipaddress=192.168.0.253
export OCF_RESKEY_cidr_netmask=20

export OCF_RESKEY_nic=eth0
export OCF_RESKEY_ip=192.168.0.253
export OCF_RESKEY_cidr_netmask=20

/usr/lib/ocf/resource.d/heartbeat/IPaddr2 start

ip route show dev eth0

/usr/lib/ocf/resource.d/heartbeat/IPsrcaddr start

ip route show dev eth0

/usr/lib/ocf/resource.d/heartbeat/IPsrcaddr stop

ip route show dev eth0

/usr/lib/ocf/resource.d/heartbeat/IPaddr2 stop


Actual results:

default via 192.168.0.1 dev eth0  proto static  metric 100 
192.168.0.0/20 dev eth0  proto kernel  scope link  src 192.168.0.196  metric 100

default via 192.168.0.1 dev eth0  proto static  src 192.168.0.253  metric 100 
192.168.0.0/20 dev eth0  scope link  src 192.168.0.253 
192.168.0.0/20 dev eth0  proto kernel  scope link  src 192.168.0.196  metric 100

Error: either "to" is duplicate, or "192.168.0.0/20" is a garbage.
ocf-exit-reason:command 'ip route replace 192.168.0.0/20
192.168.0.0/20 dev eth0' failed

default via 192.168.0.1  proto static  src 192.168.0.253  metric 100 
192.168.0.0/20 dev eth0  scope link  src 192.168.0.253 
192.168.0.0/20 dev eth0  proto kernel  scope link  src 192.168.0.196  metric 100

Expected results:

default via 192.168.0.1 dev eth0  proto static  metric 100 
192.168.0.0/20 dev eth0  proto kernel  scope link  src 192.168.0.196  metric 100

default via 192.168.0.1 dev eth0  proto static  src 192.168.0.253  metric 100 
192.168.0.0/20 dev eth0  scope link  src 192.168.0.253  metric 100 

default via 192.168.0.1  proto static  metric 100 
192.168.0.0/20 dev eth0  scope link  src 192.168.0.196  metric 100


Additional info:
I suggest to reverse the initial fix as done in 1400172 to prevent the issues that the 'fix' itself causes.

Secondly I suggest to get the ip route before processing, replace the 'src x.x.x.x' attribute itself, remove the 'proto kernel' if present, and then use 'ip route replace'. This way it preserves also all other options and guarantees a actual replace instead of a possible add.

The reason to remove 'proto kernel' is because this resource changed the route and we can no longer claim it was the kernel that set this.

Comment 5 RHEL Program Management 2021-02-15 07:38:45 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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