[DRBD-user] DRBD 9 Fencing Bug with pacemaker-2.0.2
Roland Kammerer
roland.kammerer at linbit.com
Tue Mar 3 14:23:47 CET 2020
On Fri, Feb 28, 2020 at 08:58:30AM +0000, Martin KOECKINGER wrote:
> Hello,
>
> we found a bug in the fencing script "/usr/lib/drbd/crm-fence-peer.9.sh" regarding pacemaker 2.0.2. I used DRBD-utils-9.12.0.
>
> In the function "fence_peer_init" is the following command (in our version its line 203):
> : ${master_id=$(set +x; echo "$cib_xml" |
> sed -ne '/<master /,/<\/master>/ {
> /<master / h;
> /<primitive/,/<\/primitive/ {
> /<instance_attributes/,/<\/instance_attributes/ {
> /<nvpair .*\bname="drbd_resource"/ {
> /.*\bvalue="'"$DRBD_RESOURCE"'"/! d
> x
> s/^.*\bid="\([^"]*\)".*/\1/p
> q
> };};};}')}
>
> This "sed" command does no longer work, cause the cib.xml structure in pacemaker 2.0.2 is different. It looks like the section "<master" was renamed to "<clone". In my case the following change did fix the issue:
> : ${master_id=$(set +x; echo "$cib_xml" |
> sed -ne '/<clone /,/<\/clone>/ {
> /<clone / h;
> /<primitive/,/<\/primitive/ {
> /<instance_attributes/,/<\/instance_attributes/ {
> /<nvpair .*\bname="drbd_resource"/ {
> /.*\bvalue="'"$DRBD_RESOURCE"'"/! d
> x
> s/^.*\bid="\([^"]*\)".*/\1/p
> q
> };};};}')}
>
> I hope this info is helpful for others running in the same issue and maybe someone can create a fix for the next release?
Guess this was fixed in the meantime by Lars,
can you check if that works for you/is actually the same:
https://github.com/LINBIT/drbd-utils/commit/fd2eec6eca91e3d4d24852b5bac4dd61f9854e67
Best, rck
More information about the drbd-user
mailing list