mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cephfs: log error message if clone fails
During CreateVolume from snapshot/volume,
its difficult to identify if the clone is
failed and a new clone is created. In case
of clone failure logging the error message
for better debugging.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 2daf2f9f0c
)
This commit is contained in:
parent
cc0babffa9
commit
dcc0fdc736
@ -124,6 +124,11 @@ func CheckVolExists(ctx context.Context,
|
||||
return nil, cerrors.ErrClonePending
|
||||
}
|
||||
if cloneState == cephFSCloneFailed {
|
||||
log.ErrorLog(ctx,
|
||||
"clone failed, deleting subvolume clone. vol=%s, subvol=%s subvolgroup=%s",
|
||||
volOptions.FsName,
|
||||
vid.FsSubvolName,
|
||||
volOptions.SubvolumeGroup)
|
||||
err = volOptions.PurgeVolume(ctx, fsutil.VolumeID(vid.FsSubvolName), true)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed to delete volume %s: %v", vid.FsSubvolName, err)
|
||||
|
Loading…
Reference in New Issue
Block a user