allow passing arguments to storage pool creation#930
Conversation
LINSTOR 1.33.0 added the option to pass argument to calls to pv/vg/lv/zpool create. Expose this when in the storage pool settings. Since this option is only useful when the storage pool gets first created, specifically when it is being created from empty devices, the admission webhook has been extended to generate a number of warnings, specifically when: * changing the arguments for an existing storage pool. * adding arguments when no source is set, making the arguments useless. Signed-off-by: Moritz Wanzenböck <moritz.wanzenboeck@linbit.com>
f1cdac6 to
5ea6346
Compare
|
I tried this on a cluster with LINSTOR that is too old (v1.32.3). It caused rather cryptic errors: There are related error reports: My storage config: apiVersion: piraeus.io/v1
kind: LinstorSatelliteConfiguration
metadata:
name: storage-satellites
spec:
storagePools:
- name: thinpool
lvmThinPool:
volumeGroupCreateArguments: ["-s", "512KiB"]
source:
hostDevices:
- /dev/vdbI didn't see any errors in the operator logs. It looks like it silently skipped the With LINSTOR v1.32.3, but without With LINSTOR v1.33.1, the above config with I would expect an error related to failing to create the LVM VG somewhere and not to have broken storage pools added to LINSTOR. Can we improve the failure behavior in this scenario? |
I expect the trouble is that in cases where the Ideally, we would get all the necessary information directly from LINSTOR. The reason for the approach we have right now is that the Interestingly, while these paths do not show up, they can still be use in the I don't know how to properly work around all of these limitations for now. In the past, there has actually been the idea to move this configuration out of LINSTOR completely, perhaps making use of a separate component to configure storage pools altogehter 🤔 |
Tricky. Perhaps the best we can do for now is to catch the misconfigurations that we can in advance. In this case, raise an error if Or we parse the error from LINSTOR. If it matches a "device pool already set up" pattern then we continue creating the storage pool, otherwise raise an error. Or better than parsing the message, we check the |
LINSTOR 1.33.0 added the option to pass argument to calls to pv/vg/lv/zpool create. Expose this when in the storage pool settings.
Since this option is only useful when the storage pool gets first created, specifically when it is being created from empty devices, the admission webhook has been extended to generate a number of warnings, specifically when:
During testing, I discovered that we had the arguments to
ValidateUpdate()the wrong way around: we switched the "old" and "new" arguments around, leading to confusing error messages.