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

Bug 2079012: Fix egressIP object deletion if the node is deleted first #1143

Merged
merged 3 commits into from Jun 20, 2022

Conversation

tssurya
Copy link
Contributor

@tssurya tssurya commented Jun 15, 2022

Clean cherry-pick from ovn-org/ovn-kubernetes#3008.
NO conflicts

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)
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)
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
(cherry picked from commit 35b4793)
@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 Jun 15, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 15, 2022

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @huiran0826

In response to this:

Bug 2079012: 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.

@openshift-ci openshift-ci bot requested review from huiran0826, abhat and dcbw June 15, 2022 06:27
@tssurya
Copy link
Contributor Author

tssurya commented Jun 15, 2022

/retest

@kyrtapz
Copy link
Contributor

kyrtapz commented Jun 15, 2022

/lgtm

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

tssurya commented Jun 16, 2022

/retest

@trozet
Copy link
Contributor

trozet commented Jun 16, 2022

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kyrtapz, trozet, 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 Jun 16, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 4607b7d and 8 for PR HEAD 619748b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 4607b7d and 7 for PR HEAD 619748b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 4607b7d and 6 for PR HEAD 619748b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD a32bd12 and 5 for PR HEAD 619748b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 2def833 and 4 for PR HEAD 619748b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 2def833 and 3 for PR HEAD 619748b in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 2def833 and 2 for PR HEAD 619748b in total

@tssurya
Copy link
Contributor Author

tssurya commented Jun 19, 2022

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 19, 2022

@tssurya: The following tests 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-aws-ovn-serial 619748b link false /test e2e-aws-ovn-serial
ci/prow/e2e-azure-ovn 619748b link false /test e2e-azure-ovn
ci/prow/e2e-ovn-hybrid-step-registry 619748b link false /test e2e-ovn-hybrid-step-registry
ci/prow/e2e-openstack-ovn 619748b 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.

@tssurya
Copy link
Contributor Author

tssurya commented Jun 20, 2022

/test e2e-metal-ipi-ovn-dualstack

@openshift-ci openshift-ci bot merged commit 0425b16 into openshift:master Jun 20, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 20, 2022

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

Bugzilla bug 2079012 has been moved to the MODIFIED state.

In response to this:

Bug 2079012: 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.

@tssurya
Copy link
Contributor Author

tssurya commented Jul 9, 2022

/cherry-pick release-4.10

@openshift-cherrypick-robot

@tssurya: #1143 failed to apply on top of branch "release-4.10":

Applying: gatewayCleanup doesn't delete rtoj* ports
Using index info to reconstruct a base tree...
M	go-controller/pkg/ovn/egressip_test.go
M	go-controller/pkg/ovn/gateway_cleanup.go
M	go-controller/pkg/ovn/gateway_test.go
Falling back to patching base and 3-way merge...
Auto-merging go-controller/pkg/ovn/gateway_test.go
Auto-merging go-controller/pkg/ovn/gateway_cleanup.go
CONFLICT (content): Merge conflict in go-controller/pkg/ovn/gateway_cleanup.go
Auto-merging go-controller/pkg/ovn/egressip_test.go
CONFLICT (content): Merge conflict in go-controller/pkg/ovn/egressip_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 gatewayCleanup doesn't delete rtoj* ports
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.10

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. 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. 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

5 participants