Revision 9cdbe77f lib/bdev.py
b/lib/bdev.py | ||
---|---|---|
2099 | 2099 |
# even though we were passed some children at init time |
2100 | 2100 |
if match_r and "local_dev" not in info: |
2101 | 2101 |
break |
2102 |
if match_l and not match_r and "local_addr" in info: |
|
2103 |
# strange case - the device network part points to somewhere |
|
2104 |
# else, even though its local storage is ours; as we own the |
|
2105 |
# drbd space, we try to disconnect from the remote peer and |
|
2106 |
# reconnect to our correct one |
|
2107 |
if not self._ShutdownNet(minor): |
|
2108 |
raise errors.BlockDeviceError("Device has correct local storage," |
|
2109 |
" wrong remote peer and is unable to" |
|
2110 |
" disconnect in order to attach to" |
|
2111 |
" the correct peer") |
|
2112 |
# note: _AssembleNet also handles the case when we don't want |
|
2113 |
# local storage (i.e. one or more of the _[lr](host|port) is |
|
2114 |
# None) |
|
2115 |
if (self._AssembleNet(minor, (self._lhost, self._lport, |
|
2116 |
self._rhost, self._rport), "C") and |
|
2117 |
self._MatchesNet(self._GetDevInfo(minor))): |
|
2118 |
break |
|
2119 |
|
|
2102 | 2120 |
else: |
2103 | 2121 |
minor = None |
2104 | 2122 |
|
Also available in: Unified diff