Revision 53c14ef1
b/lib/backend.py | ||
---|---|---|
1216 | 1216 |
C{True} for secondary nodes |
1217 | 1217 |
|
1218 | 1218 |
""" |
1219 |
result = _RecursiveAssembleBD(disk, owner, as_primary) |
|
1220 |
if isinstance(result, bdev.BlockDev): |
|
1221 |
result = result.dev_path |
|
1222 |
return result |
|
1219 |
status = False |
|
1220 |
result = "no error information" |
|
1221 |
try: |
|
1222 |
result = _RecursiveAssembleBD(disk, owner, as_primary) |
|
1223 |
if isinstance(result, bdev.BlockDev): |
|
1224 |
result = result.dev_path |
|
1225 |
status = True |
|
1226 |
if result == True: |
|
1227 |
status = True |
|
1228 |
except errors.BlockDeviceError, err: |
|
1229 |
result = "Error while assembling disk: %s" % str(err) |
|
1230 |
return (status, result) |
|
1223 | 1231 |
|
1224 | 1232 |
|
1225 | 1233 |
def BlockdevShutdown(disk): |
b/lib/cmdlib.py | ||
---|---|---|
2459 | 2459 |
for node, node_disk in inst_disk.ComputeNodeTree(instance.primary_node): |
2460 | 2460 |
lu.cfg.SetDiskID(node_disk, node) |
2461 | 2461 |
result = lu.rpc.call_blockdev_assemble(node, node_disk, iname, False) |
2462 |
if result.failed or not result: |
|
2462 |
msg = result.RemoteFailMsg() |
|
2463 |
if msg: |
|
2463 | 2464 |
lu.proc.LogWarning("Could not prepare block device %s on node %s" |
2464 |
" (is_primary=False, pass=1)", |
|
2465 |
inst_disk.iv_name, node) |
|
2465 |
" (is_primary=False, pass=1): %s",
|
|
2466 |
inst_disk.iv_name, node, msg)
|
|
2466 | 2467 |
if not ignore_secondaries: |
2467 | 2468 |
disks_ok = False |
2468 | 2469 |
|
... | ... | |
2475 | 2476 |
continue |
2476 | 2477 |
lu.cfg.SetDiskID(node_disk, node) |
2477 | 2478 |
result = lu.rpc.call_blockdev_assemble(node, node_disk, iname, True) |
2478 |
if result.failed or not result: |
|
2479 |
msg = result.RemoteFailMsg() |
|
2480 |
if msg: |
|
2479 | 2481 |
lu.proc.LogWarning("Could not prepare block device %s on node %s" |
2480 |
" (is_primary=True, pass=2)", |
|
2481 |
inst_disk.iv_name, node) |
|
2482 |
" (is_primary=True, pass=2): %s",
|
|
2483 |
inst_disk.iv_name, node, msg)
|
|
2482 | 2484 |
disks_ok = False |
2483 | 2485 |
device_info.append((instance.primary_node, inst_disk.iv_name, result.data)) |
2484 | 2486 |
|
Also available in: Unified diff