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

Fix kube-proxy panic when running with "--cleanup-iptables=true" #48183

Merged
merged 1 commit into from
Jun 28, 2017

Conversation

xiangpengzhao
Copy link
Contributor

What this PR does / why we need it:
Save the --cleanup-iptables config 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 #48177

Special notes for your reviewer:
/cc @ncdc @irake99

Release note:

NONE

@k8s-ci-robot k8s-ci-robot requested a review from ncdc June 28, 2017 08:47
@k8s-ci-robot
Copy link
Contributor

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

In response to this:

What this PR does / why we need it:
Save the --cleanup-iptables config 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 #48177

Special notes for your reviewer:
/cc @ncdc @irake99

Release note:

NONE

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 28, 2017
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 28, 2017
@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Jun 28, 2017
@@ -447,7 +447,7 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx

// 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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To reviewer: this will guarantee the server to exit when --cleanup-iptables=true, see code block L603-L610.

@xiangpengzhao
Copy link
Contributor Author

/cc @bowei @freehan

@k8s-ci-robot k8s-ci-robot requested review from bowei and freehan June 28, 2017 09:06
@luxas
Copy link
Member

luxas commented Jun 28, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 28, 2017
@luxas luxas added approved-for-milestone kind/bug Categorizes issue or PR as related to a bug. release-blocker labels Jun 28, 2017
@luxas luxas added this to the v1.7 milestone Jun 28, 2017
@luxas
Copy link
Member

luxas commented Jun 28, 2017

cc @kubernetes/kubernetes-release-managers

@ncdc
Copy link
Member

ncdc commented Jun 28, 2017

/assign

@ncdc
Copy link
Member

ncdc commented Jun 28, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 28, 2017
@caesarxuchao
Copy link
Member

I assume it should be cherrypicked.

@caesarxuchao caesarxuchao added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cherrypick-candidate labels Jun 28, 2017
@ncdc
Copy link
Member

ncdc commented Jun 28, 2017

I assume it should be cherrypicked.

Yes

@dchen1107
Copy link
Member

/lgtm

@k8s-github-robot
Copy link

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 28, 2017
@k8s-github-robot
Copy link

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

1 similar comment
@k8s-github-robot
Copy link

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@xiangpengzhao
Copy link
Contributor Author

I assume it should be cherrypicked.

Seems like this bug was introduced in #34727 whose milestone is also v1.7. So I think we don't need to cherry-pick it to a former release. @ncdc could you help confirm this? Thanks!

@ncdc
Copy link
Member

ncdc commented Jun 28, 2017

Need to cherry pick to release-1.7 branch

@xiangpengzhao
Copy link
Contributor Author

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!

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 40f7b59 into kubernetes:master Jun 28, 2017
@caesarxuchao
Copy link
Member

@xiangpengzhao I'll do a batch cherrypick. Thanks for the fix.

@xiangpengzhao
Copy link
Contributor Author

Thanks @caesarxuchao!

@k8s-cherrypick-bot
Copy link

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.

@xiangpengzhao xiangpengzhao deleted the fix-proxy-panic branch July 3, 2017 03:17
k8s-github-robot pushed a commit that referenced this pull request Aug 4, 2017
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
```
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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-blocker release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hyperkube kube-proxy panics when run with '--cleanup-iptables=true' starting with v1.7.0-alpha.3
9 participants