Right now it redirects, so change it to the correct one.
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 7c763b360a08f9a079fd041cbe38ab71efc3cd11
Component: engine
In the event that the docker daemon is managed by systemd and spontaneously
dies the default service configuration does not have docker restart. For people
who just want to install and start docker then never worry about whether docker
is running a better default may be to restart the service on a failure.
Signed-off-by: Ryan Abrams <rdabrams@gmail.com>
Upstream-commit: 7b9ecb9700ebd90c7f5854028f0f981f0fe5d03a
Component: engine
In case when docker was not running init script stop was returning value <> 0.
Due to this fact it was impossible to uninstall the docker-engine if the docker service was stopped.
Signed-off-by: Cyprian Gracz <cyprian.gracz@micro-jumbo.eu>
Fixed message logging
Signed-off-by: Cyprian Gracz <cyprian.gracz@micro-jumbo.eu>
Upstream-commit: 74cf6157ef0d8788a56aed65a85b722ccb50e398
Component: engine
TMPDIR was changed to DOCKER_TMPDIR in pull request 7113 but the file still asks user to set TMPDIR.
I am new to docker and wasted sometime this morning because of this.
I am using docker version 1.12.1 on ubuntu server 14.04
Signed-off-by: Neyazul Haque <nuhaque@gmail.com>
Upstream-commit: 10cebd4c741cd9e0762227148795c4ce02317579
Component: engine
added the firewalld.service symbol in the After line docker
will always start after firewalld, thus eliminating the issue
of firewall blocking all mapped traffic.
Signed-off-by: Ramon Brooker <Ramon.Brooker@imaginecommunications.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 73e08286f920881a431fa7befd3909e72303680b
Component: engine
Otherwise the while loop waits forever, checking for
a filename made up of all the names.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Upstream-commit: 68dab9bd0910e22c96d5dfcbd4e972f8ce770a88
Component: engine
Fixes#23981
The selinux issue we are seeing in the report is related to the socket
file for docker and nothing else. By removing the socket docker starts
up correctly.
However, there is another motivation for removing socket activation from
docker's systemd files and that is because when you have daemons running
with --restart always whenever you have a host reboot those daemons
will not be started again because the docker daemon is not started by
systemd until a request comes into the docker API.
Leave it for deb based systems because everything is working correctly
for both socket activation and starting normally at boot.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 04104c3a1e6cad30cb41b762e8832215466c0e95
Component: engine
(and set $exec to dockerd instead)
This ensures end users do not need to make any configuration changes
due to the rename from docker to dockerd in version 1.12.
Signed-off-by: Paul Furtado <pfurtado@hubspot.com>
Upstream-commit: acb41ddc9df80894d2ff84c34a98cc904b9241fa
Component: engine
There is a not-insignificant performance overhead for all containers (if
containerd is a child of Docker, which is the current setup) if rlimits are
set on the main Docker daemon process (because the limits
propogate to all children).
We recommend using cgroups to do container-local accounting.
This applies the change added in 8db61095a3d0bcb0733580734ba5d54bc27a614d
to other init scripts.
Note that nfile cannot be set to unlimited, and the limit
is hardcoded to 1048576 (2^20) , see:
http://stackoverflow.com/a/1213069/1811501
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 428d7337e808ec5f4dba1b0aceda002f295cc320
Component: engine
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: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 8db61095a3d0bcb0733580734ba5d54bc27a614d
Component: engine
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: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: db435f526ac5703276ad1add28188c0c8c6e4c2a
Component: engine
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>
Upstream-commit: f74b856e1ac2805fe48ceb52bc83cd7a3cec870c
Component: engine
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 #20152
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d16737f971092767c1b9d28302a3f5aedbe2f576
Component: engine
Previously, this check only worked if no host was specified and was
hard coded to check for "/var/run/docker.sock"
This change generalizes that check and captures any specified socket
and waits for it to be created.
Caveat: This will only check the first socket specified, but it is an
improvement over none at all.
Fixes#185160
Signed-off-by: Andrew Guenther <guenther.andrew.j@gmail.com>
Upstream-commit: 9f401254bd8e097ef30a3bc5de5576de08bc979a
Component: engine
systemd sets an additional limit on processes and threads that defaults to 512 when run under Linux >= 4.3.
See more information here: http://unix.stackexchange.com/a/255603/59955
Signed-off-by: Candid Dauth <cdauth@cdauth.eu>
Upstream-commit: 105778343a2e5d510fae1cbdb1b7ab6879e5a028
Component: engine
With content addressability update starting upgraded
daemon for the first time can take a long time if
graph dir was not prepared with a migration tool before.
This avoids systemd timeouts while the migration is
taking place.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: eff5e6498fa424587c339b5ae54e28f003775e4b
Component: engine
Add 10 seconds timeout when running `sudo service docker stop`. This is
especially needed when running `sudo service docker restart`. Otherwise,
`restart` results in exitstatus 1, because `start` has nothing to do.
Signed-off-by: Ewa Czechowska <ewa@ai-traders.com>
Upstream-commit: 5c94a9e800ed4f2e43f472b214f699c22fd7e2fe
Component: engine
On boot, the init script is invoked from `/etc/rcN.d/S20docker` (where N
is the runlevel). Consequently, the init script tried to find the
defaults at `/etc/defaults/S20docker` and the binary at
`/usr/bin/S20docker`. This causes the docker daemon to fail at boot with
the error
/usr/bin/S20docker not present or not executable
Starting it manually works because it invokes `/etc/init.d/docker` which
has the correct basename.
Fix this by hardcoding "docker" as the base name.
Signed-off-by: Matthias Rampke <mr@soundcloud.com>
Upstream-commit: 01c5cfcc5629e1d90a50a8447f9712fa6ff49f48
Component: engine
The shebang for OpenRC init scripts is now #!/sbin/openrc-run, and we
can also use the default start and stop functions built into OpenRC.
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Upstream-commit: e3772538c0eb5c1478075979d222485cb3bd8c91
Component: engine
The docker script in contrib/init/sysvinit-redhat will fail silently on
a start if Docker is not installed in the default /usr/bin/ location.
While a non-zero exit code is returned the user will receive no visible
indication (i.e. error message) as to why Docker was not started.
This commit changes the logic so that in the case that the docker
executable is not found in the expected location or the user does not
have execute permissions on the executable appropriate error messages
are now shown to the user as well as exiting with a non-zero exit code
Signed-off-by: Rob Vesse <rvesse@dotnetrdf.org>
Upstream-commit: f8387f69042b222e5b0a5d91cf49a840e345f88d
Component: engine
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>
Upstream-commit: d3e5179c291a7646c71f1ca608d6700026756f7c
Component: engine
If you have some kind of bogus `other_args` in `/etc/sysconfig/docker` the start script will report "started" but it's full of lies. This enhances the flow so that if the pidfile never shows up (failure to start) you get a proper failure message.
I also added dots for fun.
Signed-off-by: Jeff Minard <jeff.minard@creditkarma.com>
Upstream-commit: 6f8fdb8aa893b2d5f319d342614dd159e0c8bb83
Component: engine
This will now properly check whether /etc/init.d/docker or service docker is
invoking the script and respond to the user accordingly.
Signed-off-by: Steven Richards <steven@axiomzen.co>
Upstream-commit: e5ff643aed78fb5dfb5e3fef518dfe56b82b3023
Component: engine
Give Docker more time to kill containers before upstart kills Docker.
The default kill timeout is 5 seconds.
This will help decrease the chance of but not eliminate the chance of
orphaned container processes.
Signed-off-by: David Xia <dxia@spotify.com>
Upstream-commit: 2f9e7a067a7273a0f344c1c9a6397e4bb61d7554
Component: engine
Once the job has failed and is respawned, the status becomes `docker
respawn/post-start` after subsequent failures (as opposed to `docker
stop/post-start`), so the post-start script needs to take this into
account.
I could not find specific documentation on the job transitioning to the
`respawn/post-start` state, but this was observed on Ubuntu 14.04.2.
Signed-off-by: Lewis Marshall <lewis@lmars.net>
Upstream-commit: 302e3834a0bfa860f9d06b42a2955b0cbd135c38
Component: engine
The validation script from #10681 is too pedantic, and does not handle
well situations like:
```
cat <<EOF # or <<-EOF
Whether the leading whitespace is stripped out or not by bash
it should still be considered as valid.
EOF
```
This reverts commit 4e65c1c319afffc325853b88c9aef0c42ec83482.
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 0252ad0adc37a34b88fa908ae74a13b940febdcb
Component: engine