• Iustin Pop's avatar
    Port replace disk/change node to the new DRBD RPCs · a2d59d8b
    Iustin Pop authored
    In replace disks to new secondary, since Attach (and therefore
    call_blockdev_find) is not modifying the devices anymore, we need to
    switch this LU to the new call_drbd_disconnect_net and
    call_drbd_attach_net functions.
    
    Due to the authentication needed in 2.0, we need to be more careful with
    the activation order. In 1.2, we have the case that the new node was
    directly activated with networking information, and could connect to the
    primary while it was still connected or WFConnect to the old secondary.
    
    In the new scheme, we:
      - create the new drbd in StandAlone mode
      - shutdown old secondary (primary becomes WFConnection)
      - disconnect primary (and thus it goes into StandAlone)
      - connect both primary and new secondary to network using the
        call_drbd_attach_net rpc
    
    This should be safer, and is cleaner. This passes burnin.
    
    Reviewed-by: ultrotter
    a2d59d8b
cmdlib.py 218 KB