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
2.5 and older series has locking related issues #2155
Comments
|
cc: @gohilankit |
|
/assign @gohilankit |
|
The other thing that seems to be problematic is following bit of code: See the So what happens to the functions which are still using "older" pointer. Because they are no locks, there are no guarantees about what they will see. |
|
/assign @skogta |
|
@divyenpatel: GitHub didn't allow me to assign the following users: skogta. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. 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. |
|
@divyenpatel @skogta yep sure. thank you. |
|
@gnufied please review the PR: #2252 Please note that this PR solves only part of the problem - that is, for the public connect method. For other places, we will need a more elaborate solution as we are using Most likely it should not be a problem as per an experiment that i conducted. Before using vc.Client.Client, I did a logout on the VC. With this vc.Client.Client, I was able to create a new client successfully using method NewCnsClient |
|
@gnufied if we move clientMutex lock to public VC Connect method from private VC connect method then we don't need any change in the |
|
@divyenpatel yeah I took a look. It seems much more reasonable now. I think for now we can close this issue. thanks! |
I have been reading the driver code and it appears that, older version of driver at least has locking related issues.
Older version of driver uses rexray - https://github.com/rexray/gocsi which allows per-volumeid or per-volumename based locks, but some operations inside control-plane of driver are global and hence should be protected by global lock.
For example following bit of code:
IMO the entire function needs to be locked, rather than just the private
connectfunction, because ifconnectfails for some reason by 1 goroutine and another goroutine it succeeds, then logout should use the right session. Without locks I am not sure what would happen.Then functions like:
Should also have locks IMO because
connectfunction can overrwrite thevc.Clientvariable at any time whileListDataCentersis executing and hence another goroutine won't see latest value.I see that latest version has removed
rexray, but we should still double check if all the locking logic is sound.The text was updated successfully, but these errors were encountered: