mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cephfs: retry subvolumegroup creation
Incase the subvolumegroup is deleted and recreated we need to restart the cephcsi provisioner pod to clear cache that cephcsi maintains. With this PR if cephcsi sees NotFound error duing subvolume creation it will reset the cache for that filesystem so that in next RPC call cephcsi will try to create the subvolumegroup again Ref: https://github.com/rook/rook/issues/10623 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
e56621cd66
commit
76064d8e34
@ -259,6 +259,12 @@ func (s *subVolumeClient) CreateVolume(ctx context.Context) error {
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed to create subvolume %s in fs %s: %s", s.VolID, s.FsName, err)
|
||||
|
||||
if errors.Is(err, rados.ErrNotFound) {
|
||||
// Reset the subVolumeGroupsCreated so that we can try again to create the
|
||||
// subvolumegroup in next request if the error is Not Found.
|
||||
clusterAdditionalInfo[s.clusterID].subVolumeGroupsCreated[s.FsName] = false
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user