sstore is no longer used in LUs.
---
lib/cmdlib.py | 5 +----
lib/mcpu.py | 8 +-------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 43dd114..8c8ec6f 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 7b65252..2f60fd7 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)
--
1.6.0.2