kubernetes/pkg/util
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
..
async Make BoundedFrequencyRunner Run() really non-blocking 2017-05-25 16:12:16 +02:00
bandwidth update godep 2017-07-20 11:03:49 -07:00
config autogenerated 2017-04-14 10:40:57 -07:00
configz Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
dbus autogenerated 2017-04-14 10:40:57 -07:00
ebtables update godep 2017-07-20 11:03:49 -07:00
env fix various bad tests 2017-04-25 11:23:33 -07:00
file Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
flock switch from package syscall to x/sys/unix 2017-07-21 12:14:42 +02:00
goroutinemap Make timeouts in the Kubelet slightly offset to aid debugging 2017-04-28 12:00:28 -04:00
hash Merge pull request #42085 from cblecker/gofmt-fix 2017-04-17 15:39:07 -07:00
i18n remove unused codes in loadSystemLanguage 2017-06-29 12:18:11 +08:00
initsystem Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
interrupt Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
io Fix lint errors 2017-06-26 16:05:35 +02:00
ipconfig update godep 2017-07-20 11:03:49 -07:00
iptables Merge pull request #48517 from dims/fix-tests-on-osx 2017-08-02 12:46:50 -07:00
keymutex autogenerated 2017-04-14 10:40:57 -07:00
labels autogenerated 2017-04-14 10:40:57 -07:00
limitwriter Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
logs autogenerated 2017-04-14 10:40:57 -07:00
maps Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
metrics autogenerated 2017-04-14 10:40:57 -07:00
mount Merge pull request #49640 from jsafrane/systemd-mount-service 2017-08-09 12:05:01 -07:00
net Fix lint errors of pkg/util/net/sets/ipnet.go 2017-07-04 12:04:24 +08:00
netsh update godep 2017-07-20 11:03:49 -07:00
node Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
oom autogenerated 2017-04-14 10:40:57 -07:00
parsers autogenerated 2017-04-14 10:40:57 -07:00
pointer Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
procfs Merge pull request #44024 from zhangxiaoyu-zidif/egnew 2017-05-05 23:41:33 -07:00
reflector/prometheus add reflector metrics 2017-07-25 09:01:37 -04:00
removeall Fixes bind-mount teardown failure with non-mount point Local volumes 2017-07-11 17:19:58 -04:00
resourcecontainer autogenerated 2017-04-14 10:40:57 -07:00
rlimit switch from package syscall to x/sys/unix 2017-07-21 12:14:42 +02:00
selinux autogenerated 2017-04-14 10:40:57 -07:00
slice split util/slice 2017-06-30 23:04:18 -07:00
strings Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
sysctl Consolidate sysctl commands for kubelet 2017-05-02 12:15:01 -07:00
system run hack/update-all 2017-06-22 11:31:03 -07:00
tail Limit the size of the termination log and allow log input 2017-01-23 12:26:38 -05:00
taints Build files generated 2017-07-19 18:36:12 -04:00
template Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
term fix cross build for windows 2017-07-05 12:42:41 -07:00
threading autogenerated 2017-04-14 10:40:57 -07:00
tolerations Auto-generated stuff. 2017-04-06 16:15:34 -04:00
version Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
workqueue/prometheus autogenerated 2017-04-14 10:40:57 -07:00
BUILD add reflector metrics 2017-07-25 09:01:37 -04:00