From dab4db3369f52e41595202ae55d918041f3964a9 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 25 Jun 2026 15:21:32 +0200 Subject: [PATCH] reclaimspace: Add UNIMPLEMENTED error code to prevent retrying The filesystem may not support fstrim, or the block-device may lack support for DISCARD operations. In these cases there is no need to retry unless there was an update of some component that could add support for space reclaiming. Signed-off-by: Niels de Vos --- reclaimspace/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reclaimspace/README.md b/reclaimspace/README.md index a833bef..3b67058 100644 --- a/reclaimspace/README.md +++ b/reclaimspace/README.md @@ -110,6 +110,7 @@ message StorageConsumption { | Missing required field | 3 INVALID_ARGUMENT | Indicates that a required field is missing from the request. | Caller MUST fix the request by adding the missing required field before retrying. | | Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | | Operation pending for volume | 10 ABORTED | Indicates that there is already an operation pending for the specified `volume_id`. In general the CSI-Addons CO plugin is responsible for ensuring that there is no more than one call "in-flight" per `volume_id` at a given time. However, in some circumstances, the CSI-Addons CO plugin MAY lose state (for example when the it crashes and restarts), and MAY issue multiple calls simultaneously for the same `volume_id`. The CSI-driver, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified `volume_id`, and then retry with exponential back off. | +| Operation not supported | 12 UNIMPLEMENTED | Indicates that the operation is not supported. The filesystem may not support fstrim, or the block-device may lack support for DISCARD operations. | Caller MUST NOT retry the request as the underlying storage does not support space reclamation. | | Not authenticated | 16 UNAUTHENTICATED | The invoked RPC does not carry secrets that are valid for authentication. | Caller SHALL either fix the secrets provided in the RPC, or otherwise regalvanize said secrets such that they will pass authentication by the Plugin for the attempted RPC, after which point the caller MAY retry the attempted RPC. | | Error is Unknown | 2 UNKNOWN | Indicates that a unknown error is generated | Caller MUST study the logs before retrying | @@ -176,5 +177,6 @@ message NodeReclaimSpaceResponse { | Missing required field | 3 INVALID_ARGUMENT | Indicates that a required field is missing from the request. | Caller MUST fix the request by adding the missing required field before retrying. | | Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. | | Operation pending for volume | 10 ABORTED | Indicates that there is already an operation pending for the specified `volume_id`. In general the CSI-Addons CO plugin is responsible for ensuring that there is no more than one call "in-flight" per `volume_id` at a given time. However, in some circumstances, the CSI-Addons CO plugin MAY lose state (for example when the it crashes and restarts), and MAY issue multiple calls simultaneously for the same `volume_id`. The CSI-driver, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified `volume_id`, and then retry with exponential back off. | +| Operation not supported | 12 UNIMPLEMENTED | Indicates that the operation is not supported. The filesystem may not support fstrim, or the block-device may lack support for DISCARD operations. | Caller MUST NOT retry the request as the underlying storage does not support space reclamation. | | Not authenticated | 16 UNAUTHENTICATED | The invoked RPC does not carry secrets that are valid for authentication. | Caller SHALL either fix the secrets provided in the RPC, or otherwise regalvanize said secrets such that they will pass authentication by the Plugin for the attempted RPC, after which point the caller MAY retry the attempted RPC. | | Error is Unknown | 2 UNKNOWN | Indicates that a unknown error is generated | Caller MUST study the logs before retrying |