-
Notifications
You must be signed in to change notification settings - Fork 95
Synchronise disklib operations in kvESX, add threadutils module. #708
Conversation
…nchronize disklib operations. kvESX: Fix Indentation and etc kvESX: Move comments to module and functions docstring kvESX: Remove unused c_void_p import
I cleaned up the testbed before the test run failed. The relevant bit from the test log
The file is still present on disk
|
@kerneltime can we get a ps -ef on the ESX running the CI On Mon, Nov 7, 2016 at 11:05 AM, Ritesh H Shukla notifications@github.com
|
@kerneltime We can make removeVMDK retryable for this error. (i think this will be the last case of this situation). I'll make a patch.
|
With the retryable removeVMDK, while trying to remove a externally opened vmdk file (with less) and closing.
Leaving it open:
|
threadutils.LockManager: add list_locks() threadutils.LockManager: return within self._lock scope in get_lock
…is a workaround***
@kerneltime |
The vmkfs -U command will unlink all volume associated files but the busy one. After the first removeVMDK failure we will have a vmdk file without the flat and the vmdf files so the subsequent errors. |
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 but the new threadutils code could use a block comment saying how the interfaces defined there must be used in other modules.
The code looks good. I like threadutils and the way decorator is defined and used - very clear.
//CC @brunotm @kerneltime |
@govint |
If we don't serialize, we'll need a loaded lib by thread similar to the SQLite situation. As soon as we pass the dhandle for operation from a request thread we've crossed the boundaries. I really prefer the general locking approach for now.
Right now they'll be serialized in the lifetime of a request but an op (mainly create/delete) are a composition of them, for that we'll need a higher level lock and remember the plugin intention with some kind of id and state. I have some ideas for that and can propose something as soon as I have time. |
I'm replying from the phone, sorry for the brevity. |
@brunotm - good point about crossing the boundaries on passing to the op. //CC @kerneltime |
Fixes #626 |
Synchronise disklib operations in kvESX, fix indentation and misc.
Moved threading code to utils/threadutils.
Added threadutils.LockManager class
Added threadutils.get_lock_decorator
And misc.
//CC @msterin
Closing #698 in favor of this.