Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
The `ocf:heartbeat:IPsrcaddr` resource agent updates the default route to use a specified IP address (`OCF_RESKEY_ipaddress`) as the preferred source IP. It does not make any changes to the local route table.
`IPsrcaddr` is often paired with `IPaddr2` to provide a virtual IP address and then use that virtual IP as the preferred source IP for outgoing connections on the default route. Some applications make local connections to the virtual IP address, and a subset of those require that the source IP for the connection be the virtual IP.
In other words, the local connection in these cases needs to be:
virtual_ip -> virtual_ip
However, this is what is occurring:
primary_ip -> virtual_ip
The local routing table determines the source IP for these connections. For routes in the local routing table, the default src IP address has always been the primary IP address of the interface. After adding an `IPaddr2` resource, there will be a local route like this:
# ip route show table local to exact <virtual_ip>
local <virtual_ip> dev <iface> proto kernel scope host src <primary_ip>
On RHEL 6, due to a bug, the kernel ignored the src specification when handling local routing. Instead, it used the destination IP as the source IP. So applications that depended on "virtual_ip -> virtual_ip" behavior behaved normally. For more information, see "Source IP address selection is different in RHEL7 compared to RHEL6 for local connections" (https://access.redhat.com/solutions/3458491).
On RHEL 7, the kernel respects the src specification for local routes. So applications that depend on "virtual_ip -> virtual_ip" behavior will break.
The IPsrcaddr resource agent needs to be able to update the local route to `OCF_RESKEY_ipaddress` in addition to updating the default route.
--------------------
Version-Release number of selected component (if applicable):
resource-agents-3.9.5-124.el7.x86_64
master
--------------------
How reproducible:
Always
--------------------
Steps to Reproduce:
1. Create a resource group containing both an IPaddr2 resource and an IPsrcaddr resource with the same IP address ($IPADDR).
# pcs resource show ip
Group: ip
Resource: vip (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=192.168.122.61
Operations: monitor interval=60s timeout=20s (vip-monitor-interval-60s)
stop interval=0s timeout=20s (vip-stop-interval-0s)
start interval=0s timeout=20s (vip-start-interval-0s)
Resource: ipsrc (class=ocf provider=heartbeat type=IPsrcaddr)
Attributes: ipaddress=192.168.122.61
Operations: monitor interval=10 timeout=20s (ipsrc-monitor-interval-10)
start interval=0s timeout=20s (ipsrc-start-interval-0s)
stop interval=0s timeout=20s (ipsrc-stop-interval-0s)
2. Verify that the default route has been updated to use "$IPADDR" as the source IP.
# ip route show to exact 0.0.0.0/0
default via 192.168.122.1 dev eth0 proto static src 192.168.122.61 metric 100
3. Observe that the local route to "$IPADDR" still uses the primary IP address as the source IP.
# ip route show table local to exact 192.168.122.61
local 192.168.122.61 dev eth0 proto kernel scope host src 192.168.122.51
--------------------
Actual results:
# ip route show table local to exact 192.168.122.61
local 192.168.122.61 dev eth0 proto kernel scope host src 192.168.122.51
--------------------
Expected results:
# ip route show table local to exact 192.168.122.61
local 192.168.122.61 dev eth0 proto kernel scope host src 192.168.122.61
--------------------
Additional info:
N/A
Comment 14Oyvind Albrigtsen
2019-08-15 14:33:22 UTC
Destination and table parameters are now used instead of the update_* parameters mentioned above.
E.g. to only use src IP 192.168.122.220 when you connect to 192.168.122.70:
"destination=192.168.122.70/32 ipaddress=192.168.122.220 table=local"
Comment 16Oyvind Albrigtsen
2019-08-16 08:07:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:1067
Description of problem: The `ocf:heartbeat:IPsrcaddr` resource agent updates the default route to use a specified IP address (`OCF_RESKEY_ipaddress`) as the preferred source IP. It does not make any changes to the local route table. `IPsrcaddr` is often paired with `IPaddr2` to provide a virtual IP address and then use that virtual IP as the preferred source IP for outgoing connections on the default route. Some applications make local connections to the virtual IP address, and a subset of those require that the source IP for the connection be the virtual IP. In other words, the local connection in these cases needs to be: virtual_ip -> virtual_ip However, this is what is occurring: primary_ip -> virtual_ip The local routing table determines the source IP for these connections. For routes in the local routing table, the default src IP address has always been the primary IP address of the interface. After adding an `IPaddr2` resource, there will be a local route like this: # ip route show table local to exact <virtual_ip> local <virtual_ip> dev <iface> proto kernel scope host src <primary_ip> On RHEL 6, due to a bug, the kernel ignored the src specification when handling local routing. Instead, it used the destination IP as the source IP. So applications that depended on "virtual_ip -> virtual_ip" behavior behaved normally. For more information, see "Source IP address selection is different in RHEL7 compared to RHEL6 for local connections" (https://access.redhat.com/solutions/3458491). On RHEL 7, the kernel respects the src specification for local routes. So applications that depend on "virtual_ip -> virtual_ip" behavior will break. The IPsrcaddr resource agent needs to be able to update the local route to `OCF_RESKEY_ipaddress` in addition to updating the default route. -------------------- Version-Release number of selected component (if applicable): resource-agents-3.9.5-124.el7.x86_64 master -------------------- How reproducible: Always -------------------- Steps to Reproduce: 1. Create a resource group containing both an IPaddr2 resource and an IPsrcaddr resource with the same IP address ($IPADDR). # pcs resource show ip Group: ip Resource: vip (class=ocf provider=heartbeat type=IPaddr2) Attributes: ip=192.168.122.61 Operations: monitor interval=60s timeout=20s (vip-monitor-interval-60s) stop interval=0s timeout=20s (vip-stop-interval-0s) start interval=0s timeout=20s (vip-start-interval-0s) Resource: ipsrc (class=ocf provider=heartbeat type=IPsrcaddr) Attributes: ipaddress=192.168.122.61 Operations: monitor interval=10 timeout=20s (ipsrc-monitor-interval-10) start interval=0s timeout=20s (ipsrc-start-interval-0s) stop interval=0s timeout=20s (ipsrc-stop-interval-0s) 2. Verify that the default route has been updated to use "$IPADDR" as the source IP. # ip route show to exact 0.0.0.0/0 default via 192.168.122.1 dev eth0 proto static src 192.168.122.61 metric 100 3. Observe that the local route to "$IPADDR" still uses the primary IP address as the source IP. # ip route show table local to exact 192.168.122.61 local 192.168.122.61 dev eth0 proto kernel scope host src 192.168.122.51 -------------------- Actual results: # ip route show table local to exact 192.168.122.61 local 192.168.122.61 dev eth0 proto kernel scope host src 192.168.122.51 -------------------- Expected results: # ip route show table local to exact 192.168.122.61 local 192.168.122.61 dev eth0 proto kernel scope host src 192.168.122.61 -------------------- Additional info: N/A