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

core: do not remove snapshot from DB if related images were not removed #403

Merged
merged 3 commits into from
Jun 14, 2022

Conversation

bennyz
Copy link
Member

@bennyz bennyz commented May 30, 2022

If we ended up not removing the new active volume from the storage
because they may be in-use, do not remove the snapshot from the database
as it may create a discrepancy between the engine DB and the storage,
leading to other issues.

Bug-Url: https://bugzilla.redhat.com/2081294
Signed-off-by: Benny Zlotnik bzlotnik@redhat.com

@bennyz bennyz requested a review from liranr23 May 30, 2022 14:41
@bennyz bennyz changed the title core: extract isSnapshotUsed core: do not remove snapshot from DB if related images were not removed May 30, 2022
@bennyz
Copy link
Member Author

bennyz commented Jun 8, 2022

/ost

Move isSnapshotUsed to ImagesHandler, to allow its reuse in other
classes.

Bug-Url: https://bugzilla.redhat.com/2081294
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
@bennyz bennyz marked this pull request as ready for review June 13, 2022 07:20
@bennyz
Copy link
Member Author

bennyz commented Jun 13, 2022

/ost

If we ended up not removing the new active volume from the storage
because they may be in-use, do not remove the snapshot from the database
as it may create a discrepancy between the engine DB and the storage,
leading to other issues.

Bug-Url: https://bugzilla.redhat.com/2081294
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
When running endWithFailure in CreateSnapshotForVmCommand, setSucceeded
will be set to false if there was a failure in one of the tasks, but
this does not mean the cleanup failed, and since it is not retried
anyway there is no reason not to always set it to true.

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
@ahadas
Copy link
Member

ahadas commented Jun 14, 2022

/ost

@bennyz bennyz merged commit 92cd8cd into oVirt:master Jun 14, 2022
@bennyz bennyz deleted the fix-snapshot-rollback branch June 14, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants