-
Notifications
You must be signed in to change notification settings - Fork 807
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
Request coalescing for resizing and modifying volume #1676
Conversation
Skipping CI for Draft Pull Request. |
784ee35
to
427b0ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
A couple of comment nits, and one potential locking issue.
} | ||
|
||
func (h *modifyVolumeRequestHandler) mergeModifyVolumeRequest(r *modifyVolumeRequest) { | ||
h.mux.Lock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validateModifyVolumeRequest and mergeModifyVolumeRequest need to happen in the same lock-context, otherwise you create a window where an incompatible request can race in after the validate, but before the merge, and we won't notice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. See the latest addModifyVolumeRequest
and startVolumeTimer
methods.
@wmesard: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This revision largely lgtm, left a few comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top level comments (some of these I'm sure are obvious, but for the sake of the review):
- Needs the issues with
make test
andmake verify
fixed - Needs unit tests written for the feature
- Otherwise, largely good, but one major deadlock possible (see individual comments)
9a9ffe0
to
d5ab6f1
Compare
419689d
to
6dd1e9a
Compare
6bd42fb
to
167cbc4
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
167cbc4
to
e918be5
Compare
Signed-off-by: Hanyue Liang <hanliang@amazon.com>
e918be5
to
3705632
Compare
@hanyuel: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/test pull-aws-ebs-csi-driver-external-test |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hanyuel /lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: torredil The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Is this a bug fix or adding new feature?
New feature
What is this PR about? / Why do we need it?
One restriction of the volume modification support provided by EBS CSI Driver is that if a user updates both annotations and capacity of a PVC at the same time, it will result in 2 RPC calls from
external-resizer
andvolume-modifier
sidecars to the CSI Driver, and only one of the them will succeed due to the 6-hour cool down period for EBS ModifyVolume.This PR solves that problem by implementing the Request Coalescing feature in EBS CSI Driver that merges RPC requests from
externa-resizer
andvolume-modifier
sidecars.What testing is done?
New unit tests &&
make test
andmake verify
pass.Built and Deployed a CSI Driver image with the changes in this PR.
kubectl describe pvc ebs-claim
kubectl edit
.csi controller logs:
resizer sidecar logs:
volume-modifier sidecar logs: