diff --git a/internal/rbd/controllerserver.go b/internal/rbd/controllerserver.go index bef86388e128..e3796b6611d2 100644 --- a/internal/rbd/controllerserver.go +++ b/internal/rbd/controllerserver.go @@ -1340,8 +1340,6 @@ func (cs *ControllerServer) doSnapshotClone( return nil, err } - // update rbd image name - rbdSnap.RbdImageName = cloneRbd.RbdImageName err = cloneRbd.createSnapshot(ctx, rbdSnap) if err != nil { log.ErrorLog(ctx, "failed to create snapshot %s: %v", rbdSnap, err) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index c5893256b7b2..0fc7822495c9 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -1411,6 +1411,7 @@ func (ri *rbdImage) hasSnapshotFeature() bool { } func (ri *rbdImage) createSnapshot(ctx context.Context, pOpts *rbdSnapshot) error { + pOpts.RbdImageName = ri.RbdImageName log.DebugLog(ctx, "rbd: snap create %s using mon %s", pOpts, pOpts.Monitors) image, err := ri.open() if err != nil {