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

IPVS proxier keeps updating virtual server even if no service changes #52393

Closed
m1093782566 opened this issue Sep 13, 2017 · 1 comment · Fixed by #52330
Closed

IPVS proxier keeps updating virtual server even if no service changes #52393

m1093782566 opened this issue Sep 13, 2017 · 1 comment · Fixed by #52330
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/network Categorizes an issue or PR as relevant to SIG Network.

Comments

@m1093782566
Copy link
Contributor

m1093782566 commented Sep 13, 2017

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

IPVS proxier keep logging the following message, that is, IPVS proxier keeps updating virtual servers even if no service changes.

I0912 17:08:13.555614   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0x1}, Protocol:"TCP", Port:0x1bb, Scheduler:"rr", Flags:0x1, Timeout:0x2a30}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0x1}, Protocol:"TCP", Port:0x1bb, Scheduler:"rr", Flags:0x3, Timeout:0x2a30}
I0912 17:08:13.555659   18274 proxier.go:1291] IPVS service default/kubernetes:https was changed
I0912 17:08:13.556787   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0xa}, Protocol:"UDP", Port:0x35, Scheduler:"rr", Flags:0x0, Timeout:0x0}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0xa}, Protocol:"UDP", Port:0x35, Scheduler:"rr", Flags:0x2, Timeout:0x0}
I0912 17:08:13.556818   18274 proxier.go:1291] IPVS service kube-system/kube-dns:dns was changed
I0912 17:08:13.557872   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0xa}, Protocol:"TCP", Port:0x35, Scheduler:"rr", Flags:0x0, Timeout:0x0}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0xa}, Protocol:"TCP", Port:0x35, Scheduler:"rr", Flags:0x2, Timeout:0x0}
I0912 17:08:13.557902   18274 proxier.go:1291] IPVS service kube-system/kube-dns:dns-tcp was changed
I0912 17:08:13.558940   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0xb6}, Protocol:"TCP", Port:0xbda, Scheduler:"rr", Flags:0x1, Timeout:0x2a30}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0xb6}, Protocol:"TCP", Port:0xbda, Scheduler:"rr", Flags:0x3, Timeout:0x2a30}
....
I0912 17:09:13.455862   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0x1}, Protocol:"TCP", Port:0x1bb, Scheduler:"rr", Flags:0x1, Timeout:0x2a30}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0x1}, Protocol:"TCP", Port:0x1bb, Scheduler:"rr", Flags:0x3, Timeout:0x2a30}
I0912 17:09:13.455894   18274 proxier.go:1291] IPVS service default/kubernetes:https was changed
I0912 17:09:13.457139   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0xa}, Protocol:"UDP", Port:0x35, Scheduler:"rr", Flags:0x0, Timeout:0x0}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0xa}, Protocol:"UDP", Port:0x35, Scheduler:"rr", Flags:0x2, Timeout:0x0}
I0912 17:09:13.457169   18274 proxier.go:1291] IPVS service kube-system/kube-dns:dns was changed
I0912 17:09:13.458292   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0xa}, Protocol:"TCP", Port:0x35, Scheduler:"rr", Flags:0x0, Timeout:0x0}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0xa}, Protocol:"TCP", Port:0x35, Scheduler:"rr", Flags:0x2, Timeout:0x0}
I0912 17:09:13.458322   18274 proxier.go:1291] IPVS service kube-system/kube-dns:dns-tcp was changed
I0912 17:09:13.459468   18274 proxier.go:1279] vs is: &ipvs.VirtualServer{Address:net.IP{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xa, 0x0, 0x0, 0xb6}, Protocol:"TCP", Port:0xbda, Scheduler:"rr", Flags:0x1, Timeout:0x2a30}, applied vs is : &ipvs.VirtualServer{Address:net.IP{0xa, 0x0, 0x0, 0xb6}, Protocol:"TCP", Port:0xbda, Scheduler:"rr", Flags:0x3, Timeout:0x2a30}
...

PS. I added some logs to print the IPVS virtual server information.

What you expected to happen:

IPVS proxier should NOT update virtual server when no service changes.

How to reproduce it (as minimally and precisely as possible):

Just check the log message, you will find it.

Anything else we need to know?:

I think that's because the IPVS service flags differs. For example, create an IPVS service with Flags = 0, the Flags of created service will change to (0+2=2). Besides, if we create an IPVS service with Flags = 1, then the Flags of created service will change to (1+2=3).

See related issue: moby/libnetwork#1921

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration**:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

/sig network
/assign @m1093782566

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. sig/network Categorizes an issue or PR as relevant to SIG Network. labels Sep 13, 2017
@m1093782566
Copy link
Contributor Author

/cc @choury @Lion-Wei

k8s-github-robot pushed a commit that referenced this issue Sep 24, 2017
Automatic merge from submit-queue (batch tested with PRs 52469, 52574, 52330, 52689, 52829). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Fix IPVS service Flags

**What this PR does / why we need it**:

**Which issue this PR fixes**: 

fixes #52393

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/network Categorizes an issue or PR as relevant to SIG Network.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants