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

rbd: use ImageID where possible, add ParentID to prevent confusion #4273

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from

Commits on Nov 28, 2023

  1. rbd: use librbd.OpenImageById() if rbdVol.ImageID is set

    `librbd.OpenImageById()` works if the image is in the trash, so it makes
    it possible to get the parent of the image.
    
    Signed-off-by: Niels de Vos <[email protected]>
    nixpanic committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    a228b14 View commit details
    Browse the repository at this point in the history
  2. rbd: prevent presetting the ImageID of a new volume

    When a new volume is not created yet, the ImageID should not be set to
    the ID of the snapshot.
    
    Signed-off-by: Niels de Vos <[email protected]>
    nixpanic committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    58573a1 View commit details
    Browse the repository at this point in the history
  3. rbd: set/get correct ImageID in more places

    In some places the ImageID is used as the ID of the parent. That is very
    confusing and prone to errors. Instead, fetch the right ImageID where
    possible, and set ParentID for referencing to parent images.
    
    Signed-off-by: Niels de Vos <[email protected]>
    nixpanic committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    b872914 View commit details
    Browse the repository at this point in the history
  4. rbd: skip flattening if an image in trash

    Signed-off-by: Niels de Vos <[email protected]>
    nixpanic committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    c21cba2 View commit details
    Browse the repository at this point in the history
  5. rbd: the DeleteVolume CSI procedure should succeed on deleted images

    If the RBD-image is deleted already, the DeleteVolume CSI procedure is
    expected to report success (as it should be idempotent). In case the
    returned error indicates "RBD image not found", the error is ignored and
    the DeleteVolume procedure continues.
    
    Signed-off-by: Niels de Vos <[email protected]>
    nixpanic committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    a9eae1e View commit details
    Browse the repository at this point in the history