projectatomic / container-storage-setup

Service to set up storage for Docker and other container systems
Apache License 2.0
153 stars 77 forks source link

Failed mount does not lead to startup error #282

Open Klaas- opened 5 years ago

Klaas- commented 5 years ago

Hi, I think the services created by docker-storage-setup need to enforce successful startup. In my case the /var/lib/docker mount had gone into a bad state ("mount: wrong fs type, bad option, bad superblock") but that did not keep docker from starting and using my /var volume directly.

I think the unit files need to be changed like this: https://github.com/projectatomic/container-storage-setup/blob/master/container-storage-setup.sh#L1330 needs to be RequiredBy=

And https://github.com/projectatomic/container-storage-setup/blob/master/docker-storage-setup.service#L12 needs to also have RequiredBy=docker.service

That way an admin is sure to notice a problem with docker storage.

I'll create a PR.

Greetings Klaas