Revision 33bc6f01
b/lib/backend.py | ||
---|---|---|
1106 | 1106 |
try: |
1107 | 1107 |
crdev.Open() |
1108 | 1108 |
except errors.BlockDeviceError, err: |
1109 |
errmsg = "Can't make child '%s' read-write: %s" (child, err) |
|
1109 |
errmsg = "Can't make child '%s' read-write: %s" % (child, err)
|
|
1110 | 1110 |
logging.error(errmsg) |
1111 | 1111 |
return False, errmsg |
1112 | 1112 |
clist.append(crdev) |
b/lib/bdev.py | ||
---|---|---|
1404 | 1404 |
try: |
1405 | 1405 |
self._ShutdownNet(minor) |
1406 | 1406 |
except errors.BlockDeviceError, err: |
1407 |
_ThrowError("Device has correct local storage, wrong remote peer"
|
|
1408 |
" and is unable to disconnect in order to attach to"
|
|
1409 |
" the correct peer: %s", str(err))
|
|
1407 |
_ThrowError("drbd%d: device has correct local storage, wrong"
|
|
1408 |
" remote peer and is unable to disconnect in order"
|
|
1409 |
" to attach to the correct peer: %s", minor, str(err))
|
|
1410 | 1410 |
# note: _AssembleNet also handles the case when we don't want |
1411 | 1411 |
# local storage (i.e. one or more of the _[lr](host|port) is |
1412 | 1412 |
# None) |
... | ... | |
1475 | 1475 |
""" |
1476 | 1476 |
result = utils.RunCmd(["drbdsetup", cls._DevPath(minor), "down"]) |
1477 | 1477 |
if result.failed: |
1478 |
_ThrowError("Can't shutdown drbd device: %s", result.output) |
|
1478 |
_ThrowError("drbd%d: can't shutdown drbd device: %s", |
|
1479 |
minor, result.output) |
|
1479 | 1480 |
|
1480 | 1481 |
def Shutdown(self): |
1481 | 1482 |
"""Shutdown the DRBD device. |
... | ... | |
1514 | 1515 |
else: |
1515 | 1516 |
in_use = False |
1516 | 1517 |
if in_use: |
1517 |
_ThrowError("DRBD minor %d already in use at Create() time", aminor)
|
|
1518 |
_ThrowError("drbd%d: minor is already in use at Create() time", aminor)
|
|
1518 | 1519 |
meta = children[1] |
1519 | 1520 |
meta.Assemble() |
1520 | 1521 |
if not meta.Attach(): |
1521 |
raise errors.BlockDeviceError("Can't attach to meta device") |
|
1522 |
_ThrowError("drbd%d: can't attach to meta device '%s'", |
|
1523 |
aminor, meta) |
|
1522 | 1524 |
cls._CheckMetaSize(meta.dev_path) |
1523 | 1525 |
cls._InitMeta(aminor, meta.dev_path) |
1524 | 1526 |
return cls(unique_id, children) |
Also available in: Unified diff