Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.10] Bug 2105657: Fix egressIP object deletion if the node is deleted first #1228

Merged
merged 4 commits into from Nov 4, 2022

Conversation

tssurya
Copy link
Contributor

@tssurya tssurya commented Aug 2, 2022

Brings in #1143 from 4.11 into 4.10. Conflicts are outlined in each PR. Extra commit (partially, needed parts) picked up from the libovsdb cleanup code to facilitate the backport: 4e3c26a

/assign @jcaamano

@tssurya tssurya changed the title Bug 2105657: Fix egressIP object deletion if the node is deleted first [release-4.10] Bug 2105657: Fix egressIP object deletion if the node is deleted first Aug 2, 2022
@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Aug 2, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 2, 2022

@tssurya: This pull request references Bugzilla bug 2105657, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

8 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.10.z) matches configured target release for branch (4.10.z)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 2079012 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent bug Bugzilla bug 2094039 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 2079012 targets the "4.11.0" release, which is one of the valid target releases: 4.11.0
  • dependent Bugzilla bug 2094039 targets the "4.11.0" release, which is one of the valid target releases: 4.11.0
  • bug has dependents

Requesting review from QA contact:
/cc @anuragthehatter

In response to this:

Bug 2105657: Fix egressIP object deletion if the node is deleted first

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@flavio-fernandes flavio-fernandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

sorry to have you had to deal with all the conflicts!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 2, 2022
Copy link
Contributor

@jcaamano jcaamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am missing some changes from commit Fix egressIP object deletion if the node is deleted first

go-controller/pkg/ovn/egressip.go Show resolved Hide resolved
go-controller/pkg/ovn/egressip.go Show resolved Hide resolved
go-controller/pkg/ovn/egressip.go Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 2, 2022
@tssurya
Copy link
Contributor Author

tssurya commented Nov 2, 2022

damn what's with the rebase... yikes..

Currently gatewayCleanup doesn't delete rtoj-* ports
which is fine since it deletes the router and probably
on the OVN side the ports on the router are also removed
as they are dependent on the router. However from a testing
perspective its nice to have the gatewayCleanup remove these
ports explictly just like multiJoinSwitchGatewayCleanup does.

Corresponding gatewayCleanup unit tests are also updated.

We also add a unit test to egressip testing where we test
reassignment upon egress node deletion, specifically where
the node has already gotten deleted by the node watcher. This
test uncovers a bug we have in egressIP code where the
reassignment will not be successful and will fail with the error

E0608 09:42:53.781497  971577 obj_retry.go:1513] Failed to delete resource object node1 of type *factory.egressNode, error: Re-assignment for EgressIP: egressip failed, unable to update object, err: unable to retrieve gateway IP for node: node1, protocol is IPv6: false, err: attempt at finding node gateway router network information failed, err: unable to find router port rtoj-GR_node1: object not found

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
(cherry picked from commit 9d0aebe)
(cherry picked from commit 2100d49)

 Conflicts:
	go-controller/pkg/ovn/gateway_cleanup.go

Conflict because libovsdbops.DeleteLogicalRouterPorts(oc.nbClient,
&logicalRouter, &logicalRouterPort) doesn't exist in 4.10 since we are missing
openshift@8b14898#diff-5d62dde13a2856ea3d4b324968dbaeed261fcb74cb3b81909edf40a6634fa1f4R161 {libovsdb-refactor-cleanup-4.11}
…dicate

Partial pick of
openshift@4e3c26a#diff-5d62dde13a2856ea3d4b324968dbaeed261fcb74cb3b81909edf40a6634fa1f4
from 4e3c26a.
Had to bring in the code required to do
DeleteNextHopFromLogicalRouterPoliciesWithPredicate

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 2, 2022
@tssurya
Copy link
Contributor Author

tssurya commented Nov 2, 2022

/assign @huiran0826
could you verify this using the same steps you did for 4.11 one?

@flavio-fernandes
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2022
go-controller/pkg/ovn/egressip.go Outdated Show resolved Hide resolved
go-controller/pkg/ovn/egressip.go Outdated Show resolved Hide resolved
There are a few instances in egressIP code where we shouldn't
fail hard if objects are not found, example if a node gets
deleted before egressIP watcher takes action. In this case,
we can log a warning saying objects couldn't be deleted and
move on since its technically not an error if the object was
deleted by some other code path.

In oder to ensure we don't leave behind stale reroute policy
entries, we also add the logic of removing policies that have
nexthop == joinIP of the node that's getting deleted into the
gateway cleanup code.

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
(cherry picked from commit 95ab759)
(cherry picked from commit 95486d9)

 Conflicts:
	go-controller/pkg/ovn/egressip.go
	go-controller/pkg/util/net.go

Conflicts because EIP retry code is absent in 4.10
Note: Brought in the chnages done in retry code for
getGatewayRouterJoinIP since they made more sense that way.
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
(cherry picked from commit 35b4793)
(cherry picked from commit 619748b)
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2022
@tssurya
Copy link
Contributor Author

tssurya commented Nov 3, 2022

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2022

@tssurya: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openstack-ovn eea899a link false /test e2e-openstack-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@jcaamano
Copy link
Contributor

jcaamano commented Nov 4, 2022

/lgtm
/approve
/label backport-risk-assessed

@openshift-ci openshift-ci bot added backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. lgtm Indicates that a PR is ready to be merged. labels Nov 4, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flavio-fernandes, jcaamano, tssurya

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 4, 2022
@anuragthehatter
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Nov 4, 2022
@openshift-merge-robot openshift-merge-robot merged commit 41f4464 into openshift:release-4.10 Nov 4, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2022

@tssurya: All pull requests linked via external trackers have merged:

Bugzilla bug 2105657 has been moved to the MODIFIED state.

In response to this:

[release-4.10] Bug 2105657: Fix egressIP object deletion if the node is deleted first

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants