Browse code

Use fs cgroups by default

Our implementation of systemd cgroups is mixture of systemd api and
plain filesystem api. It's hard to keep it up to date with systemd and
it already contains some nasty bugs with new versions. Ideally it should
be replaced with some daemon flag which will allow to set parent systemd
slice.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2015/11/05 06:51:46
Showing 2 changed files
... ...
@@ -74,9 +74,6 @@ func NewDriver(root, initPath string, options []string) (*Driver, error) {
74 74
 	// this makes sure there are no breaking changes to people
75 75
 	// who upgrade from versions without native.cgroupdriver opt
76 76
 	cgm := libcontainer.Cgroupfs
77
-	if systemd.UseSystemd() {
78
-		cgm = libcontainer.SystemdCgroups
79
-	}
80 77
 
81 78
 	// parse the options
82 79
 	for _, option := range options {
... ...
@@ -452,11 +452,11 @@ single `native.cgroupdriver` option is available.
452 452
 
453 453
 The `native.cgroupdriver` option specifies the management of the container's
454 454
 cgroups. You can specify `cgroupfs` or `systemd`. If you specify `systemd` and
455
-it is not available, the system uses `cgroupfs`. By default, if no option is
456
-specified, the execdriver first tries `systemd` and falls back to `cgroupfs`.
457
-This example sets the execdriver to `cgroupfs`:
455
+it is not available, the system uses `cgroupfs`. If you omit the
456
+`native.cgroupdriver` option,` cgroupfs` is used.
457
+This example sets the `cgroupdriver` to `systemd`:
458 458
 
459
-    $ sudo docker daemon --exec-opt native.cgroupdriver=cgroupfs
459
+    $ sudo docker daemon --exec-opt native.cgroupdriver=systemd
460 460
 
461 461
 Setting this option applies to all containers the daemon launches.
462 462