kubernetes/pkg/util/mount
Kubernetes Submit Queue 68ac78ae45 Merge pull request #49640 from jsafrane/systemd-mount-service
Automatic merge from submit-queue

Run mount in its own systemd scope.

Kubelet needs to run /bin/mount in its own cgroup.

- When kubelet runs as a systemd service, "systemctl restart kubelet" may kill all processes in the same cgroup and thus terminate fuse daemons that are needed for gluster and cephfs mounts.

- When kubelet runs in a docker container, restart of the container kills all fuse daemons started in the container.

Killing fuse daemons is bad, it basically unmounts volumes from running pods.

This patch runs mount via "systemd-run --scope /bin/mount ...", which makes sure that any fuse daemons are forked in its own systemd scope (= cgroup) and they will survive restart of kubelet's systemd service or docker container.

This helps with #34965

As a downside, each new fuse daemon will run in its own transient systemd service and systemctl output may be cluttered.

@kubernetes/sig-storage-pr-reviews 
@kubernetes/sig-node-pr-reviews 

```release-note
fuse daemons for GlusterFS and CephFS are now run in their own systemd scope when Kubernetes runs on a system with systemd.
```
2017-08-09 12:05:01 -07:00
..
BUILD Merge pull request #49300 from tklauser/syscall-to-x-sys-unix 2017-08-03 04:02:12 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
fake.go Fixes bind-mount teardown failure with non-mount point Local volumes 2017-07-11 17:19:58 -04:00
mount_linux_test.go Use fnv.New32a() in hash instead adler32 2017-02-15 14:03:54 +08:00
mount_linux.go Merge pull request #49640 from jsafrane/systemd-mount-service 2017-08-09 12:05:01 -07:00
mount_unsupported.go Merge pull request #49640 from jsafrane/systemd-mount-service 2017-08-09 12:05:01 -07:00
mount.go Merge pull request #49640 from jsafrane/systemd-mount-service 2017-08-09 12:05:01 -07:00
nsenter_mount_test.go Fix findmnt parsing in containerized kubelet 2017-07-18 13:35:44 +02:00
nsenter_mount_unsupported.go Fixes bind-mount teardown failure with non-mount point Local volumes 2017-07-11 17:19:58 -04:00
nsenter_mount.go Merge pull request #49640 from jsafrane/systemd-mount-service 2017-08-09 12:05:01 -07:00
OWNERS Add owner file in /pkg/util/mount package 2017-02-06 10:51:26 -08:00
safe_format_and_mount_test.go update import 2017-07-20 11:03:49 -07:00