[DRBD-user] notify-split-brain.sh: Environment variable $DRBD_PEER not found (this is normally passed in by drbdadm).
daniel at Biblestuph.com
Wed Sep 19 22:57:08 CEST 2018
On 9/18/2018 10:51 AM, Lars Ellenberg wrote:
> On Thu, Sep 13, 2018 at 04:36:54PM -0400, Daniel Ragle wrote:
>> Anybody know where I need to start looking to figure this one out:
>> notify-split-brain.sh: Environment variable $DRBD_PEER not found
>> (this is normally passed in by drbdadm).
>> I have a split-brain situation and apparently this notification script tried
>> to run but failed.
>> This is in a pacemaker setup with ocf:linbit:drbd controlling DRBD.
>> # drbdadm --version
>> DRBDADM_BUILDTAG=GIT-hash:\ fed9a1df82015e52c14c912fa4b93336e2ab4fcc\ build\
>> by\ mockbuild@\,\ 2018-04-20\ 19:30:46
> Yup, sorry, even though apparently they are still documented in the UG,
> those "notify*.sh" example scripts are not fit for DRBD 9 :-(
> You want to configure proper fencing anyways,
> to *avoid* split brain instead of being "maybe"
> (or maybe not) notified by email.
Yah, in fact it was somewhere in the process of trying to get fencing
configured (and testing) that I managed to end up with the split-brain.
Unfortunately (see below) I don't know exactly what I did to trigger it.
> For now, if you feel comfortable patching the script,
> you could try adding something like this:
> if [[ $DRBD_PEER_NODE_ID ]] ; then
> [[ $v ]] && DRBD_PEER=$v;
Looks like it should work, I tried adding it, but now I can't figure out
how to test it. I tried:
drbdadm split-brain r0
And that gives me the same problem, as evidently that test doesn't set
any of the DRBD_PEER vars, only:
And now of course I can't figure out how to manually create a
split-brain for testing. Tried dropping the network interface while both
nodes were up and primary, but that doesn't seem to be enough. Is there
a simple way to test?
More information about the drbd-user