Fix kube-proxy panic when running with "--cleanup-iptables=true"#48183
Fix kube-proxy panic when running with "--cleanup-iptables=true"#48183k8s-github-robot merged 1 commit intokubernetes:masterfrom
Conversation
|
@xiangpengzhao: GitHub didn't allow me to request PR reviews from the following users: irake99. Note that only kubernetes members can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
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. |
|
Hi @xiangpengzhao. 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 I understand the commands that are listed here. DetailsInstructions 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. |
| // We omit creation of pretty much everything if we run in cleanup mode | ||
| if cleanupAndExit { | ||
| return &ProxyServer{IptInterface: iptInterface}, nil | ||
| return &ProxyServer{IptInterface: iptInterface, CleanupAndExit: cleanupAndExit}, nil |
There was a problem hiding this comment.
To reviewer: this will guarantee the server to exit when --cleanup-iptables=true, see code block L603-L610.
|
/ok-to-test |
|
cc @kubernetes/kubernetes-release-managers |
|
/assign |
|
/lgtm |
|
I assume it should be cherrypicked. |
Yes |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, ncdc, xiangpengzhao Associated issue: 48177 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, ncdc, xiangpengzhao Associated issue: 48177 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, ncdc, xiangpengzhao Associated issue: 48177 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
Need to cherry pick to release-1.7 branch |
|
Hmm, I thought this will be merged to v1.7 directly:) It's deep night at my local time. I will go back to office about 5 hours later and have the chance to do the cheey-picking. If this is urgent, can @ncdc or other folks help do it? Thanks! |
|
Automatic merge from submit-queue |
|
@xiangpengzhao I'll do a batch cherrypick. Thanks for the fix. |
|
Thanks @caesarxuchao! |
|
Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
Automatic merge from submit-queue Add test for kube-proxy running with "--cleanup-iptables=true" **What this PR does / why we need it**: Add test to prevent such kube-proxy panic to happen again. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #48177 **Special notes for your reviewer**: Forgot to add this in last PR #48183. Should we also add this to v1.7 milestone? /cc @ncdc @dchen1107 **Release note**: ```release-note NONE ```
What this PR does / why we need it:
Save the
--cleanup-iptablesconfig for new ProxyServer when it's true.Also check if Broadcaster and EventClient are nil to avoid other potential panic.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #48177Special notes for your reviewer:
/cc @ncdc @irake99
Release note: