mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
rbd: update snap RbdImageName in createSnapshot
This PR updates the snapshot RbdImageName in `createSnapshot` method. This resolves the incorrect statement logged during snapshot creation. Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
parent
9c53bf805b
commit
0ed7a64191
@ -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)
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user