git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5ecb692
)
File locking isn't exclusive in the same process across threads. Switched to regular...
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Fri, 4 Apr 2008 19:44:34 +0000
(19:44 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Fri, 4 Apr 2008 19:44:34 +0000
(19:44 +0000)
sliver_vs.py
patch
|
blob
|
history
diff --git
a/sliver_vs.py
b/sliver_vs.py
index
13ff990
..
3060b9f
100644
(file)
--- a/
sliver_vs.py
+++ b/
sliver_vs.py
@@
-24,6
+24,9
@@
import vserver
import accounts
import logger
import tools
import accounts
import logger
import tools
+from threading import BoundedSemaphore
+
+globalsem = BoundedSemaphore()
# special constant that tells vserver to keep its existing settings
KEEP_LIMIT = vserver.VC_LIM_KEEP
# special constant that tells vserver to keep its existing settings
KEEP_LIMIT = vserver.VC_LIM_KEEP
@@
-42,7
+45,7
@@
class Sliver_VS(accounts.Account, vserver.VServer):
SHELL = '/bin/vsh'
TYPE = 'sliver.VServer'
SHELL = '/bin/vsh'
TYPE = 'sliver.VServer'
- _init_disk_info_sem =
tools.NMLock("/var/run/nm-disk-info.lock")
+ _init_disk_info_sem =
globalsem
def __init__(self, rec):
logger.verbose ('initing Sliver_VS with name=%s'%rec['name'])
def __init__(self, rec):
logger.verbose ('initing Sliver_VS with name=%s'%rec['name'])