https://bugzilla.redhat.com/show_bug.cgi?id=1140405
Bug ID: 1140405 Summary: systemctl start docker fails because systemd continuously restarts the daemon Product: Fedora Version: 20 Component: docker-io Assignee: lsm5@fedoraproject.org Reporter: a.badger@gmail.com QA Contact: extras-qa@fedoraproject.org CC: admiller@redhat.com, golang@lists.fedoraproject.org, hushan.jia@gmail.com, jperrin@centos.org, lsm5@fedoraproject.org, mattdm@redhat.com, mgoldman@redhat.com, s@shk.io, vbatts@redhat.com
Description of problem:
I've installed docker for the first time and tried to start it with "systemctl start docker". The systemctl command returns successfully but then trying to run docker client commands against the daemon timed out. After some poking around I discovered that systemd was starting docker. Docker was taking quite a while to do various initialization tasks including invoking mkfs. systemd decided that docker was unresponsive and terminated it and then restarted it. Because mkfs hadn't finished, docker had to try running mkfs again. This cycle kept continuing and would probably have prevented docker from fully starting up forever.
I worked around the problem by telling systemd not to start docker, running the docker daemon manually from a shell, waiting until the mkfs had completed, then shutting down my daemon and rerunning systemctl start docker. After that, the docker service runs fine.
Version-Release number of selected component (if applicable):
docker-io-1.2.0-2.fc20.x86_64
How reproducible: Everytime for me until after I ran docker as a daemon manually. I don't know how to reproduce once docker has initialized (Probably removing some file or volume but I don't know what it would be).
Steps to Reproduce: 1. On a system that hasn't had docker running before 2. yum install docker-io 3. systemctl start docker 4. watch the output of systemctl status docker -l
Actual results:
systemctl status docker -l will report that docker is in state Activating for several minutes, then show that systemd decided docker wasn't responding, terminate it, and restart. The -l output will also show that docker is running mkfs for most of that time and is still running it when docker is terminated.
Expected results:
systemctl status docker -l will show that the state has gone to active (running)
Additional info:
* My filesystem is ext4. The docker initialization is running mkfs.ext4 * I'm using a 4-5 year old laptop with platter HDs. A faster machine or SSD drives might run mkfs quickly enough to not see this issue. * This might be "fixed" by adding some documentation that says to perform certain steps to initialize docker before running systemctl start docker rather than changing docker code to finish initialization sooner.