blob: c417a1b6fbb76bc0fdc74197d699b4e8559cb642 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
---
- name: create zfs dataset
zfs:
name: "{{ kubelet_zfs.pool }}/{{ kubelet_zfs.name }}"
state: present
extra_zfs_properties:
quota: "{{ kubelet_zfs.size }}"
- name: bind mount filesytem
mount:
src: "{{ zfs_zpools[kubelet_zfs.pool].mountpoint }}/{{ kubelet_zfs.name }}"
path: /var/lib/kubelet
fstype: none
opts: bind,x-systemd.automount,nofail
state: mounted
## TODO:
## there is a race condition between the bind mound and the zfs-mount which is invisible to systemd.
## It seems ZFSonLinux 8 and beyond have a systemd-generator to fix this problem. Sadly Debain Buster and Ubuntu Bionic contain
## ZFSOnLinux 7 - so let's try the folllowing for a possible workaround:
## https://askubuntu.com/questions/988968/which-zfs-command-systemd-unit-to-depend-on-to-ensure-that-a-mountpoint-is-avail
|