Преглед на файлове

systemd: set service type to notify.

Currently the service type is 'simple', the default, meaning that
docker.service is considered to be started straight after
spawning. This is incorrect as there is significant amount of time
between spawning and docker ready to accept connections on the passed
sockets. Docker does implement systemd socket activate and
notification protocol, and send the ready signal to systemd, once it
is ready. However for systemd to take those notifications into
account, the service file type should be set to notify.

Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
(cherry picked from commit d3e5179c291a7646c71f1ca608d6700026756f7c)
Dimitri John Ledkov преди 10 години
родител
ревизия
2c875215b1
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      contrib/init/systemd/docker.service

+ 1 - 0
contrib/init/systemd/docker.service

@@ -5,6 +5,7 @@ After=network.target docker.socket
 Requires=docker.socket
 Requires=docker.socket
 
 
 [Service]
 [Service]
+Type=notify
 ExecStart=/usr/bin/docker daemon -H fd://
 ExecStart=/usr/bin/docker daemon -H fd://
 MountFlags=slave
 MountFlags=slave
 LimitNOFILE=1048576
 LimitNOFILE=1048576