The purpose of this small library is to manage locking for ganeti
clusters in a central place, while at the same time doing dynamic checks
against possible deadlocks. It will also make it easier to transition to
a different lock type should we migrate away from python threads.
|
__init__(self,
nodes=None,
instances=None)
Constructs a new GanetiLockManager object. |
source code
|
|
|
|
|
|
|
_is_owned(self,
level)
Check whether we are owning locks at the given level |
source code
|
|
|
is_owned(self,
level)
Check whether we are owning locks at the given level |
source code
|
|
|
_list_owned(self,
level)
Get the set of owned locks at the given level |
source code
|
|
|
_upper_owned(self,
level)
Check that we don't own any lock at a level greater than the given
one. |
source code
|
|
|
|
|
acquire(self,
level,
names,
timeout=None,
shared=0)
Acquire a set of resource locks, at the same level. |
source code
|
|
|
release(self,
level,
names=None)
Release a set of resource locks, at the same level. |
source code
|
|
|
add(self,
level,
names,
acquired=0,
shared=0)
Add locks at the specified level. |
source code
|
|
|
|