• Lars Ellenberg's avatar
    drbd: fix broken state change after split-brain attach while connected · 580b9767
    Lars Ellenberg authored
    Situation:
    we have diverging data sets, i.e. we had a split brain somewhen,
    but currently are connected, one node diskless.
    
    Then we try to attach that disk, figure it is consistent,
    but has a diverging data set, we refuse to attach.
    
    This led to strange state changes:
    22:18:35 bb drbd1: peer( Unknown -> Primary ) conn( WFReportParams -> Connected) pdsk( DUnknown -> UpToDate )
    22:19:30 bb drbd1: disk( Diskless -> Attaching )
    22:19:30 bb drbd1: disk( Attaching -> Negotiating )
    22:19:30 bb drbd1: drbd_sync_handshake:
    22:19:30 bb drbd1: self 97BF25798B9D5222:F33D1F62ADE698DD:4269796F9D027C83:AC45D8B5C3C1BF93 bits:19449 flags:0
    22:19:30 bb drbd1: peer 280DFB6E125465D3:F33D1F62ADE698DC:4269796F9D027C82:AC45D8B5C3C1BF93 bits:2575806 flags:0
    22:19:30 bb drbd1: uuid_compare()=100 by rule 90
    22:19:30 bb drbd1: Split-Brain detected, dropping connection!
    22:19:30 bb drbd1: disk( Negotiating -> Diskless )
    
    while the other side says:
    22:19:30 aa drbd1: Split-Brain detected, dropping connection!
    22:19:30 aa drbd1: Disk attach process on the peer node was aborted.
    22:19:30 aa drbd1: conn( Connected -> TOO_LARGE ) pdsk( Diskless -> Consistent )
    
    This should be fixed now.
    Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
    580b9767
drbd_receiver.c 121 KB