-
Notifications
You must be signed in to change notification settings - Fork 383
Description
Reusing existing gRPC status codes leads to ambiguities for the CO. RESOURCE_EXHAUSTED can be returned by the gRPC transport layer, for example when message sizes are exceeded.
Therefore a CO which gets that error cannot be sure whether it was the driver which returned that status. For example, a CreateVolume call is specified as returning RESOURCE_EXHAUSTED when space is exhausted in a certain topology. The right reaction by the CO then is to try elsewhere. But if the error came from the transport layer, then the CO has to try again with larger message sizes.
In the worst case, CreateVolumeRequest went through and CreateVolumeResponse didn't. Treating this like "space exhausted" leaks a volume.
Pointed out by @jsafrane in kubernetes-csi/external-provisioner#405 (comment).