k3s/test
Kubernetes Submit Queue 481b2dc7cf
Merge pull request #62102 from cofyc/fixlocalvolumefsgroup
Automatic merge from submit-queue (batch tested with PRs 64013, 63896, 64139, 57527, 62102). 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>.

Setup fsGroup for local volumes correctly

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

This pr fixes fsGroup check in local volume in containerized kubelet. Except this, it also fixes fsGroup check when volume source is a normal directory whether kubelet is running on the host or in a container.

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

**Special notes for your reviewer**:

Bind mounts are detected in `/proc/mounts`, but it does not contain root of mount for bind mounts. So `mount.GetMountRefsByDev()` cannot get all references if source is a normal directory. e.g.

```
# mkdir /tmp/src /mnt/dst
# mount --bind /tmp/src /tmp/src # required by local-volume-provisioner, see https://github.com/kubernetes-incubator/external-storage/pull/499
# mount --bind /tmp/src /mnt/dst
# grep -P 'src|dst' /proc/mounts 
tmpfs /tmp/src tmpfs rw,nosuid,nodev,noatime,size=4194304k 0 0
tmpfs /mnt/dst tmpfs rw,nosuid,nodev,noatime,size=4194304k 0 0
# grep -P 'src|dst' /proc/self/mountinfo 
234 409 0:42 /src /tmp/src rw,nosuid,nodev,noatime shared:30 - tmpfs tmpfs rw,size=4194304k
235 24 0:42 /src /mnt/dst rw,nosuid,nodev,noatime shared:30 - tmpfs tmpfs rw,size=4194304k
```

We need to compare root of mount and device in this case.

**Release note**:

```release-note
NONE
```
2018-05-23 19:44:24 -07:00
..
conformance Merge pull request #62657 from matthyx/master 2018-05-02 19:44:32 -07:00
e2e Merge pull request #62102 from cofyc/fixlocalvolumefsgroup 2018-05-23 19:44:24 -07:00
e2e_kubeadm Basic E2E tests for kubeadm 2018-05-10 12:54:25 -04:00
e2e_node Merge pull request #57527 from mtaufen/kc-metric 2018-05-23 19:44:21 -07:00
fixtures Merge pull request #62657 from matthyx/master 2018-05-02 19:44:32 -07:00
images Actually support service `publishNotReadyAddresses` 2018-05-14 14:19:54 -07:00
integration Merge pull request #61419 from enisoc/apps-v1-deploy 2018-05-23 18:14:13 -07:00
kubemark Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
list Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
soak Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
typecheck Deduplicate identical typecheck errors between platforms. 2018-03-28 19:42:48 -07:00
utils test/integration: Use apps/v1 Deployment/ReplicaSet. 2018-05-22 13:43:07 -07:00
BUILD Generated artefacts 2018-04-30 10:00:13 -04:00
OWNERS Adding rramkumar1 and MrHohn as reviewer & approver to pkg/test 2018-03-21 11:53:18 -07:00
test_owners.csv Merge pull request #62662 from wangzhen127/runtime-default 2018-04-26 14:33:53 -07:00
test_owners.json