LINBIT / drbd-utils

DRBD userspace utilities (for 9.x, 8.4, 8.3)
GNU General Public License v2.0
79 stars 47 forks source link

crm-unfence-peer.9.sh error in _check_peer_node_reachable() #16

Closed dragon299 closed 2 years ago

dragon299 commented 2 years ago

The function _check_peer_node_reachable does not work with pacemaker-2.1.0-8.

Line 1082:

                if [[ $crmd = "online" ]] ; then
                        local out
                        if out=$( crmadmin -t $(( cibtimeout * 200 )) -S $DRBD_PEER ) \
                        && [[ $out = *"(ok)" ]]; then
                                peer_state="reachable"
                                return
                        fi
                fi

The script uses crmadmin to find out the reachable node. But it expects (ok) in the stdout if it is.

Old stdout of crmadmin was: Status of crmd@testclust7-02: S_NOT_DC (ok) Now, with new pacemaker version the output is: Controller on testclust7-02 in state S_NOT_DC: ok

The () need to be removed to make the script work again.

lge commented 2 years ago

Thanks for the report, we did not check with pcmk 2.1 yet. Any change will need to be backward compatible, though. Would this work for you? [[ $out = *@(: ok|(ok)) ]]; then

dragon299 commented 2 years ago

Thanks, that did fix the issue. Unfortunately I found additional issues with pcmk 2.1 during testing. I guess there is still more work to do for a stable pcmk 2.1 with drbd. My current setup works "sometimes". I still try to reproduce the errors.

lge commented 2 years ago

supposedly fixed by 8a28be74bc6efa93931c957e54c01abb18b984fe released with v9.20.0