-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve custom/c1
syntax during storage volume rename
#14681
Preserve custom/c1
syntax during storage volume rename
#14681
Conversation
`newVol.Type` should always be custom Signed-off-by: Wesley Hershberger <[email protected]>
Signed-off-by: Wesley Hershberger <[email protected]>
@MggMuggins TIL LXD does this. |
You and me both 😆 |
@tomponline There's no bug when used with instance devices. Renaming devices attached to profiles fails, but with an unhelpful error message. InstancesAssume the following configuration in a lxd cluster with cluster members
Renaming
ProfilesThe block volume sharing rules aren't strictly correct; adding the same device to the default profile hits this:
Setting that aside for a moment, the rename fails here:
I tried a similar setup with filesystem volumes in profiles and get the same thing. I think the current implementation is sound, at least insofar as it validates changes after making them. Looking at the code I think there's a corner case involving how revert happens (or not) when the rename fails like this, but I need a little more time to work it out properly. cc @masnax |
This makes `storagePoolVolumeUpdateUsers` safe to call without using a reverter. This also adds a few tests around renaming attached local custom storage volumes in a clustered context. As we've discussed previously (#14681), updating disk devices in profiles isn't necessarily sound. These tests give me a little more confidence that updates behave sanely for local storage volumes in a cluster. We should consider eliminating this feature altogether and simply making it a hard error to rename a custom storage volume while it is referred to by any disk device.
Follow-up to #14491; if a volume is specified as
source: custom/c1
, then a rename ofc1
->c2
should leave the device withsource: custom/c2
.