I missed some bits where drbdsetup xxx secondary and drbdsetup xxx secondary are called. My attempt at decoding the call tree is at the end of the message, but in summary:

* Check /proc/drbd on target, require network is Connected and local disk is UpToDate. [No check on source?] * on target: drbdsetup <dev> secondary (just to be sure?). No wait or status check?
* on both nodes: drbdsetup <dev> disconnect. No wait or status check?
* on both nodes: drbdsetup <dev> connect. Poll /proc/drbd until connected or syncing
* wait until sync complete
... rest not relevant as it doesn't get this far when it fails

Regards,

Brian.

_ExecMigration(...) [cmdlib.py]
  on target node:
  _CheckDiskConsistency(...) [cmdlib.py]
    _CheckDiskConsistencyInner(...) [cmdlib.py]
       AFAICS it seems to call down through to GetSyncStatus [bdev.py]
       which calls GetProcStatus which reads */proc/drbd*. Then it returns
       is_degraded=True if (not is_connected or not is_disk_uptodate)
  _EnsureSecondary(target_node) [cmdlib.py]
    for target node only:
    call_blockdev_close
      perspective_blockdev_close [server/noded.py]
        BlockdevClose [backend.py]
          Close [bdev.py]
*            drbdsetup <dev> secondary*
  _GoStandalone() [cmdlib.py]
    for both nodes:
    call_drbd_disconnect_net
      perspective_drbd_disconnect_net [server/noded.py]
        DrbdDisconnectNet [backend.py]
          DisconnectNet [bdev.py]
            _ShutdownNet [bdev.py]
*              drbdsetup <dev> disconnect*
  _GoReconnect(True) [cmdlib.py]
    for both nodes:
    call_drbd_attach_net
      perspective_drbd_attach_net [server/noded.py]
        DrbdAttachNet [backend.py]
          AttachNet [bdev.py]
GetProcStatus [bdev.py] - repeat until is_connected or is_in_resync
            _GetProcData - reads */proc/drbd*
            _MassageProcData - groups by device
            _DRBD8Status(..) - parses one device line
          Open [bdev.py]
***drbdsetup <dev> primary*
  _WaitUntilSync()
    for all nodes: repeat until all_done, display progress message
    call_drbd_wait_sync
      perspective_drbd_wait_sync
        DrbdWaitSync
          GetProcStatus
            _GetProcData - reads */proc/drbd*
            _MassageProcData - groups by device
            _DRBD8Status(..) - parses one device line
... do the migration [but when there's a problem it doesn't get this far]
  _EnsureSecondary(source_node)
  _WaitUntilSync()
  _GoStandalone()
  _GoReconnect(False)
  _WaitUntilSync()

_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to