Revision a3de2ae7 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
1554 | 1554 |
node_current) |
1555 | 1555 |
|
1556 | 1556 |
for node, n_img in node_image.items(): |
1557 |
if (not node == node_current):
|
|
1557 |
if node != node_current:
|
|
1558 | 1558 |
test = instance in n_img.instances |
1559 | 1559 |
_ErrorIf(test, self.EINSTANCEWRONGNODE, instance, |
1560 | 1560 |
"instance should not run on node %s", node) |
... | ... | |
1564 | 1564 |
for idx, (success, status) in enumerate(disks)] |
1565 | 1565 |
|
1566 | 1566 |
for nname, success, bdev_status, idx in diskdata: |
1567 |
_ErrorIf(instanceconfig.admin_up and not success, |
|
1567 |
# the 'ghost node' construction in Exec() ensures that we have a |
|
1568 |
# node here |
|
1569 |
snode = node_image[nname] |
|
1570 |
bad_snode = snode.ghost or snode.offline |
|
1571 |
_ErrorIf(instanceconfig.admin_up and not success and not bad_snode, |
|
1568 | 1572 |
self.EINSTANCEFAULTYDISK, instance, |
1569 | 1573 |
"couldn't retrieve status for disk/%s on %s: %s", |
1570 | 1574 |
idx, nname, bdev_status) |
Also available in: Unified diff