Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/driver/controller_modify_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ func executeModifyVolumeRequest(c cloud.Cloud) func(string, modifyVolumeRequest)
if err != nil {
switch {
case errors.Is(err, cloud.ErrInvalidArgument):
// Returning Internal error instead of InvaliArgument because at this point any tag modifications have succeeded.
// It would not be correct to return an error that is considered infeasible by the resizer if the volume was already modified in any way.
if len(req.modifyTagsOptions.TagsToAdd) > 0 || len(req.modifyTagsOptions.TagsToDelete) > 0 {
return 0, status.Errorf(codes.Internal, "Could not modify volume (invalid argument) %q: %v", volumeID, err)
}
return 0, status.Errorf(codes.InvalidArgument, "Could not modify volume (invalid argument) %q: %v", volumeID, err)
case errors.Is(err, cloud.ErrNotFound):
return 0, status.Errorf(codes.NotFound, "Could not modify volume (not found) %q: %v", volumeID, err)
Expand Down
Loading