Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create source directory while the daemon is being shutdown #328

Conversation

TomSweeneyRedHat
Copy link
Member

Signed-off-by: TomSweeneyRedHat tsweeney@redhat.com

  • What I did

Ported the patch from moby#33330 into this branch. The problem is the /var/run/docker.sock file can with the right conditions and bad timing be created as a directory rather than a link when the daemon is shutting down. Without this change docker would not restart after this timing issue hit until the /var/run/docker.sock directory was removed.

This is the second part, #327 addressed Docker-1.13.1

  • How I did it

vi is my friend.

** - Testing:

[root@localhost run]# systemctl start docker
[root@localhost run]# docker run -ti --restart always -v /var/run/docker.sock:/sock alpine
/ # exit
[root@localhost run]# systemctl stop docker
[root@localhost run]# systemctl start docker
[root@localhost run]# docker run -ti --restart always -v /var/run/docker.sock:/sock alpine
/ # exit
[root@localhost run]# systemctl stop docker
[root@localhost run]# systemctl start docker
[root@localhost run]# ls -alF docker.sock
srw-rw----. 1 root root 0 Oct 10 19:47 docker.sock=

From journalctl with the new log entry showing that the error condition is being handled correctly:

Oct 10 19:46:46 localhost.localdomain dockerd-current[4884]: time="2018-10-10T19:46:46.51

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
@TomSweeneyRedHat TomSweeneyRedHat changed the title WIP - Don't create source directory while the daemon is being shutdown Don't create source directory while the daemon is being shutdown Oct 12, 2018
@TomSweeneyRedHat
Copy link
Member Author

@runcom tested again, reviewed again, gtg. Thanks again for the cherry-pick thought.

@runcom runcom merged commit 43aa61e into projectatomic:docker-1.13.1-rhel Oct 13, 2018
@TomSweeneyRedHat
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants