diff --git a/pkg/driver/controller_modify_volume.go b/pkg/driver/controller_modify_volume.go index 7c622c536a..6418e7c43d 100644 --- a/pkg/driver/controller_modify_volume.go +++ b/pkg/driver/controller_modify_volume.go @@ -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)