mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +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>
(cherry picked from commit c7d54ab776
)
This commit is contained in:
committed by
mergify[bot]
parent
8fcb438794
commit
09e298197e
@ -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