Revision 0b38cf6e lib/mcpu.py

b/lib/mcpu.py
34 34
from ganeti import errors
35 35
from ganeti import rpc
36 36
from ganeti import cmdlib
37
from ganeti import ssconf
38 37
from ganeti import logger
39 38
from ganeti import locking
40 39

  
......
187 186
    if lu_class is None:
188 187
      raise errors.OpCodeUnknown("Unknown opcode")
189 188

  
190
    if lu_class.REQ_WSSTORE:
191
      sstore = ssconf.WritableSimpleStore()
192
    else:
193
      sstore = ssconf.SimpleStore()
194

  
195 189
    # Acquire the Big Ganeti Lock exclusively if this LU requires it, and in a
196 190
    # shared fashion otherwise (to prevent concurrent run with an exclusive LU.
197 191
    self.context.glm.acquire(locking.LEVEL_CLUSTER, [locking.BGL],
198 192
                             shared=not lu_class.REQ_BGL)
199 193
    try:
200 194
      self.exclusive_BGL = lu_class.REQ_BGL
201
      lu = lu_class(self, op, self.context, sstore)
195
      lu = lu_class(self, op, self.context)
202 196
      lu.ExpandNames()
203 197
      assert lu.needed_locks is not None, "needed_locks not set by LU"
204 198
      result = self._LockAndExecLU(lu, locking.LEVEL_INSTANCE)

Also available in: Unified diff