Revision 9d276e93 lib/cmdlib/node.py
b/lib/cmdlib/node.py | ||
---|---|---|
45 | 45 |
CheckInstanceState, INSTANCE_DOWN, GetUpdatedParams, \ |
46 | 46 |
AdjustCandidatePool, CheckIAllocatorOrNode, LoadNodeEvacResult, \ |
47 | 47 |
GetWantedNodes, MapInstanceLvsToNodes, RunPostHook, \ |
48 |
FindFaultyInstanceDisks |
|
48 |
FindFaultyInstanceDisks, CheckStorageTypeEnabled
|
|
49 | 49 |
|
50 | 50 |
|
51 | 51 |
def _DecideSelfPromotion(lu, exceptions=None): |
... | ... | |
1130 | 1130 |
(storage_type, list(diff)), |
1131 | 1131 |
errors.ECODE_INVAL) |
1132 | 1132 |
|
1133 |
def CheckPrereq(self): |
|
1134 |
"""Check prerequisites. |
|
1135 |
|
|
1136 |
""" |
|
1137 |
CheckStorageTypeEnabled(self.cfg.GetClusterInfo(), self.op.storage_type) |
|
1138 |
|
|
1133 | 1139 |
def ExpandNames(self): |
1134 | 1140 |
self.needed_locks = { |
1135 | 1141 |
locking.LEVEL_NODE: self.op.node_uuid, |
... | ... | |
1386 | 1392 |
locking.LEVEL_NODE_ALLOC: locking.ALL_SET, |
1387 | 1393 |
} |
1388 | 1394 |
|
1395 |
def CheckPrereq(self): |
|
1396 |
"""Check prerequisites. |
|
1397 |
|
|
1398 |
""" |
|
1399 |
CheckStorageTypeEnabled(self.cfg.GetClusterInfo(), self.op.storage_type) |
|
1400 |
|
|
1389 | 1401 |
def Exec(self, feedback_fn): |
1390 | 1402 |
"""Computes the list of nodes and their attributes. |
1391 | 1403 |
|
... | ... | |
1588 | 1600 |
"""Check prerequisites. |
1589 | 1601 |
|
1590 | 1602 |
""" |
1603 |
CheckStorageTypeEnabled(self.cfg.GetClusterInfo(), self.op.storage_type) |
|
1604 |
|
|
1591 | 1605 |
# Check whether any instance on this node has faulty disks |
1592 | 1606 |
for inst in _GetNodeInstances(self.cfg, self.op.node_uuid): |
1593 | 1607 |
if not inst.disks_active: |
Also available in: Unified diff