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?


Mit freundlichen Grüßen / Best Regards

Martin Köckinger, BSc.
System Administration

KNAPP Systemintegration GmbH
Waltenbachstraße 9
8700 Leoben, Austria
Phone: +43 5 04953-6921
Mobile: +43 67689796921
Fax: +43 5 04953-6500
[email protected]
www.knapp.com

Commercial register number: FN 138870x
Commercial register court: Leoben
DVR: 4017057

The information in this e-mail (including any attachment) is confidential and 
intended to be for the use of the addressee(s) only. If you have received the 
e-mail by mistake, any disclosure, copy, distribution or use of the contents of 
the e-mail is prohibited, and you must delete the e-mail from your system. As 
e-mail can be changed electronically KNAPP assumes no responsibility for any 
alteration to this e-mail or its attachments. KNAPP has taken every reasonable 
precaution to ensure that any attachment to this e-mail has been swept for 
virus. However, KNAPP does not accept any liability for damage sustained as a 
result of such attachment being virus infected and strongly recommend that you 
carry out your own virus check before opening any attachment.

_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
[email protected]
https://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to