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

Commits on Oct 4, 2024

  1. Add Qcow2BitmapInfo data to GetQemuImageInfo

    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]>
    dupondje authored and sandrobonazzola committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    2c818d8 View commit details
    Browse the repository at this point in the history
  2. Allow Checkpoint removal to fail in some cases in DeleteAllVmCheckpoi…

    …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]>
    dupondje authored and sandrobonazzola committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d040fbd View commit details
    Browse the repository at this point in the history
  3. Use DeleteAllVmCheckpoints to remove inconsistent checkpoints

    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]>
    dupondje authored and sandrobonazzola committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    e5286f9 View commit details
    Browse the repository at this point in the history
  4. Check on-disk bitmap status on StartVmBackup and on TransferDiskImage

    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]>
    dupondje authored and sandrobonazzola committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    e587a87 View commit details
    Browse the repository at this point in the history