Chech drbdtwoprimaries: fix false positive #153

Merged
abenmiloud merged 1 commit from drbdtwoprimaries_fix_false_positive into master 2023-12-01 09:42:27 +01:00

View file

@ -882,7 +882,7 @@ check_drbd_two_primaries() {
failed "IS_DRBDTWOPRIMARIES" "Some DRBD ressources have two primaries, you risk a split brain!"
fi
elif command -v drbdadm >/dev/null; then
if drbdadm status | grep Primary -A2 | grep peer | grep -q Primary; then
if drbdadm role all 2>&1 | grep -q 'Primary/Primary'; then
failed "IS_DRBDTWOPRIMARIES" "Some DRBD ressources have two primaries, you risk a split brain!"
fi
fi