rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 658 forks source link

Service restart policy not fulfilled when first start fails #1924

Open albertdb opened 7 years ago

albertdb commented 7 years ago

RancherOS Version: 1.0.2

Where are you running RancherOS? openstack

I've noticed that randomly one of our service fails to start at boot due to the following error:

$ cat /var/log/system-docker.log | grep 80c697de9598
> time="2017-06-16T09:10:56.758915528Z" level=error msg="Handler for POST /v1.20/containers/80c697de9598a85aa025dfb46c49331e3d8b2814f22fe405dafb99d8338c5e3e/start returned error: linux runtime spec devices: lstat /dev/log: no such file or directory"

That wouldn't be a problem as the service has restart: always policy, but the restart policy is not fulfilled when container has never started and there are no retries when POST [...]/start fails due to Docker generated error.

SvenDowideit commented 7 years ago

I have to do some serious work in libcompose for the v1.2 release, so I'll look at this then