rancher / elemental

Elemental is an immutable Linux distribution built to run Rancher and its corresponding Kubernetes distributions RKE2 and k3s. It is built using the Elemental-toolkit
https://elemental.docs.rancher.com/
Apache License 2.0
290 stars 39 forks source link

Request for a -longhorn variant #1432

Open robertwbl opened 3 months ago

robertwbl commented 3 months ago

Describe the solution you'd like: Longhorn has the following dependencies:

  • Make sure bash, curl, findmnt, grep, awk and blkid has been installed in all nodes of the Kubernetes cluster.
  • Make sure open-iscsi has been installed, and the iscsid daemon is running on all nodes of the Kubernetes cluster.

All of these except open-iscsi are included in SLE Micro, and given Longhorn is part of the Rancher family it feels appropriate to include this package so that when building a seed image via Elemental, we can use Elemental nodes as storage nodes with Longhorn in our cluster.

Anything else you would like to add: I tested a deployment of Longhorn on cluster nodes that didn't have this dependency and can confirm the deployment fails

Environment:

robertwbl commented 3 months ago

Just to note that although not explicitly mentioned, the iscsi_tcp kernel module is also a requirement. Without it volumes will fail to attach to nodes and longhorn instance-manager logs will show: libkmod: kmod_module_insert_module: could not find module by name='iscsi_tcp'\niscsiadm: Could not insert module tcp. Kmod error -2\niscsiadm: iSCSI driver tcp is not loaded. Load the module then retry the command.\niscsiadm: Could not perform SendTargets discovery: iSCSI driver not found. Please make sure it is loaded, and retry the operation\n: exit status 12"

More details here: https://github.com/longhorn/longhorn/issues/1853

robertwbl commented 2 months ago

Another gottcha - If you want to use a Longhorn volume with the access mode of ReadWriteMany (RWX) then nfs-utils or nfs-common is also required, else you'll run into errors along the lines of: [MountVolume.MountDevice failed for volume pvc-foo : rpc error: code = Internal desc = mount failed: exit status 32 Mounting command: /usr/local/sbin/nsmounter Mounting arguments: mount -t nfs -o :/pvc /var/lib/kubelet/plugins/kubernetes.io/csi/driver.longhorn.io/globalmount Output: mount: /var/lib/kubelet/plugins/kubernetes.io/csi/driver.longhorn.io/ globalmount bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.]

kkaempf commented 2 months ago

We should probably define a -longhorn variant 🤔

kkaempf commented 2 months ago

open-iscsi is in the baremetal variant for SL Micro 6.0 (but might be missing from 5.5 🤔 )