mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rbd: return group not found error for Get,Delete RPC calls
We should return NotFound status if the group doesn't exists for ControllerGetVolumeGroup RPC call. And, an empty/OK response for DeleteVolumeGroup if the group doesn't exists Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
53d5eda020
commit
c7d54ab776
@ -145,6 +145,12 @@ func (cvg *commonVolumeGroup) getVolumeGroupAttributes(ctx context.Context) (*jo
|
||||
attrs = &journal.VolumeGroupAttributes{}
|
||||
}
|
||||
|
||||
if attrs.GroupName == "" || attrs.CreationTime == nil {
|
||||
log.ErrorLog(ctx, "volume group with id %v not found", cvg.id)
|
||||
|
||||
return nil, ErrRBDGroupNotFound
|
||||
}
|
||||
|
||||
cvg.requestName = attrs.RequestName
|
||||
cvg.name = attrs.GroupName
|
||||
cvg.creationTime = attrs.CreationTime
|
||||
|
Reference in New Issue
Block a user