• Iustin Pop's avatar
    Split the change of peer in secondary replace in two operations · 642445d9
    Iustin Pop authored
    This patch splits the single operation of replace peer into two distinct
    phases, in order to make a single change to the instance configuration:
      - detach from network
      - if at least one drbd device succeeded, make one change to the
        instance, pointing all disks to the new peer
      - attach to the new peer
    
    This should eliminate the case when a failure in the second reattach can
    leave the instance with two secondaries.
    
    Reviewed-by: imsnah
    642445d9
cmdlib.py 144 KB