1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

21 commits

Author SHA1 Message Date
Sebastiaan van Stijn
e7ad8e2b28 systemd: add support for reloading daemon configuration through systemd
This adds support for reloading the docker daemon
(SIGHIUP) so that changes in '/etc/docker/daemon.json'
can be loaded at runtime by reloading the service
through systemd ('systemctl reload docker')

Before this change, systemd would output an error
that "reloading" is not supported for the docker
service;

  systemctl reload docker
  Failed to reload docker.service: Job type reload is not applicable for unit docker.service.

After this change, the docker daemon can be reloaded
through 'systemctl reload docker', which reloads
the configuration;

  journalctl -f -u docker.service

  May 02 03:49:20 testing systemd[1]: Reloading Docker Application Container Engine.
  May 02 03:49:20 testing docker[28496]: time="2016-05-02T03:49:20.143964103-04:00" level=info msg="Got signal to reload configuration, reloading from: /etc/docker/daemon.json"
  May 02 03:49:20 testing systemd[1]: Reloaded Docker Application Container Engine.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-31 15:11:28 +02:00
Sebastiaan van Stijn
f30757f439 systemd: set systemd KillMode
Change the kill mode to process so that systemd does not kill container
processes when the daemon is shutdown but only the docker daemon

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-31 15:11:21 +02:00
Sebastiaan van Stijn
26eddc16a8 systemd: add "Delegate=yes" to docker's service file
We need to add delegate yes to docker's service file so that it can
manage the cgroups of the processes that it launches without systemd
interfering with them and moving the processes after it is reloaded.

       Delegate=
           Turns on delegation of further resource control partitioning to
           processes of the unit. For unprivileged services (i.e. those
           using the User= setting), this allows processes to create a
           subhierarchy beneath its control group path. For privileged
           services and scopes, this ensures the processes will have all
           control group controllers enabled.

This is the proper fix for issue moby/moby#20152

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-31 15:11:16 +02:00
Sebastiaan van Stijn
7daf2db62a systemd: don't limit tasks
Systemd sets a default of 512 tasks, which is far
too low to run many containers.

Note that TasksMax is only supported on systemd 226
and above.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-31 15:11:11 +02:00
Sebastiaan van Stijn
80039b4699 systemd: set Limit* to infinity
There is a not-insignificant performance overhead for all containers (if
containerd is a child of Docker, which is the current setup) if systemd
sets rlimits on the main Docker daemon process (because the limits
propogate to all children).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-31 15:11:05 +02:00
Sebastiaan van Stijn
ef9ee10914 systemd: no limit on core size
set LimitCORE=infinity to ensure complete core creation,
allows extraction of as much information as possible.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-31 15:10:57 +02:00
docker-unir[bot]
ffc5810932 Merge pull request #168 from crosbymichael/prestart
Merged with https://github.com/seemethere/unir
2018-08-28 23:20:49 +00:00
Andrew Hsu
21458dd413 Merge pull request #169 from andrewhsu/sync
[master] bring in changes that went first to 18.09 branch
2018-08-28 13:21:06 -07:00
Andrew Hsu
53343f1bf3 added RestartSec
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 51879873897afe298cbb736acef34b5a0b500424)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-08-28 19:56:36 +00:00
Michael Crosby
0c8e758012 Add post-stop
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-08-28 13:51:21 -04:00
Eli Uriegas
d5abba2e2c Merge pull request #151 from docker/develop
Merging the develop changes into master
2018-08-21 11:15:07 -07:00
Eli Uriegas
7126d94c25 Merge pull request #150 from seemethere/require
Set containerd to be a systemd bind for docker
2018-08-20 14:31:22 -07:00
Eli Uriegas
e56475aa14 Set containerd to be a systemd bind for docker
The daemon won't actually start without containerd

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-20 21:17:32 +00:00
docker-unir[bot]
55e6314296 Merge pull request #131 from seemethere/rpm_new
Merged with https://github.com/seemethere/unir
2018-08-16 18:37:48 +00:00
Eli Uriegas
cdb1e7033d Some changes to get this working on CentOS 7
Old versions of things on CentOS 7 strike again!

infinity is not a thing for TimeoutSec on systemd < 229

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-16 04:03:40 +00:00
Eli Uriegas
e086064b2c Revive pre / post steps, update offline location
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-15 23:17:54 +00:00
Eli Uriegas
a5c809e809 Round out systemd for RPM packaging
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-15 23:01:10 +00:00
Eli Uriegas
6cd66eaa2d Add systemd files, add containerd-proxy config
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-08-14 20:30:22 +00:00
Eli Uriegas
b8bcf7005c Use internal systemd scripts for DEB packaging
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-06 14:56:39 -07:00
Eli Uriegas
509b86caa2 Use internal systemd scripts for RPM packaging
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-06 14:27:41 -07:00
Eli Uriegas
bb68bc5ae2 Add initial systemd scripts
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-06 11:32:27 -07:00