-
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
Storage: Use reverter for Ceph RBD volume refresh #13198
Conversation
Mhh, I want to check one more thing before we merge. The generic methods probably should return a |
…Volume Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
8622442
to
817a077
Compare
This adds a new refreshVolume function which allows returning cleanup hooks. This is useful as a VMs filesystem volume gets refreshed using the generic approach whilst block volumes use the optimized way of refreshing RBD backed volumes. Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…olume Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…teVolumeFromMigration Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…umeFromMigration Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…eFromMigration Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…eFromMigration Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…eVolumeFromMigration Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
…eFromMigration Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
817a077
to
084e441
Compare
Ok so this is now ready for review again. In order to properly cleanup the volumes that get refreshed using the generic approach, the respective functions now return the I have moved most of the logic into unexported equivalents of the driver functions so that those can be called twice but return the cleanup hooks for each of their invocations. The actual drivers function can now collect the cleanups and react appropriately in case of error. |
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.
Thanks!
This ensures snapshots are cleaned up in case the refresh fails. Otherwise this leads to error messages for subsequent refreshes as some of the snapshots already exist.