kubernetes/pkg/controller
Jing Xu 69b9f9b1f0 Fix issue in node status updating VolumeAttached list
During volume detach, the following might happen in reconciler

1. Pod is deleting
2. remove volume from reportedAsAttached, so node status updater will
update volumeAttached list
3. detach failed due to some issue
4. volume is added back in reportedAsAttached
5. reconciler loops again the volume, remove volume from
reportedAsAttached
6. detach will not be trigged because exponential back off, detach call
will fail with exponential backoff error
7. another pod is added which using the same volume on the same node
8. reconciler loops and it will NOT try to tigger detach anymore

At this point, volume is still attached and in actual state, but
volumeAttached list in node status does not has this volume anymore, and
will block volume mount from kubelet.

The fix in first round is to add volume back into the volume list that
need to reported as attached at step 6 when detach call failed with
error (exponentical backoff). However this might has some performance
issue if detach fail for a while. During this time, volume will be keep
removing/adding back to node status which will cause a surge of API
calls.

So we changed to logic to check first whether operation is safe to retry which
means no pending operation or it is not in exponentical backoff time
period before calling detach. This way we can avoid keep removing/adding
volume from node status.

Change-Id: I5d4e760c880d72937d34b9d3e904ecad125f802e
2021-10-05 09:44:35 -07:00
..
apis/config Change defaulter-gen input to package path 2021-08-14 11:00:18 -04:00
bootstrap hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
certificates Make CSR cleaner tolerate objects with invalid status.certificate 2021-07-21 10:35:17 -04:00
clusterroleaggregation Migrate clusterroleaggregation controller to apply 2021-03-09 07:15:14 -08:00
cronjob Merge pull request #102642 from alaypatel07/lastSuccessfulTime 2021-06-15 11:31:35 -07:00
daemon fix typo for daemon_controller_test.go 2021-06-28 04:54:09 -07:00
deployment podUnknown is marked as Obsolete 2021-04-06 22:43:08 +00:00
disruption [disruptioncontroller] Don't error for unmanaged pods 2021-07-07 10:42:24 -04:00
endpoint Fix typo in comment in endpoints_controller 2021-07-18 21:56:34 +09:00
endpointslice Merge pull request #99997 from JornShen/extract_ep_and_epm_share_code_to_pkg 2021-07-05 13:25:38 -07:00
endpointslicemirroring run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
garbagecollector hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
history hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
job Revert counting deleted pods as failures for Job 2021-07-14 10:03:20 -04:00
namespace hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
nodeipam run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
nodelifecycle Merge pull request #97818 from damemi/remove-util-node-dep 2021-03-05 04:06:32 -08:00
podautoscaler Remove legacy metrics client from podautoscaler 2021-06-04 23:06:32 +02:00
podgc hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
replicaset Promote LogarithmicScaleDown to beta 2021-07-06 09:58:03 -04:00
replication Remove unused util CreatePods 2021-05-20 20:27:21 +00:00
resourcequota hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
serviceaccount Update auth OWNERS files to only use aliases 2021-04-07 10:46:03 -04:00
statefulset Merge pull request #101316 from ravisantoshgudimetla/add-minReadySeconds-impl 2021-06-15 13:41:43 -07:00
storageversiongc hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
testutil Track Job Pods completion in status 2021-07-08 17:48:05 +00:00
ttl hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
ttlafterfinished hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
util extract same code of es and esm to pkg 2021-05-14 15:15:35 +08:00
volume Fix issue in node status updating VolumeAttached list 2021-10-05 09:44:35 -07:00
controller_ref_manager_test.go Track Job Pods completion in status 2021-07-08 17:48:05 +00:00
controller_ref_manager.go Track Job Pods completion in status 2021-07-08 17:48:05 +00:00
controller_utils_test.go Remove unused util CreatePods 2021-05-20 20:27:21 +00:00
controller_utils.go Remove unused util CreatePods 2021-05-20 20:27:21 +00:00
doc.go
lookup_cache.go
OWNERS add myself as reviewer in pkg/controller/OWNERS 2021-01-15 17:21:35 -05:00