-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix panic on multiple ingress mess up upstream is primary or not #4506
Conversation
Hi @ProNic-QY. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
@ProNic-QY please add an e2e test for this scenario |
@aledbf Done. And add same protect logic in |
Codecov Report
@@ Coverage Diff @@
## master #4506 +/- ##
=========================================
Coverage ? 60.13%
=========================================
Files ? 89
Lines ? 7476
Branches ? 0
=========================================
Hits ? 4496
Misses ? 2509
Partials ? 471
Continue to review full report at Codecov.
|
/retest |
@ProNic-QY run |
@aledbf Get it |
@aledbf @ElvinEfendi Hi,please review this pr.This crash problem detected in our production environment ,so I need fix it as soon as possible. I waiting for your feedback on this PR.Thanks. |
/lgtm |
@ProNic-QY thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, ProNic-QY 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 |
What this PR does / why we need it:
Using the following Ingress as input will cause the IngressController to crash because of nil pointer panic:
Related code snippet:
controller.go
mergeAlternativeBackends()
When IngressController process
ingress-b1
will deletesvc-1
upstream,then processingress-c2
will panic incanMergeBackend()
,because it's primary upstream already deleted.example crash log:
This PR will protect primary upstream not be delete, even if it as alternative upstream in other ingress.