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
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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 <ndevos@ibm.com>
  • Loading branch information
nixpanic committed Nov 28, 2023
commit a9eae1e4f88dbac4ea784ef665b1244b38b2eae0
5 changes: 3 additions & 2 deletions internal/rbd/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1017,9 +1017,10 @@ func cleanupRBDImage(ctx context.Context,
}
}

// Deleting rbd image
// Deleting rbd image, it isn't a failure if the image was deleted already.
log.DebugLog(ctx, "deleting image %s", rbdVol.RbdImageName)
if err = rbdVol.deleteImage(ctx); err != nil {
err = rbdVol.deleteImage(ctx)
if err != nil && !errors.Is(err, librbd.ErrNotFound) {
log.ErrorLog(ctx, "failed to delete rbd image: %s with error: %v",
rbdVol, err)

Expand Down