Skip to content

Conversation

@caervs
Copy link
Contributor

@caervs caervs commented Jan 4, 2017

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.

- What I did

Set default docker service behavior to restart on failure

- How I did it

Added Restart parameter to default docker service configs

- How to verify it

Install Docker on a machine with systemd, kill dockerd process and see if it
restarts

- Description for the changelog

Set default docker service behavior to restart on failure

- A picture of a cute animal (not mandatory but encouraged)

alt text

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐸

@tonistiigi
Copy link
Member

LGTM
cc @justincormack

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@justincormack
Copy link
Contributor

I think we should consider adding StartLimitBurst=3 or similar, as if you have eg an invalid config or something else unrecoverable it will just try restarting forever, spamming your logs. Probably also set StartLimitInterval=60s or so, which makes it easier to see what is up. I am fairly sure the defaults are unlimited burst and 100ms interval, which is pretty aggressive, but I might be wrong. Otherwise seems reasonable.

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 <[email protected]>
@caervs
Copy link
Contributor Author

caervs commented Jan 6, 2017

@justincormack good thinking. Consider it done.

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants