Skip to content

return an error if the volume ID already in use #303

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

Merged

Conversation

hantaowang
Copy link

@hantaowang hantaowang commented Jun 15, 2019

An alternate approach to #302, but just returns an error if it finds that another operation with that volume ID already exists.

Operations in the node driver are now parallelized, except those involving a volume already being operated on now return an error.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 15, 2019
@k8s-ci-robot k8s-ci-robot requested review from msau42 and verult June 15, 2019 00:38
@k8s-ci-robot
Copy link
Contributor

Hi @hantaowang. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 15, 2019
@verult
Copy link
Contributor

verult commented Jun 15, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 15, 2019
@hantaowang
Copy link
Author

/assign @davidz627

@msau42
Copy link
Contributor

msau42 commented Jun 18, 2019

I like this approach. The only enhancement I can think of is hung/long operation detection. We may want to track operation start time, and log a message/metric if some operation is taking too long.

Copy link
Contributor

@davidz627 davidz627 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change will. I like this approach, just some small comments

@davidz627
Copy link
Contributor

I like this approach. The only enhancement I can think of is hung/long operation detection. We may want to track operation start time, and log a message/metric if some operation is taking too long.

@hantaowang can you create an Issue on the driver for this. We can do it as a follow up but it doesn't need to be a part of this PR

@hantaowang
Copy link
Author

I like this approach. The only enhancement I can think of is hung/long operation detection. We may want to track operation start time, and log a message/metric if some operation is taking too long.

@hantaowang can you create an Issue on the driver for this. We can do it as a follow up but it doesn't need to be a part of this PR

Is this issue that @msau42 created the same one?

@msau42
Copy link
Contributor

msau42 commented Jun 20, 2019

I think specifically an issue for hung/long operation detection

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 20, 2019
Copy link
Contributor

@davidz627 davidz627 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly LGTM. Just some naming changes and one possible goroutine go testing quirk

go runRequestInBackground(vol2PublishTargetCReq)

// Check that vol2PublishTargetCReq is able to run
<-opStarted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the case that vol2PublishTargetCReq is actually unable to run and fails for whatever reason won't this block forever?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it so that failures should not block anymore.

<-opStarted

// Allow both operations to complete
okToTest <- struct{}{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see now this is more like runMountToComplete or continueMountOp would renaming it be appropriate?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the new names if they are better.

@hantaowang hantaowang force-pushed the error-on-concurrent-vol branch 2 times, most recently from 6b58903 to 1b6dfb8 Compare June 21, 2019 00:04
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 21, 2019
@hantaowang hantaowang force-pushed the error-on-concurrent-vol branch from 70065c4 to 97d3465 Compare June 21, 2019 18:11
@davidz627
Copy link
Contributor

/assign @jingxu97
please review

@hantaowang
Copy link
Author

/test pull-gcp-compute-persistent-disk-csi-driver-sanity

@davidz627
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 24, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidz627, hantaowang

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2019
@k8s-ci-robot k8s-ci-robot merged commit 64fecda into kubernetes-sigs:master Jun 24, 2019
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 24, 2019
@davidz627
Copy link
Contributor

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants