Commit Graph

1776 Commits (56dc8f9a6ab09debeddf5349ee26730d3e9107f8)

Author SHA1 Message Date
Kubernetes Submit Queue 6369a10004
Merge pull request #58284 from mfojtik/findmnt-out
Automatic merge from submit-queue (batch tested with PRs 57868, 58284, 56370, 58400, 58439). 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>.

Show findmnt command output in case of error

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

We don't print the error output from the `findmnt` command, which makes it pretty hard to debug. 

The current implementation just print:

`
I0115 11:59:36.078285   18230 nsenter_mount.go:168] Failed findmnt command for path /var/lib/origin/openshift.local.volumes/pods/8d723ec8-f9e9-11e7-bc52-025000000001/volumes/kubernetes.io~secret/pvinstaller-token-bxh42: exit status 1
`

With this patch, we can actually see the error:

`
I0115 12:04:30.908164   23301 nsenter_mount.go:168] Failed findmnt command for path /var/lib/origin/openshift.local.volumes/pods/8ff8bb98-f9e9-11e7-bc52-025000000001/volumes/kubernetes.io~secret/deployer-token-g4sg9: nsenter: failed to execute /findmnt: No such file or directory
 exit status 1
`

**Release note**:
```release-note
NONE
```
2018-01-18 13:11:30 -08:00
Kubernetes Submit Queue 44d0ba29d3
Merge pull request #56960 from islinwb/remove_unused_code_ut_pkg
Automatic merge from submit-queue (batch tested with PRs 53631, 56960). 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>.

Remove unused code in UT files in pkg/

**What this PR does / why we need it**:
Remove unused code in UT files in pkg/ .

**Release note**:

```release-note
NONE
```
2018-01-18 02:41:29 -08:00
Kubernetes Submit Queue 74f2305c4f
Merge pull request #57967 from jsafrane/fix-nfs-root-squash
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>.

Fixed TearDown of NFS with root squash.

NFS plugin should not use `IsLikelyNotMountPoint()`, as it uses `lstat()` / `stat()` to determine if the NFS volume is still mounted - NFS server may use root_squash and kubelet may not be allowed to do `lstat()` / `stat()` there.

It must use slower `IsNotMountPoint()` instead, including in `TearDown()` function.

**Release note**:

```release-note
NONE
```

/assign @gnufied @rootfs
2018-01-17 13:32:03 -08:00
Michal Fojtik fd520aef61
Show findmt command output in case of error 2018-01-15 13:02:31 +01:00
linweibin fa8afc1d39 Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
Jan Safranek da1eec2853 Add jsafrane as util/mount approver. 2018-01-08 14:19:22 +01:00
Jan Safranek 45d21ee36b Fixed TearDown of NFS with root squash.
NFS plugin should not use IsLikelyNotMountPoint(), as it uses lstat() / stat()
to determine if the NFS volume is still mounted - NFS server may use
root_squash and kubelet may not be allowed to do lstat() / stat() there.

It must use slower IsNotMountPoint() instead, including TearDown() function.
2018-01-08 14:01:33 +01:00
Kubernetes Submit Queue 7585998299
Merge pull request #57317 from m1093782566/notfound
Automatic merge from submit-queue (batch tested with PRs 57906, 57425, 56939, 57317, 57762). 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 "Not Found" error for ipset set & entry delete

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

Add "not found error" for ipset set and entry delete. For example,

```
[root@SHA1000130405 k8s-yml]# ipset list
Name: KUBE-LOOP-BACK
Type: hash:ip,port,ip
Revision: 2
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 16776
References: 1
Members:
172.17.0.2,udp:53,172.17.0.2
172.17.0.2,tcp:53,172.17.0.2
100.106.89.164,tcp:6443,100.106.89.164

[root@SHA1000130405 k8s-yml]# ipset delete foo
ipset v6.19: The set with the given name does not exist

[root@SHA1000130405 k8s-yml]# ipset del KUBE-LOOP-BACK 1.2.3.4,tcp:80,1.2.3.4
ipset v6.19: Syntax error: Third element is missing from 1.2.3.4,tcp:80,1.2.3.4.
```
Just need to filter the error message "does not exist" or "element is missing". We should ignore these error when try to make sure they are deleted.

**Which issue(s) this PR fixes**:
Fixes #57318

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-05 17:52:41 -08:00
Kubernetes Submit Queue 2df01488fe
Merge pull request #57651 from Lion-Wei/ipvs-3
Automatic merge from submit-queue (batch tested with PRs 57651, 56411, 56779, 57523, 57624). 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 fake IPVS Real Server delete

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

Delete `Weight` equal in identify ipvs Realservice equal, since `Address` + `port` can indetify an unique `Realservice`.

**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 #57674

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-01-02 14:09:40 -08:00
Kubernetes Submit Queue 27d2ffb32f
Merge pull request #49856 from dixudx/polish_UpdateNodeStatus
Automatic merge from submit-queue (batch tested with PRs 49856, 56257, 57027, 57695, 57432). 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>.

Change to pkg/util/node.UpdateNodeStatus

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

> // TODO: Change to pkg/util/node.UpdateNodeStatus.

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

**Special notes for your reviewer**:
/cc @brendandburns @dchen1107 @lavalamp 

**Release note**:

```release-note
None
```
2018-01-02 13:15:42 -08:00
Lion-Wei e852ad38f3 add fake.DeleteRealServer UT 2017-12-29 14:30:23 +08:00
Lion-Wei b842f008fc Modify ipvs real server equal 2017-12-29 14:30:11 +08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
m1093782566 5052f3aed0 add error string reference 2017-12-22 13:49:47 +08:00
Kubernetes Submit Queue 070f946476
Merge pull request #57438 from m1093782566/ipset-util-test
Automatic merge from submit-queue (batch tested with PRs 57292, 56274, 57435, 57438, 57429). 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 FakeIPSet so that can add tests in IPVS proxier

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

Implement FakeIPSet so that can add tests in IPVS proxier - the tests can run everywhere(linux, mac, windows...).

**Which issue(s) this PR fixes**:
Fixes #57439

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @thockin @brendandburns
2017-12-20 22:16:49 -08:00
Kubernetes Submit Queue d3ea100ad9
Merge pull request #57292 from m1093782566/ipvs-ownerfile
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 pkg/util/ipvs OWNERS file

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

This PR adds `pkg/util/ipvs/OWNERS` file, including two people: @thockin, @m1093782566(me).

I created `pkg/util/ipvs` package for wrapping netlink IPVS call, which is used by IPVS proxier. Because reviewing this package needs some IPVS background knowledge, I create this OWNERS file for efficient code review. And, I am willing to share code review burden of this util package :)

**Which issue(s) this PR fixes**:
Fixes #57361

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
2017-12-20 21:58:58 -08:00
m1093782566 0f201037bd update bazel BUILD 2017-12-20 16:02:14 +08:00
m1093782566 b4a47bc228 implement fakeIPSet in ipset util 2017-12-20 09:49:14 +08:00
m1093782566 e6b9b5e0c3 add not found error for ipset set and entry delete 2017-12-18 18:36:32 +08:00
m1093782566 1793e6eb18 add pkg/util/ipvs OWNERS file 2017-12-18 09:25:28 +08:00
pospispa e1312f2c00 Addressing Comments from Code Review
Addressing comments from code review (https://github.com/kubernetes/kubernetes/pull/55824#pullrequestreview-78597250) in order to simplify the code.
2017-11-29 15:50:23 +01:00
Shyam Jeedigunta 19e56eb42d Use PATCHs instead of PUTs in CIDR allocator 2017-11-23 21:04:28 +01:00
Hemant Kumar 2f2a643684 Implement file system resizing support on kubelet start
Update bazel files
Fix operation executor tests
2017-11-22 16:06:10 -05:00
Kubernetes Submit Queue 3df3c580b7
Merge pull request #54219 from m1093782566/ipset
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>.

Using ipset doing SNAT and packet filter in IPVS kube-proxy

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

Try ipset in ipvs proxy mode.

**Which issue this PR fixes**: 

fixes #54203

xref: #53393, #53775

**Special notes for your reviewer**:

**Release note**:

```release-note
Using ipset doing SNAT and packet filtering in IPVS kube-proxy
```

/sig network

/area kube-proxy
2017-11-19 22:09:13 -08:00
Kubernetes Submit Queue 936bcd1361
Merge pull request #55858 from yanxuean/unit-slice
Automatic merge from submit-queue (batch tested with PRs 55988, 53555, 55858). 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 test for slice

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>

**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 #

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-11-18 20:31:26 -08:00
xiangpengzhao cafb2f731f Kubeadm supports for Kubelet Dynamic Configuration. 2017-11-17 11:19:12 +08:00
fabriziopandini 746e7f988e Clone documentation utility from //pkg/kubectl/cmd/templates 2017-11-16 10:18:00 +01:00
yanxuean 68df307378 add test for slice
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-11-16 16:37:29 +08:00
Chun Chen c6375c20b7 Add tests to test if legacy chains/rules can be cleaned up 2017-11-15 15:15:04 +08:00
Jan Safranek 790f513d23 Fix cross-compliation of mount_exec.go
Add dummy implementation for non-linux platforms
2017-11-14 16:30:00 +01:00
m1093782566 45ad69765e wrapper ipset util 2017-11-14 21:48:44 +08:00
Kubernetes Submit Queue 2f622b2a28
Merge pull request #52569 from tmjd/add-proxy-forward-rules
Automatic merge from submit-queue (batch tested with PRs 55009, 55532, 55601, 52569, 55533). 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>.

Kube-proxy adds forward rules to ensure NodePorts work

**What this PR does / why we need it**:
Updates kube-proxy to set up proper forwarding so that NodePorts work with docker 1.13 without depending on iptables FORWARD being changed manually/externally.

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

**Special notes for your reviewer**:
@thockin I used option number 2 that I mentioned in the #39823 issue, please let me know what you think about this change.  If you are happy with the change then I can try to add tests but may need a little direction about what and where to add them.

**Release note**:

```release-note
Add iptables rules to allow Pod traffic even when default iptables policy is to reject.
```
2017-11-14 00:09:57 -08:00
Kubernetes Submit Queue 2d64ce5e8e
Merge pull request #53440 from jsafrane/mount-container4-10-03
Automatic merge from submit-queue (batch tested with PRs 54005, 55127, 53850, 55486, 53440). 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>.

Containerized mount utilities

This is implementation of https://github.com/kubernetes/community/pull/589

@tallclair @vishh @dchen1107 PTAL
@kubernetes/sig-node-pr-reviews 

**Release note**:
```release-note
Kubelet supports running mount utilities and final mount in a container instead running them on the host.
```
2017-11-13 16:45:33 -08:00
Zihong Zheng f7ed9cf09a [kube-proxy] Fix session affinity with local endpoints traffic 2017-11-10 18:42:07 -08:00
Jan Safranek 1dd32ce7eb Add ExecMounter 2017-11-10 13:14:40 +01:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kubernetes Submit Queue a0898db683
Merge pull request #55147 from WanLinghao/keymutex_remove
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>.

remove unused function in keymutex_test.go file

**What this PR does / why we need it**:
remove unused function in keymutex_test.go file

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-09 00:59:27 -08:00
Kubernetes Submit Queue 73d53678c6
Merge pull request #55095 from smarterclayton/fix_mac
Automatic merge from submit-queue (batch tested with PRs 55092, 55348, 55095, 55277, 55352). 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 unit tests on darwin / non-linux platforms
2017-11-08 21:18:23 -08:00
Kubernetes Submit Queue 18402f6c51
Merge pull request #55248 from knobunc/fix/increase-iptables-wait
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 the iptables wait flag change to more places

There were a few places that the last PR (https://github.com/kubernetes/kubernetes/pull/54763) missed because the flags that PR covered were of the form `-w2`.  Some of the code had `--wait=2`.  This changes that code to use the same global variable for the wait setting so that everything is consistent.
2017-11-07 14:33:36 -08:00
Kubernetes Submit Queue 576c9118a6
Merge pull request #53592 from frodenas/bootstrap-controller
Automatic merge from submit-queue (batch tested with PRs 53592, 52562, 55175, 55213). 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>.

Check RegisterMetricAndTrackRateLimiterUsage error when starting BootstrapSigner & TokenCleaner controllers

**What this PR does / why we need it**:
Prevent `BootstrapSigner` and `TokenCleaner` controllers to start if `metrics.RegisterMetricAndTrackRateLimiterUsage` returns an error.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: complements #53571 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-07 11:21:15 -08:00
Benjamin Bennett a5c334046b Add the iptables wait flag change to more places
There were a few places that the last PR https://github.com/kubernetes/kubernetes/pull/54763 missed because the flags that PR covered were of the form -w2.  Some of the code had --wait=2.  This changes that code to use the same global variable for the wait setting so that everything is consistent.
2017-11-07 10:50:28 -05:00
Kubernetes Submit Queue b4b851cb0e
Merge pull request #52976 from sakeven/fix/netsh_checkIPExists
Automatic merge from submit-queue (batch tested with PRs 55114, 52976, 54871, 55122, 55140). 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 netsh checkIPExists in Chinese

Signed-off-by: sakeven <jc5930@sina.cn>



**What this PR does / why we need it**:
On Windows in Chinese language, kube-proxy ip dump outputs like this:

```
接口 "vEthernet (KubeProxySwitch)" 的配置
    DHCP 已启用:                          否
    IP 地址:                           10.96.0.2
    子网前缀:                        10.0.0.0/8 (掩码 255.0.0.0)
    IP 地址:                           10.99.233.195
    子网前缀:                        10.0.0.0/8 (掩码 255.0.0.0)
    IP 地址:                           10.109.68.207
    子网前缀:                        10.0.0.0/8 (掩码 255.0.0.0)
    IP 地址:                           10.110.60.68
    子网前缀:                        10.0.0.0/8 (掩码 255.0.0.0)
    IP 地址:                           10.110.252.225
    子网前缀:                        10.0.0.0/8 (掩码 255.0.0.0)
    InterfaceMetric:                      15
```

And here we used ''IP Address:" in English to search IP, so it would never succeed even if ip address was right here. ''IP Address:" in Chinese is "IP 地址: "。

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-11-06 23:19:15 -08:00
WanLinghao 7b7135ef79 remove unused function in keymutex_test.go file
modified:   pkg/util/keymutex/keymutex_test.go
2017-11-06 17:05:23 +08:00
Di Xu 13a355c837 refactor method to pkg/util/node 2017-11-06 09:51:09 +08:00
Clayton Coleman b844ac44f5
Tmpdir can be a symlink, also fake mount needs to call nested mounter 2017-11-03 22:21:29 -04:00
Kubernetes Submit Queue b7968e0907
Merge pull request #54921 from weiwei04/fix_reflector_last_resource_version
Automatic merge from submit-queue (batch tested with PRs 54800, 53898, 54812, 54921, 53558). 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>.

rename metric reflector_xx_last_resource_version

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

mv reflector name from metric name to metric label

before:

```
reflector_k8s_io_kubernetes_pkg_client_informers_informers_generated_internalversion_factory_go:73_8664_last_resource_version{instance="104.154.20.21:443",job="kubernetes-apiservers"}
```

after

```
reflector_last_resource_version{instance="10.0.2.15:6443",job="kubernetes-apiservers",name="k8s_io_kubernetes_pkg_client_informers_informers_generated_internalversion_factory_go_73_8664"}
```

**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 #52121 

**Special notes for your reviewer**:

None

**Release note**:

```release-note
NONE
```
2017-11-02 03:14:24 -07:00
Kubernetes Submit Queue 574492aed6
Merge pull request #53553 from bsteciuk/kubeadm-windows
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>.

Kubeadm - Added initial support for Windows worker nodes to join cluster using kubeadm

**What this PR does / why we need it**:
This PR adds initial support for adding a Windows worker node to a Kubernetes cluster with kubeadm.  Also adds Windows build of kubeadm to node build targets. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubeadm/issues/364 

**Special notes for your reviewer**:

Depends on #53730 

**Release note**:

```release-note
kubeadm: Add support for adding a Windows node
```
2017-11-01 14:58:58 -07:00
Bob Steciuk 44fbec29c4 Kubeadm - Added initial support for Windows worker nodes to join cluster using kubeadm
Added kubeadm to node build targets

Created unix/windows specific conditionally compiled for checks.go and defaults.go
2017-11-01 10:36:37 -04:00
Kubernetes Submit Queue 618b705a4b
Merge pull request #53629 from andyzhangx/azurefile-improve
Automatic merge from submit-queue (batch tested with PRs 46341, 53629). 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 azure file mount limit issue on windows due to using drive letter

**What this PR does / why we need it**:
It's not necessary to use drive letter in azure file mount, correct usage for New-SmbGlobalMapping is like following:
```
New-SmbGlobalMapping -RemotePath $AzureFilePath -Credential $Credential
mklink /D $mountPath $AzureFilePath 
```
I removed the `LocalPath` parameter in New-SmbGlobalMapping

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54668
Without this PR, there is a limit(25) for azure file mount number on each node because only 25 drive letters could be used on each windows node, With this PR, there would be no such limit.

**Special notes for your reviewer**:
@PatrickLang 

**Release note**:

```
fix azure file mount limit issue on windows due to using drive letter
```
/sig azure
/sig windows
2017-11-01 04:38:12 -07:00