mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-21 22:00:19 +00:00
rbd: update snap RbdImageName
This commit updates the snapshot RbdImageName with the clone RbdImageName before snapshot creation. This will fix the incorrect log statement. Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
parent
0c617b05d6
commit
e504987984
@ -1340,10 +1340,10 @@ func (cs *ControllerServer) doSnapshotClone(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// update rbd image name
|
||||
rbdSnap.RbdImageName = cloneRbd.RbdImageName
|
||||
err = cloneRbd.createSnapshot(ctx, rbdSnap)
|
||||
if err != nil {
|
||||
// update rbd image name for logging
|
||||
rbdSnap.RbdImageName = cloneRbd.RbdImageName
|
||||
log.ErrorLog(ctx, "failed to create snapshot %s: %v", rbdSnap, err)
|
||||
|
||||
return cloneRbd, err
|
||||
|
Loading…
Reference in New Issue
Block a user