Longhorn, the storage system in my cluster, worked until a node rebooted.
Every time I rebooted a node, it broke again. That pointed away from Longhorn itself. Something it depends on wasn’t surviving the reboot.
The iSCSI extension wasn’t surviving reboots. I needed to put the schematic installer image in the machine config.
What Longhorn needs from Talos
Talos is immutable. I can’t SSH in and install a missing tool, because there’s no package manager. Anything the OS needs has to be in the image.
Longhorn needs iSCSI. It needs the iscsi-tools system extension in the Talos image, and the longhorn-system namespace has to be privileged.
If the extension is missing, this is what happens:
- iSCSI tools are missing on the node.
- Longhorn’s CSI components fail.
- Persistent volume claims can’t mount.
- Pods that need storage sit in
ContainerCreating.
From the pod’s side, it just looks stuck. The cause was the missing extension in the node image.
I don’t remember which volume or pod I noticed first, and it doesn’t matter.
Why it kept coming back
I got this wrong at first.
I had built an image with the right extension, using a Talos schematic from Image Factory. The April build ran schematic 75e66505…, which included iscsi-tools.
But the extensions vanished after reboots because I hadn’t put the schematic installer image in the machine config. The machine config has to point at that schematic image, in machine.install.image. That sets the installer image the node uses. Upgrades take their image from the upgrade command, so I used the schematic image there too.
I patched that in with schematic-patch-02.yaml, which is in the repo. Until then, the extensions could vanish after a reboot.
I also upgrade with --preserve.
talosctl upgrade --nodes <node-ip> --preserve --image factory.talos.dev/installer/<schematic-id>:<version>
--preserve keeps the data on the node’s ephemeral partition through an upgrade instead of wiping it.
What I changed
- I built a schematic in Image Factory that includes
iscsi-tools. The schematic I use now is613e1592…, which addedutil-linux-toolsas well. - I set
machine.install.imagein the machine config to that schematic image. - I kept the
longhorn-systemnamespace privileged. - I upgraded nodes with
talosctl upgrade --preserveand the schematic image.
After those changes, the post check passed.
What I took from this
On Talos, only what’s in the config survives a reinstall. The schematic installer image has to be specified in the machine config, and the upgrade command has to use that image too.
If a fix isn’t in the config, a reboot or an upgrade can take it away.