Skip to content
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

Add env variable for gocsi lock contention #665

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

RaunakShah
Copy link
Contributor

What this PR does / why we need it:
This PR adds a gocsi env variable that helps avoid a lock contention scenario for same volume id.

Currently, all gocsi callbacks use the same lock for a volumeID to serialize operations. If a particular thread fails to acquire the lock, it immediately returns an error Aborted, pending. By adding this env variable, that thread will attempt to acquire the lock for 3 minutes before returning. If the thread that holds the lock releases it in this time, the second thread will continue processing.

Logs to prove lock contention exists and how adding this parameter solves it - https://gist.github.com/RaunakShah/e252aea6e81f1852983e032a0b28e16a

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

Add env variable to handle gocsi lock contention

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 23, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 23, 2021
@divyenpatel
Copy link
Member

@RaunakShah Can you fix the commit history for this PR?

@RaunakShah
Copy link
Contributor Author

jtest block-vanilla

@RaunakShah
Copy link
Contributor Author

jtest file-vanilla

@svcbot-qecnsdp
Copy link

Started Vanilla block pipeline...

@svcbot-qecnsdp
Copy link

Started vanilla file pipeline...

Copy link
Member

@divyenpatel divyenpatel left a comment

Choose a reason for hiding this comment

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

/approve

@SandeepPissay
Copy link
Contributor

@RaunakShah After the E2E test run, can you check if the pipeline used the yaml as per this PR?

@svcbot-qecnsdp
Copy link

Block vanilla build status: FAILURE 
Stage before exit: testbed-deploy 

@svcbot-qecnsdp
Copy link

Started Vanilla block pipeline...

@svcbot-qecnsdp
Copy link

File vanilla build status: FAILURE 
Stage before exit: testbed-deploy 

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 23, 2021
@svcbot-qecnsdp
Copy link

Started vanilla file pipeline...

@svcbot-qecnsdp
Copy link

File vanilla build status: FAILURE 
Stage before exit: testbed-deploy 

@svcbot-qecnsdp
Copy link

Started vanilla file pipeline...

@svcbot-qecnsdp
Copy link

Block vanilla build status: FAILURE 
Stage before exit: e2e-tests 
Jenkins E2E Test Results: 
Ran 40 of 165 Specs in 9214.414 seconds
FAIL! -- 38 Passed | 2 Failed | 0 Pending | 125 Skipped
--- FAIL: TestE2E (9214.44s)
FAIL

Ginkgo ran 1 suite in 2h34m24.166490559s
Test Suite Failed
make: Leaving directory `/home/worker/workspace/github-csi-block-vanilla@2/Results/324/vsphere-csi-driver`

@svcbot-qecnsdp
Copy link

File vanilla build status: FAILURE 
Stage before exit: e2e-tests 
Jenkins E2E Test Results: 
Ran 25 of 165 Specs in 7163.867 seconds
FAIL! -- 3 Passed | 22 Failed | 0 Pending | 140 Skipped
--- FAIL: TestE2E (7163.90s)
FAIL

Ginkgo ran 1 suite in 2h0m20.696384205s
Test Suite Failed
make: Leaving directory `/home/worker/workspace/github-csi-file-vanilla/Results/187/vsphere-csi-driver`

@svcbot-qecnsdp
Copy link

Started vanilla file pipeline...

@svcbot-qecnsdp
Copy link

File vanilla build status: SUCCESS 
Stage before exit: finally 
Jenkins E2E Test Results: 

Ran 25 of 165 Specs in 2869.431 seconds
SUCCESS! -- 25 Passed | 0 Failed | 0 Pending | 140 Skipped
PASS

Ginkgo ran 1 suite in 48m12.704767914s
Test Suite Passed
make: Leaving directory `/home/worker/workspace/github-csi-file-vanilla/Results/189/vsphere-csi-driver`

@divyenpatel
Copy link
Member

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: divyenpatel, RaunakShah

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:
  • OWNERS [RaunakShah,divyenpatel]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants