This PR gets rid of these logic, making the code more clean and the api-call-chain more straight-forward.
Note that the retry loop of waiting for a volume attachment is not removed:
https://github.com/yunify/qingcloud-csi/blob/4971d80f9effd8eb0a25f8c6d2fbb2ade07277f1/pkg/disk/rpcserver/controllerserver.go#L502-L517
It differs from the other retries in that it uses a default backoff time rather than the passed in option, and it's a post-check instead of an actual CSI operation, because it may take some time after the volume is attached and before the attached volume gets a device path in the node, and when it fails to get one, the ControllerServer issues a detach request to try to reset the operation.
Signed-off-by: dkeven keven@kubesphere.io
What type of PR is this? /kind cleanup
What this PR does / why we need it: The
ControllerServer
of qingcloud-csi uses exponential backoff retry sometimes when calling IAAS API, like this one: https://github.com/yunify/qingcloud-csi/blob/4971d80f9effd8eb0a25f8c6d2fbb2ade07277f1/pkg/disk/rpcserver/controllerserver.go#L400-L409 This is somewhat redundant since the CSI sidecars invoking theControllerServer
RPC interfaces have already implemented exponential backoff.This PR gets rid of these logic, making the code more clean and the api-call-chain more straight-forward.
Note that the retry loop of waiting for a volume attachment is not removed: https://github.com/yunify/qingcloud-csi/blob/4971d80f9effd8eb0a25f8c6d2fbb2ade07277f1/pkg/disk/rpcserver/controllerserver.go#L502-L517 It differs from the other retries in that it uses a default backoff time rather than the passed in option, and it's a post-check instead of an actual CSI operation, because it may take some time after the volume is attached and before the attached volume gets a device path in the node, and when it fails to get one, the
ControllerServer
issues a detach request to try to reset the operation.Which issue(s) this PR fixes:
Fixes https://github.com/yunify/qingcloud-csi/issues/184