lvutil: Remove SR lock during thin attach/detach#648
Open
benjamreis wants to merge 1 commit intoxapi-project:masterfrom
Open
lvutil: Remove SR lock during thin attach/detach#648benjamreis wants to merge 1 commit intoxapi-project:masterfrom
benjamreis wants to merge 1 commit intoxapi-project:masterfrom
Conversation
This lock is normally useless and can create a dead lock when thin mode is activated: - A task try to deactivate a volume during a VM shutdown on a slave (so a VDI A is locked). Then a new task is created on the master host, we try to get the SR lock on the master. - In parallel a tap-pause is asked from the master to the slave, the master SR lock is now locked. The tap-pause request is received on the slave, but we can't lock VDI A because it's already locked. So to resume: a dead lock is only possible if we try to shutdown a VM with a particular VDI and if we try to snapshot it in the same time. Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
Contributor
Author
|
It is an issue we found out on our Linstor driver that also applies to this one. Unless the lock is necessary to activate the LVM cache, in this case we can re add it only for the cache. |
Contributor
This sounds like the solution would be for the initiating process on the coordinator to hold a lock on the VDI whilst performing these operations and not permit the detach and snapshot operations to occur in parallel, that sounds like an unending recipe for edge cases. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This lock is normally useless and can create a dead lock when thin mode is activated:
So to summarize: a dead lock is only possible if we try to shutdown a VM with a particular VDI and if we try to snapshot it in the same time.