mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
util: return correct status code for VolumeGroupSnapshot
Fix status codes that are returned for Get/Delete RPC calls
for VolumeGroup/VolumeGroupSnapshot.
Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
(cherry picked from commit 18a62ec9de
)
This commit is contained in:
committed by
mergify[bot]
parent
09e298197e
commit
e7f5b8a28f
@ -172,6 +172,12 @@ func NewVolumeGroupOptionsFromID(
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
if groupAttributes.GroupName == "" {
|
||||
log.ErrorLog(ctx, "volume group snapshot with id %v not found", volumeGroupSnapshotID)
|
||||
|
||||
return nil, nil, cerrors.ErrGroupNotFound
|
||||
}
|
||||
|
||||
vgs.RequestName = groupAttributes.RequestName
|
||||
vgs.FsVolumeGroupSnapshotName = groupAttributes.GroupName
|
||||
vgs.VolumeGroupSnapshotID = volumeGroupSnapshotID
|
||||
|
Reference in New Issue
Block a user