diff --git a/internal/rbd/manager.go b/internal/rbd/manager.go index 8b0d6a064..73f783fb0 100644 --- a/internal/rbd/manager.go +++ b/internal/rbd/manager.go @@ -212,6 +212,11 @@ func (mgr *rbdManager) GetSnapshotByID(ctx context.Context, id string) (types.Sn } } + // FIXME: The snapshot will have RbdImageName set to the image that was + // used as source. This is not correct for group snapshots images, and + // need to be fixed. See rbdVolume.NewSnapshotByID() for more details. + snapshot.RbdImageName = snapshot.RbdSnapName + return snapshot, nil } diff --git a/internal/rbd/snapshot.go b/internal/rbd/snapshot.go index 084bf4d72..209299e5c 100644 --- a/internal/rbd/snapshot.go +++ b/internal/rbd/snapshot.go @@ -221,7 +221,12 @@ func (rv *rbdVolume) NewSnapshotByID( } }() - // a new snapshot image will be created, needs to have a unique name + // A new snapshot image will be created, and needs to have a unique + // name. + // FIXME: the journal contains rv.RbdImageName as SourceName. When + // resolving the snapshot image, snap.RbdImageName will be set to the + // original RbdImageName/SourceName (incorrect). This is fixed-up in + // rbdManager.GetSnapshotByID(), this needs to be done cleaner. snap.RbdImageName = snap.RbdSnapName err = rv.Connect(cr)