RancherOS Version: (ros os version)
1.2.0
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
baremetal
cloud-config.yml
rancher:
docker:
engine: docker-17.12.0-ce
graph: /mnt/space/docker
storage_driver: zfs
services_include:
kernel-headers-system-docker: true
rancher-server-stable: true
zfs: true
So I've been trying to set my user-dockers root to a zfs dataset, just like described within the RancherOS docs.
The problem is, after a reboot, it seems like docker gets started before the zfs service, so it tries to create some files under /mnt/space/docker before the zfs datasets are mounted, resulting in an error that the filesystem is wrong. And since docker already created files under /mnt/space/docker, I can't mount the datasets unless I remove the existing files from the mountpoint.
Does anyone know a fix for this issue? I looked at the service config of the zfs service here https://github.com/rancher/os-services/blob/master/z/zfs.yml but it seems the label io.rancher.os.before: "docker" is correctly set, so why does the docker container still create files before all zfs datasets are mounted?
Edit Alright after several reboots I've found out that it actually works kinda, if I just wait for docker to be started. But if I execute docker info immediately after rebooting, it just unmounts all zfs datasets and still tries to start docker unter /mnt/space/docker.