You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Mayastor documentation recommends using disk name references that persist between system reboots rather than references such as /dev/nvme1n1. Currently the Microk8s mayastor-pools add command only supports these names rather than the by-id names. This fails because specifying a full path such as --device /dev/disks/by-id/nvme-SomeDiscReference-54321 attempts to use the whole name as part of the pool name when it generates the DiskPool YAML, which is not a valid K8S name, and so fails.
What Should Happen Instead?
As a bare minimum, a sensible name in the YAML should be generated from the last part of the device path rather than full path.
Ideally this command should take a local name such as nvme1n1 and use linux syscalls to determine its by-id (E.g. via the udevadm command/API). It should then generate a sensible persistent name that is valid, and use the by-id name in the YAML's 'disks: ['NAME']' element.
Even better, modifying the mayastor-pools command to include something like add --thisnode --all-free-nvme or --all-free-sata, or even better a cluster wide version of this, would be much more user friendly. (One pool per disk)
Reproduction Steps
Enable the Mayastor addon
Attempt to run microk8s mayastor-pools add --node mynode --device /dev/disks/by-id/nvme-SOMEID
Observe that this command fails
Introspection Report
Unable to share - airgapped customer system. Was on Ubuntu 23.10.1 and microk8s v1.29.2-strict and that version of the Mayastor addon.
Can you suggest a fix?
As above - several options.
Are you interested in contributing with a fix?
Not sure where to start on a reliable way via Linux system calls if I'm honest. My udevadm and mount approach I'm using with sed feels a bit hacky.
The text was updated successfully, but these errors were encountered:
Summary
The Mayastor documentation recommends using disk name references that persist between system reboots rather than references such as /dev/nvme1n1. Currently the Microk8s mayastor-pools add command only supports these names rather than the by-id names. This fails because specifying a full path such as
--device /dev/disks/by-id/nvme-SomeDiscReference-54321
attempts to use the whole name as part of the pool name when it generates the DiskPool YAML, which is not a valid K8S name, and so fails.What Should Happen Instead?
As a bare minimum, a sensible name in the YAML should be generated from the last part of the device path rather than full path.
Ideally this command should take a local name such as nvme1n1 and use linux syscalls to determine its by-id (E.g. via the udevadm command/API). It should then generate a sensible persistent name that is valid, and use the by-id name in the YAML's 'disks: ['NAME']' element.
Even better, modifying the mayastor-pools command to include something like
add --thisnode --all-free-nvme
or--all-free-sata
, or even better a cluster wide version of this, would be much more user friendly. (One pool per disk)Reproduction Steps
microk8s mayastor-pools add --node mynode --device /dev/disks/by-id/nvme-SOMEID
Introspection Report
Unable to share - airgapped customer system. Was on Ubuntu 23.10.1 and microk8s v1.29.2-strict and that version of the Mayastor addon.
Can you suggest a fix?
As above - several options.
Are you interested in contributing with a fix?
Not sure where to start on a reliable way via Linux system calls if I'm honest. My
udevadm
andmount
approach I'm using withsed
feels a bit hacky.The text was updated successfully, but these errors were encountered: