-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated cherry pick of #34859 #35883 upstream release 1.4 #36683
Automated cherry pick of #34859 #35883 upstream release 1.4 #36683
Conversation
At master volume reconciler, the information about which volumes are attached to nodes is cached in actual state of world. However, this information might be out of date in case that node is terminated (volume is detached automatically). In this situation, reconciler assume volume is still attached and will not issue attach operation when node comes back. Pods created on those nodes will fail to mount. This PR adds the logic to periodically sync up the truth for attached volumes kept in the actual state cache. If the volume is no longer attached to the node, the actual state will be updated to reflect the truth. In turn, reconciler will take actions if needed. To avoid issuing many concurrent operations on cloud provider, this PR tries to add batch operation to check whether a list of volumes are attached to the node instead of one request per volume. More details are explained in PR kubernetes#33760
We are more liberal in what we accept as a volume id in k8s, and indeed we ourselves generate names that look like `aws://<zone>/<id>` for dynamic volumes. This volume id (hereafter a KubernetesVolumeID) cannot directly be compared to an AWS volume ID (hereafter an awsVolumeID). We introduce types for each, to prevent accidental comparison or confusion. Issue kubernetes#35746
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
thanks! |
tests are all green merging |
Commit found in the "release-1.4" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
…ck-of-#34859-kubernetes#35883-upstream-release-1.4 Automated cherry pick of kubernetes#34859 kubernetes#35883 upstream release 1.4
Identical to #36676 except fixing merge issue with
pkg/volume/aws_ebs/vim attacher_test.go
Cherry pick of #34859 #35883 on release-1.4.
#34859: Add sync state loop in master's volume reconciler
#35883: AWS: strong-typing for k8s vs aws volume ids
This change is