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 660 forks source link

docker should look if zfs partition is mounted before starting #3056

Open JOduMonT opened 3 years ago

JOduMonT commented 3 years ago

To reproduce

  1. Install ROS 1.5.8
  2. Install ZFS and configure a pool on a second drive (/dev/sdb): https://rancher.com/docs/os/v1.x/en/storage/using-zfs/
sudo docker info|grep "Storage\|Dir"
 Storage Driver: zfs
 Docker Root Dir: /mnt/docker

notes

my zfs is persistently mounting automatically, after several reboot and at login that result is always the same

sudo zfs list -o mounted
MOUNTED
    yes

but I have to systematically restart docker sudo system-docker restart docker otherwise

sudo docker info
Client:
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

Expected

Actual

everything work well until I reboot than when I reboot, I presume docker try to start before zfs because after a reboot

the config

'hostname:': dev007
rancher:
  console: ubuntu
  disable:
  - autologin
  docker:
    graph: /mnt/docker
    storage_driver: zfs
    tls: true
  environment:
    EXTRA_CMDLINE: /init
  network:
    dns:
      nameservers:
      - 1.1.1.1
      - 8.8.8.8
    interfaces:
      eth0:
        address: 172.16.100.7/16
        dhcp: false
        gateway: 172.16.1.254
  services_include:
    kernel-headers-system-docker: true
    qemu-guest-agent: true
    volume-cifs: true
    zfs: true
  state:
    dev: LABEL=RANCHER_STATE
    wait: true
ssh_authorized_keys:
- ssh-***
- ssh-***
- ssh-***
- ssh-***
- ssh-***