Skip to content
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

Storage: Add reverter to disk device update & test #14703

Merged

Conversation

MggMuggins
Copy link
Contributor

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.

@MggMuggins MggMuggins force-pushed the add-reverter-to-storage-pool-update branch from b4567c0 to 0c554c7 Compare December 20, 2024 06:05
So that the old ones are still around for use in a reverter

Signed-off-by: Wesley Hershberger <[email protected]>
storagePoolVolumeUpdateUsers is used in two places, one of which does not
currently use a reverter. If that update fails, the instances/profiles
could be left in an inconsistent state.

This pushes the reverter inside the function, so that it is safe to call
without needing a reverter.

My hunch is that this is also slightly less slow in case of failure.

Signed-off-by: Wesley Hershberger <[email protected]>
Ensure that renaming local storage volumes in a clustered context
doesn't break horribly.

This features is clearly not a thoroughly planned semantic corner. We
should consider removing it entirely.

Signed-off-by: Wesley Hershberger <[email protected]>
@MggMuggins MggMuggins force-pushed the add-reverter-to-storage-pool-update branch from 0c554c7 to 6a28fde Compare December 20, 2024 15:25
@tomponline tomponline changed the title Add reverter to disk device update & test Storage: Add reverter to disk device update & test Dec 20, 2024
@tomponline tomponline merged commit 5fbd3a7 into canonical:main Dec 20, 2024
26 checks passed
@MggMuggins MggMuggins deleted the add-reverter-to-storage-pool-update branch December 20, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants