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

Add cleanup-ipvs flag for kube-proxy #56036

Merged
merged 1 commit into from
Nov 22, 2017

Conversation

m1093782566
Copy link
Contributor

@m1093782566 m1093782566 commented Nov 20, 2017

What this PR does / why we need it:

There is no way to tell if a given ipvs rule is created by ipvs proxier or not, and some people have complained that iptables/userspace proxier will clean up their ipvs rules when start up - both iptables and userspace proxiers need to clean up legacy proxy rules created by ipvs proxier.

This PR adds a new --cleanup-ipvs flag for kube-proxy for the sake of providing users a way to decide if clean up IPVS rules or not when start iptables or userspace proxier.

Which issue(s) this PR fixes:
Fixes #55857

Special notes for your reviewer:

Release note:

Add cleanup-ipvs flag for kube-proxy 

/sig network
/area ipvs
/king bug

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 20, 2017
@m1093782566
Copy link
Contributor Author

m1093782566 commented Nov 20, 2017

/assign @thockin

/cc @pires @caseydavenport @roffe @vfreex

@thockin
Copy link
Member

thockin commented Nov 20, 2017

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 20, 2017
@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2017
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

2 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 21, 2017
@bmcustodio
Copy link
Contributor

bmcustodio commented Nov 21, 2017

@m1093782566 how does this affect --cleanup? There are scenarios in which one wants to cleanup previous iptables rules but do not touch IPVS rules, and from this comment I was under the impression we would get --cleanup=<iptables|ipvs>.

(Sorry to ask but I didn't have the time to look into the PR code.)

@m1093782566
Copy link
Contributor Author

@brunomcustodio

There are scenarios in which one wants to cleanup previous iptables rules but do not touch IPVS rules

This PR doesn't cover the case you mentioned.

and from this comment I was under the impression we would get --cleanup=<iptables|ipvs>.

I didn't do that because the flag --cleanup means Clean AND Exist. We can't use the flag in iptables/userspace proxier start up.

@m1093782566
Copy link
Contributor Author

BTW, there is a deprecated flag --cleanup-iptables. If we really want to "cleanup previous iptables rules but do not touch IPVS rules", probably we need to make the flag alive. However, it deserves more discussion and is out of scope for this PR.

@thockin thockin added this to the v1.9 milestone Nov 22, 2017
@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. area/ipvs labels Nov 22, 2017
@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request Labels Incomplete

@dchen1107 @m1093782566 @mikedanese @thockin

Action required: This pull request requires label changes. If the required changes are not made within 2 days, the pull request will be moved out of the v1.9 milestone.

kind: Must specify exactly one of kind/bug, kind/cleanup or kind/feature.
priority: Must specify exactly one of priority/critical-urgent, priority/important-longterm or priority/important-soon.

Help

@thockin
Copy link
Member

thockin commented Nov 22, 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 Nov 22, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: m1093782566, thockin

Associated issue: 55857

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
Copy link

Automatic merge from submit-queue (batch tested with PRs 55103, 56036, 56186). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit a838692 into kubernetes:master Nov 22, 2017
@cblecker
Copy link
Member

@m1093782566 @thockin This change broke cross build on Windows:

I1122 09:21:38.273] # k8s.io/kubernetes/cmd/kube-proxy/app
I1122 09:21:38.273] cmd/kube-proxy/app/server.go:221:36: too many arguments in call to NewProxyServer
I1122 09:21:38.273] 	have (*kubeproxyconfig.KubeProxyConfiguration, bool, bool, *"k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime".Scheme, string)
I1122 09:21:38.273] 	want (*kubeproxyconfig.KubeProxyConfiguration, bool, *"k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime".Scheme, string)

func NewProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExit bool, scheme *runtime.Scheme, master string) (*ProxyServer, error) {

@Manikantayalagandala
Copy link

Hi Team ,

Any final cmd to resolve the issue.

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. area/ipvs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. milestone/incomplete-labels release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPVS kube-proxy will flush all existing ipvs rules in its startup
10 participants