-
Notifications
You must be signed in to change notification settings - Fork 933
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: Set the volume UUIDs consistently #12904
Conversation
5fafd82
to
d22c9ad
Compare
db8085d
to
eca015a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how much of the remaining PR remains relevant after my suggestion earlier.
As these changes are changing very core functionality of the storage subsystem i'd prefer to see a PR per logical isolated change rather than bundling several changes together to help reason about their impacts in isolation. For example if there are fixes needed for backup restoration that should be a change in its own PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets chat about this in our 1:1 im getting a bit lost with why these changes are needed.
614c8ad
to
6206f0f
Compare
@roosterfish as discussed in our 1:1, lets explore moving the volatile.uuid out of the VolumeDBCreate function and into a new b.GetNewVolume() function so it can be available earlier and make clear that by calling this new function we are modelling a volume that does not yet exist in the storage layer. |
f1d4d56
to
6328548
Compare
6328548
to
86784d0
Compare
c2dd918
to
b04d927
Compare
b04d927
to
92e0ff3
Compare
…eration When used to instantiate a new volume, it deep copies the given config and assigns a new UUID for later usage. Signed-off-by: Julian Pelizäus <[email protected]>
…tiating a snapshot Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
Signed-off-by: Julian Pelizäus <[email protected]>
92e0ff3
to
21c6ec8
Compare
@tomponline ready for review. The backend is now using the new Based on this I was able to get rid of all the other places were we required an exception to delete or set a new UUID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks
As a follow up on #12871 and #12840, these changes make the creation of volume UUIDs more consistent by adding a new function
GetNewVolume
that instantiates new volumes that don't yet exist on the database.This allows assigning new UUIDs at a single place without requiring to duplicate the UUID generation at several places in the code base.
Additionally this removes the assignment of the UUID from the volume's DB entry creation.