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

Implement checkBitmap to check bitmap status before backup #866

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dupondje
Copy link
Member

@dupondje dupondje commented Jun 6, 2023

Sometimes a bitmap cam become invalid/corrupt without oVirt noticing this. For example if a hypervisor crashes, the active bitmap will become invalid.

This will currently cause oVirt to fail to create a NBDServer, as it will error with 'Bitmap does not exist in ...'.

We add a command to check the bitmap status before the backup is created. If the bitmap is invalid, we throw an error and remove the invalid bitmapId.

The VDSM side also needs to be implemented, but that's easy :)
Would be great if some maintainer can give his comments on the idea and the code!

@dupondje dupondje force-pushed the check_bitmap_before_backup branch 3 times, most recently from d78fecc to 7b8763f Compare June 8, 2023 10:49
@dupondje dupondje requested a review from bennyz June 8, 2023 11:55
@bennyz
Copy link
Member

bennyz commented Jun 11, 2023

Is there a corresponding vdsm PR? it would need to be merged first, also, I think we'll need to add this verb to host capabilities[1] so it isn't sent to older hosts

[1] https://github.com/oVirt/vdsm/blob/07d3089049b1ac81a3efbc14856679c4aa82b412/lib/vdsm/host/caps.py

@dupondje
Copy link
Member Author

dupondje commented Jul 5, 2023

Updated the code to work with the latest vdsm patch oVirt/vdsm#394

@sandrobonazzola sandrobonazzola force-pushed the check_bitmap_before_backup branch 2 times, most recently from 06ed7ca to 4ab605c Compare June 10, 2024 09:15
@sandrobonazzola sandrobonazzola requested review from BrooklynDewolf and removed request for ljelinkova and oliel July 10, 2024 10:20
Extend the GetQemuImageInfoVDSCommand command to also provide
information about the bitmaps.

This data will only be valid when the hypervisor has the
qemu_image_info_bitmaps capability.

The bitmap information can be used to validate the engine's bitmap data
with the qemu-img info.

VDSM PR: oVirt/vdsm#394

Signed-off-by: Jean-Louis Dupond <[email protected]>
…ntsCommand

If there is checkpoint inconsistency between the checkpoints in the
database and those on-disk, then we need to remove all checkpoints
on-disk and in the database.
But the on-disk removal can fail because the checkpoint is already gone
because of some corruption (for example due to an unclean shutdown).

Therefor we want to allow DeleteAllVmCheckpointsCommand to continue on
failure in some cases.

Signed-off-by: Jean-Louis Dupond <[email protected]>
Instead of re-implement the functionality from DeleteAllVmCheckpoints,
we just use DeleteAllVmCheckpoints and pass to force flag to allow
DeleteAllVmCheckpoints to continue on failures.

Signed-off-by: Jean-Louis Dupond <[email protected]>
Sometimes a bitmap can become invalid/corrupt without oVirt noticing
this. For example if a hypervisor crashes, the active bitmap will become
invalid.
This means that the qcow2 volume does not contain the bitmap anymore,
but oVirt thinks the bitmap still exists because it's in the database.

This will currently cause oVirt to fail to create a NBDServer, as it
will error with 'Bitmap does not exist in ...'.

We use the QemuImageInfo to get all the on-disk bitmaps and compare
them with the bitmaps in the oVirt database. If there is some
inconsistency we remove all the bitmaps/checkpoints.

Signed-off-by: Jean-Louis Dupond <[email protected]>
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