I found a potential bug. If I create a snapshot with an upperase name (which is allowed in proxmox) the plugin runs into a parser error.
vm-9903-state-Kernel-6-11-clean
Trying to create diskful resource (vm-9903-state-Kernel-6-11-clean) on (sirion-3).
VM 9903 qmp command 'savevm-end' failed - VM snapshot not started
snapshot create failed: starting cleanup
unable to parse PVE volume name 'vm-9903-state-Kernel-6-11-clean'
TASK ERROR: unable to parse PVE volume name 'vm-9903-state-Kernel-6-11-clean'
yes, LINSTOR has its own rules. Some of them are made up by LINSTOR, some are DRBD limitations. When it comes to snapshots ZFS and LVM rules might apply as well.
One alternative would be to reimplement all these rules in perl in the plugin. And maintain them, because rules in DRBD or LINSTOR or any of the involved tools might change and then we would have to change them in the perl code as well. even worse, we would need to know the exact DRBD and LINSTOR (and all tool) versions in the plugin to apply rules for version a, b, or c and all their possible permutations. A nightmare. Okay, well, assume we do that, great, then we can throw back an error that the user used some bad naming.
What we have now: we simply try it, and if it does not work we throw back an error at the user.
Fair enough, that all makes sense. However, there’s one specific issue: while the snapshot is indeed created and exists in the filesystem, it’s not recognized by Proxmox. This causes some critical functions related to managing VMs to fail. Ultimately, I had to manually delete the snapshot to resolve the problem:
linstor rd delete vm-9903-state-Kernel-6-11-clean
From my understanding, if the snapshot creation process fails, it would make sense to implement a rollback action to clean up. Does that seem like a reasonable approach to you?
sure, if things fail they should be cleaned up/rolled back. and yes, especially with snapshots I remember problems. currently a bit busy with all kinds of other things, but I will look into it. for now: don’t do it