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.

Bug 1905547

Summary: aws-vpc-move-ip: regression in 8.2z/8.1z: routes get deleted from route table after IP address is assigned
Product: Red Hat Enterprise Linux 8 Reporter: Oyvind Albrigtsen <oalbrigt>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED CURRENTRELEASE QA Contact: Brandon Perkins <bperkins>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: agk, bperkins, cfeist, cluster-maint, fdinitto, pzimek, sbradley
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.4Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1905550 1905551 1905552 (view as bug list) Environment:
Last Closed: 2020-12-08 14:35:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1905550, 1905551, 1905552    

Description Oyvind Albrigtsen 2020-12-08 14:27:49 UTC
Description of problem:

The 8.1.z (BZ 1822251) and 8.2.z (BZ 1822250) versions of the aws-vpc-move-ip resource agent delete routes (as part of ec2ip_get_and_configure()) **after** assigning the IP address to the interface. They're supposed to delete routes (as part of ec2ip_drop()) **before** assigning the IP address to the interface.

I have no idea how or why this is the case. The upstream history of the resource agent shows that the `ip route` commands have always been part of the ec2ip_drop() function since they were added:
  - https://github.com/ClusterLabs/resource-agents/commit/390d1cb8

Furthermore, resource-agents-4.1.1-68.el8 (RHEL 8.3) contains the `ip route` calls in the correct location. (See BZ 1819021).


These are the lines:

        # delete remaining route-entries if any
        ip route show to exact ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface | xargs -r ip route delete
        ip route show table local to exact ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface | xargs -r ip route delete

They're at the end of ec2ip_get_and_configure() when they should be (and are upstream) at the end of ec2ip_drop().

-----

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

resource-agents-4.1.1-44.el8_2.6

-----

How reproducible:

Always

-----

Steps to Reproduce:
1. Create and start an aws-vpc-move-ip resource.
2. Run `ip route show table all`.

-----

Actual results:

There is no local route to the managed IP address after the start operation.

-----

Expected results:

There is a local route to the managed IP address after the start operation. For example:

$ ip route show table all | grep '10\.29\.255\.'
local 10.29.255.250 dev eth0 table local proto kernel scope host src 10.29.255.250 

-----

Additional info:

I'm flagging this as a regression, because until those lines were added to the end of ec2ip_get_and_configure(), one must assume the routes were present at the end of the start operation.

-----

Potential workaround:

Configure an IPsrcaddr resource with proto=kernel table=local.