mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cephfs: log clone progress
log cephfs clone progress report during cephfs clone operation Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
00d252e4ac
commit
98cf0780e1
@ -128,6 +128,17 @@ func CheckVolExists(ctx context.Context,
|
||||
}
|
||||
err = cloneState.ToError()
|
||||
if errors.Is(err, cerrors.ErrCloneInProgress) {
|
||||
progressReport := cloneState.GetProgressReport()
|
||||
// append progress report only if the progress report parameters are present.
|
||||
if progressReport.PercentageCloned != "" {
|
||||
err = fmt.Errorf("%w. progress report: percentage cloned=%s, amount cloned=%s, files cloned=%s",
|
||||
err,
|
||||
progressReport.PercentageCloned,
|
||||
progressReport.AmountCloned,
|
||||
progressReport.FilesCloned)
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
if errors.Is(err, cerrors.ErrClonePending) {
|
||||
|
Reference in New Issue
Block a user