• Lars Ellenberg's avatar
    drbd: skip spurious timeout (ping-timeo) when failing promote · 9848b6dd
    Lars Ellenberg authored
    If you try to promote a Secondary while connected to a Primary
    and allow-two-primaries is NOT set, we will wait for "ping-timeout"
    to give this node a chance to detect a dead primary,
    in case the cluster manager noticed faster than we did.
    
    But if we then are *still* connected to a Primary,
    we fail (after an additional timeout of ping-timout).
    
    This change skips the spurious second timeout.
    
    Most people won't notice really,
    since "ping-timeout" by default is half a second.
    
    But in some installations, ping-timeout may be 10 or 20 seconds or more,
    and spuriously delaying the error return becomes annoying.
    Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    9848b6dd
drbd_nl.c 148 KB