yunify / qingcloud-csi

Kubernetes volume plugin based on CSI specification which support block storage of qingcloud
Apache License 2.0
36 stars 22 forks source link

Change default detach retry limit to 100 & enable unlimit option #185

Closed dkeven closed 2 years ago

dkeven commented 2 years ago

Signed-off-by: dkeven keven@kubesphere.io

What type of PR is this? /kind improvement

What this PR does / why we need it: Currently, the detaching retry limiter(added in https://github.com/yunify/qingcloud-csi/pull/160) will block any further detaching operation for a specific volume if this volume has more than --retry-times-max(defaults to 10) failed detaching operations recorded in the limiter.

But very often, when the cause of the failing detachments is fixed or self-recovered, the retry times have already exceeded the maxium, and since the retry times are stored in a map and never reset, this leaves the detaching of the volume blocked forever.

This PR:

  1. Renames the ambiguous --retry-times-max option to --retry-detach-times-max.
  2. Change the default retry times limit of detaching to 100.
  3. Allows users to lift the retry times limit of detaching completely, by setting the --retry-detach-times-max to 0.

Which issue(s) this PR fixes:

Fixes https://github.com/yunify/qingcloud-csi/issues/184