Commit ed97d401 authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Add a passive class for representing inherited live-locks

Since job processes inherit their live-lock files from the master
process, they don't directly work with the file, they just need to use
the name.

This class exposes the same interface as LiveLock for such pre-created
Signed-off-by: default avatarPetr Pudlak <>
Reviewed-by: default avatarKlaus Aehlig <>
parent 14d4d2f9
......@@ -34,6 +34,20 @@ from ganeti.utils.algo import NiceSort
from ganeti import pathutils
class LiveLockName(object):
def __init__(self, name):
self._name = name
def GetPath(self):
return self._name
def close(self):
"""Clean up the lockfile.
class LiveLock(object):
"""Utility for a lockfile needed to request resources from WconfD.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment