Commit Graph

18 Commits

Author SHA1 Message Date
Jeff Grafton
11f248fd35 Remove deprecated automanaged tag from some go rules 2019-01-08 14:40:57 -08:00
xujieasd
4eab9406fa add UT code for cleanLegacyBindAddr
gofmt modify

change api to v1
2018-10-17 11:04:26 +08:00
liangwei
8a8b5845a9 optimize ipvs get nodeIP 2018-08-14 09:14:15 +08:00
Kubernetes Submit Queue
e1ed79c804
Merge pull request #65264 from xujieasd/ipvs-bind-address
Automatic merge from submit-queue. 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>.

add cleanLegacyBindAddr

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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #65263

**Special notes for your reviewer**:
To fix the issue,   
use `activeBindAddrs` map which represents ip address successfully bind to DefaultDummyDevice in the round of sync  
use `currentBindAddrs` map which represents ip addresses bind to DefaultDummyDevice from the system  
create a function `cleanLegacyBindAddr` to unbind address which is in `currentBindAddrs` map but not in `activeBindAddrs` map

**Release note**:

```release-note
NONE
```

/sig network
/area kube-proxy
2018-07-06 05:54:39 -07:00
xujieasd
7973626e94 add cleanLegacyBindAddr
update gofmt && modify comment && modify currentBindAddrs

modify log to Upper-case
2018-06-25 10:37:57 +08:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Lion-Wei
076007b25d update build and s/where/which 2018-04-08 10:32:56 +08:00
Lion-Wei
2acd0abd8c add ut 2018-04-08 10:32:49 +08:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
m1093782566
22a4edcd72 update bazel BUILD 2017-12-18 11:03:29 +08:00
m1093782566
8c4bfd0ca3 add fake ut 2017-12-18 11:03:22 +08:00
m1093782566
a9b67a4b52 fix ipvs proxier nodeport 2017-12-16 16:26:39 +08:00
Kubernetes Submit Queue
11fc906c2b
Merge pull request #54052 from m1093782566/netlink
Automatic merge from submit-queue (batch tested with PRs 55247, 55324, 55261, 55147, 54052). 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>.

Implement dummy device operation by netlink for ipvs proxier

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

Currently, we implement network interface operations, e.g. create a dummy device and delete a dummy interface via ip cmd and then collect the exist code. For example, we assume the following command:
```
ip link add kube-ipvs0 type dummy 
```
returns 2 means the dummy device `kube-ipvs0` exists, see https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/ipvs/proxier.go#L1529 .

However, from the man page of ip command, exit status 2 just means an error was reported by the kernel, see http://man7.org/linux/man-pages/man8/ip.8.html#EXIT_STATUS.

So, that's a bug.

This PR implements dummy device operation by netlink for ipvs proxier so that can get ride of ip command operations.

**Which issue this PR fixes**: 

fixes #54054

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
/area kube-proxy
/kind bug
2017-11-09 00:59:32 -08:00
m1093782566
2861a78baa remove +linux restriction in ipvs/fake 2017-10-27 11:44:02 +08:00
m1093782566
fa94105866 implement dummy device operation by netlink 2017-10-24 11:41:36 +08:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
choury
00f8ae3540 fix duplicate unbind action 2017-10-09 12:14:24 +08:00