IS_DRBDTWOPRIMARIES Wrong check when using drbdadm status #151
Labels
No labels
bug
bullseye
discussion
duplicate
enhancement
help wanted
invalid
question
suggestion
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: evolix/evocheck#151
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
It looks like the check is wrong check when using
drbdadm status
.Here is the problematic line¹:
The script should seek this specific pattern:
The following, longer, command should do the trick:
Another simpler solution:
¹
if drbdadm status | grep Primary -A2 | grep peer | grep -q Primary; then
The simpler solution seems to be more robust than you awk one-liner. It also seems to works in all supported versions of Debian and should therefor be the only solution used so as to simplify the logic of this check.