diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 7ffdc8996331470543482af1e095395c4e4eef88..038f5a27a3adf6b647b091e0a17a5294cb8fc5ab 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -56,7 +56,6 @@ class LogicalUnit(object): - redefine HPATH and HTYPE - optionally redefine their run requirements: REQ_MASTER: the LU needs to run on the master node - REQ_WSSTORE: the LU needs a writable SimpleStore REQ_BGL: the LU needs to hold the Big Ganeti Lock exclusively Note that all commands require root permissions. @@ -66,10 +65,9 @@ class LogicalUnit(object): HTYPE = None _OP_REQP = [] REQ_MASTER = True - REQ_WSSTORE = False REQ_BGL = True - def __init__(self, processor, op, context, sstore): + def __init__(self, processor, op, context): """Constructor for LogicalUnit. This needs to be overriden in derived classes in order to check op @@ -79,7 +77,6 @@ class LogicalUnit(object): self.proc = processor self.op = op self.cfg = context.cfg - self.sstore = sstore self.context = context # Dicts used to declare locking needs to mcpu self.needed_locks = None diff --git a/lib/mcpu.py b/lib/mcpu.py index 7b65252cf9e77554380026b8b4d93c8e051f36ce..2f60fd7c27e82e73f46c2f718844cd965a95ad60 100644 --- a/lib/mcpu.py +++ b/lib/mcpu.py @@ -34,7 +34,6 @@ from ganeti import constants from ganeti import errors from ganeti import rpc from ganeti import cmdlib -from ganeti import ssconf from ganeti import logger from ganeti import locking @@ -187,18 +186,13 @@ class Processor(object): if lu_class is None: raise errors.OpCodeUnknown("Unknown opcode") - if lu_class.REQ_WSSTORE: - sstore = ssconf.WritableSimpleStore() - else: - sstore = ssconf.SimpleStore() - # Acquire the Big Ganeti Lock exclusively if this LU requires it, and in a # shared fashion otherwise (to prevent concurrent run with an exclusive LU. self.context.glm.acquire(locking.LEVEL_CLUSTER, [locking.BGL], shared=not lu_class.REQ_BGL) try: self.exclusive_BGL = lu_class.REQ_BGL - lu = lu_class(self, op, self.context, sstore) + lu = lu_class(self, op, self.context) lu.ExpandNames() assert lu.needed_locks is not None, "needed_locks not set by LU" result = self._LockAndExecLU(lu, locking.LEVEL_INSTANCE)