siderolabs / extensions

Talos Linux System Extensions
Mozilla Public License 2.0
104 stars 105 forks source link

ZFS pool import does not work with machine.disks #357

Open b1r3k opened 4 months ago

b1r3k commented 4 months ago

It seems like current ZFS extension does not work in conjunction with machine.disks configuration. If one wants to mount zvols from ZFS pool it cannot be done before zfs import takes place and ZFS pool import waits for CRI to be registered which probably waits from mounts to be successful in the first place. Output comes from talos version 1.6.7

10.69.1.254: user: warning: [2024-04-11T11:59:25.875434997Z]: [talos] phase userDisks (12/16): 1 tasks(s)
10.69.1.254: user: warning: [2024-04-11T11:59:25.875456997Z]: [talos] task mountUserDisks (1/1): starting
10.69.1.254: user: warning: [2024-04-11T11:59:25.875527997Z]: [talos] task mountUserDisks (1/1): mountUserDisks failed, rebooting in 35 minutes. You can use talosctl apply-config or talosctl edit mc to fix the issues, error:
10.69.1.254: user: warning: [2024-04-11T11:59:25.875530997Z]: error resolving device symlink: lstat /dev/zd64: no such file or directory
$ talosctl -n 10.69.1.254 service
NODE          SERVICE              STATE     HEALTH   LAST CHANGE   LAST EVENT
10.69.1.254   apid                 Running   OK       17s ago       Health check successful
10.69.1.254   containerd           Running   OK       1m16s ago     Health check successful
10.69.1.254   dashboard            Running   ?        33s ago       Process Process(["/sbin/dashboard"]) started with PID 2080
10.69.1.254   ext-iscsid           Waiting   ?        31s ago       Waiting for service "cri" to be registered, service "ext-tgtd" to be "up"
10.69.1.254   ext-tailscale        Waiting   ?        30s ago       Waiting for service "cri" to be registered, file "/var/etc/tailscale/auth.env" to exist
10.69.1.254   ext-tgtd             Waiting   ?        31s ago       Waiting for service "cri" to be registered
10.69.1.254   ext-zpool-importer   Waiting   ?        1m14s ago     Waiting for service "cri" to be registered
10.69.1.254   kubelet              Waiting   ?        17s ago       Waiting for service "cri" to be registered
10.69.1.254   machined             Running   OK       1m21s ago     Health check successful
10.69.1.254   udevd                Running   OK       1m15s ago     Health check successful
machine:
    disks:
        - device: /dev/zd64 # The name of the disk to use.
          partitions:
              - mountpoint: /var/mnt/localpv-ssd # Where to mount the partition.
        - device: /dev/zd0 # The name of the disk to use.
          partitions:
              - mountpoint: /var/mnt/localpv-hdd1 # Where to mount the partition.
$ talosctl -n 10.69.1.254 get extensions
NODE          NAMESPACE   TYPE              ID            VERSION   NAME          VERSION
10.69.1.254   runtime     ExtensionStatus   0             1         i915-ucode    20240312
10.69.1.254   runtime     ExtensionStatus   1             1         intel-ucode   20240312
10.69.1.254   runtime     ExtensionStatus   2             1         iscsi-tools   v0.1.4
10.69.1.254   runtime     ExtensionStatus   3             1         tailscale     1.54.0
10.69.1.254   runtime     ExtensionStatus   4             1         zfs           2.1.14-v1.6.7
10.69.1.254   runtime     ExtensionStatus   5             1         schematic     145655dab87a4ae0f2909cbb95df295884f0f9a2ba30107458ee5f00386d6b65
10.69.1.254   runtime     ExtensionStatus   modules.dep   1         modules.dep   6.1.82-talos
smira commented 4 months ago

Yes, #8367 is supposed to fix that, and machine.disks is not flexible enough.