Bug 1413954 - Restart policy on-failure does not start container after boot
Summary: Restart policy on-failure does not start container after boot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Antonio Murdaca
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1414436
TreeView+ depends on / blocked
 
Reported: 2017-01-17 12:31 UTC by Lukas Slebodnik
Modified: 2017-01-20 18:06 UTC (History)
14 users (show)

Fixed In Version: docker-1.12.6-5.git037a2f5.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1414436 (view as bug list)
Environment:
Last Closed: 2017-01-20 18:06:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukas Slebodnik 2017-01-17 12:31:13 UTC
Description of problem:
It is a slightly related to BZ1387831#15. I hoped that all my problem would be solved by the latest update of docker 1.12.6-4.gitf499e8b.fc25. I tested the update and it works well with restart policy always. However, it did not work in my case with different policy "--restart=on-failure:3" which works well with the latest update in f24 (docker-1.10.3-55.gite03ddb8.fc24)

Version-Release number of selected component (if applicable):
sh$ rpm -qa "docker*" "container*"
docker-common-1.12.6-4.gitf499e8b.fc25.x86_64
container-selinux-2.2-2.fc25.noarch
docker-1.12.6-4.gitf499e8b.fc25.x86_64

How reproducible:
Deterministic

Steps to Reproduce:
1. docker pull docker.io/registry
2. docker run -d -p 5000:5000 --restart=always --name registry_always docker.io/registry
3. docker run -d -p 5555:5000 --restart=on-failure:3 --name registry_on_failure docker.io/registry
4.docker ps
5. //restart docker
   systemctl restart docker.service
6. docker ps

Actual results:
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                    NAMES
b4be793cb320        docker.io/registry   "/entrypoint.sh /etc/"   43 seconds ago      Up 40 seconds       0.0.0.0:5555->5000/tcp   registry_on_failure
4ab53576fa0b        docker.io/registry   "/entrypoint.sh /etc/"   59 seconds ago      Up 57 seconds       0.0.0.0:5000->5000/tcp   registry_always

// after restart
CONTAINER ID        IMAGE                COMMAND                  CREATED              STATUS              PORTS                    NAMES
4ab53576fa0b        docker.io/registry   "/entrypoint.sh /etc/"   About a minute ago   Up 2 seconds        0.0.0.0:5000->5000/tcp   registry_always


Expected results:
//Both containers should run after restart.
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                    NAMES
b4be793cb320        docker.io/registry   "/entrypoint.sh /etc/"   43 seconds ago      Up 40 seconds       0.0.0.0:5555->5000/tcp   registry_on_failure
4ab53576fa0b        docker.io/registry   "/entrypoint.sh /etc/"   59 seconds ago      Up 57 seconds       0.0.0.0:5000->5000/tcp   registry_always

Additional info:
As I mentioned works like a charm with 
docker-1.10.3-55.gite03ddb8.fc24.x86_64.

The same issue is with containers created on 1.10(fedora 24) and then upgraded to docker 1.12.

Comment 1 Antonio Murdaca 2017-01-17 14:58:01 UTC
could you provide journal logs?

Comment 2 Antonio Murdaca 2017-01-18 11:54:38 UTC
Fixed by https://github.com/projectatomic/docker/commit/037a2f5e5b7cf1f7663f1840f7e84328806c08ef

I'll release an update with that commit for you to test.

Comment 3 Lukas Slebodnik 2017-01-18 12:41:01 UTC
I am sorry that I haven't provided requested data yet. I was busy with other tasks.

Do you still need them? Or you are sure that the commit fixed the bug.

Comment 4 Antonio Murdaca 2017-01-18 12:51:02 UTC
I'm not able to reproduce your issue anymore so I would say that commit fixed the bug :) (I spent the whole morning researching that commit also since this bug is fixed in docker-1.13 and master).

Comment 5 Fedora Update System 2017-01-18 13:16:08 UTC
docker-1.12.6-5.git037a2f5.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b7af66c72a

Comment 6 Antonio Murdaca 2017-01-18 13:16:56 UTC
Lukas, any chance you can test the update? I've been testing it on my laptop and stuff seems to work now.

Comment 7 Lukas Slebodnik 2017-01-18 13:47:34 UTC
I've just given karma(+1) in bodhi.
Thank you very much.

Comment 9 Fedora Update System 2017-01-19 09:11:31 UTC
docker-1.12.6-5.git037a2f5.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b7af66c72a

Comment 10 Fedora Update System 2017-01-20 18:06:51 UTC
docker-1.12.6-5.git037a2f5.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.