traefik: Docker provider stops working when dockerd is restarted, requires traefik restart to fix
What did you do?
Updated Docker OS package, which caused Docker daemon (dockerd) to be restarted. Simply restarting dockerd service has the same effect.
What did you expect to see?
Traefik Docker provider keeps working as it was prior to dockerd restart
What did you see instead?
Traefik Docker provider stops picking up changes until traefik is restarted.
This is likely related to https://github.com/containous/traefik/issues/5589 - dockerd socket is bind-mounted into traefik container and when dockerd is restarted that socket is recreated. Edit: it looks like it isn’t - see https://github.com/containous/traefik/issues/5833#issuecomment-562939483
Output of traefik version: (What version of Traefik are you using?)
Version: 2.0.2
Codename: montdor
Go version: go1.13.1
Built: 2019-10-09T19:26:05Z
OS/Arch: linux/amd64
What is your environment & configuration (arguments, toml, provider, platform, …)?
Traefik running in a docker container, using docker provider
api:
dashboard: false
insecure: false
entryPoints:
http:
address: ":80"
https:
address: ":443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
Our dockerd config contains "live-restore": true which results in dockerd restarts not causing container restarts.
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 5
- Comments: 18 (4 by maintainers)
I have no an exact idea why problem is happen, but something related to mounting docker socket as unix socket. May be after daemon restarting new inode is creating, old one is not accessible, but this is not confirmed by mounting folder instead of file. Anyhow, for some reasons traeifk container staying in Exit status after docker daemon restart. To solve this with minimal changes, without any proxy containers etc. deploy settings was added, as mentioned above.