mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
cephfs: handle invalid error in fs resize
go ceph returns NotImplementedError for invalid commands,cephcsi is using errors.As to find out the error. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
2232067e99
commit
66eb3b7525
@ -194,8 +194,9 @@ func (vo *volumeOptions) resizeVolume(ctx context.Context, volID volumeID, bytes
|
|||||||
clusterAdditionalInfo[vo.ClusterID].resizeSupported = true
|
clusterAdditionalInfo[vo.ClusterID].resizeSupported = true
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
var invalid fsAdmin.NotImplementedError
|
||||||
// In case the error is other than invalid command return error to the caller.
|
// In case the error is other than invalid command return error to the caller.
|
||||||
if !strings.Contains(err.Error(), invalidCommand) {
|
if !errors.As(err, &invalid) {
|
||||||
util.ErrorLog(ctx, "failed to resize subvolume %s in fs %s: %s", string(volID), vo.FsName, err)
|
util.ErrorLog(ctx, "failed to resize subvolume %s in fs %s: %s", string(volID), vo.FsName, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user