1

I have got a setup with DRBD, Corosync, and Pacemaker in which Pacemaker should mount a file system atop a DRBD block device on different cluster nodes, depending on nodes' availabilies. The setup is not yet fully working, therefore I try testing Pacemaker's resource agent for DRBD, ocf::linbit:drbd, with ocf-tester.

If I try like so (drbd_res is the name of the DRBD resource in Pacemaker; r1 is the name of the resource in /etc/drbd.conf)

sudo ocf-tester -n drbd_res -o drbd_resource="r1"\
    /usr/lib/ocf/resource.d/linbit/drbd monitor

I get this error message:

Beginning tests for /usr/lib/ocf/resource.d/linbit/drbd...
/usr/sbin/ocf-tester: 226: /usr/sbin/ocf-tester: xmllint: not found
* rc=127: Your agent produces meta-data which does not conform to ra-api-1.dtd
* rc=6: Validation failed.  Did you supply enough options with -o ?
WARNING: You may be disappointed: This RA is intended for pacemaker
1.0 or better! 
ERROR: meta parameter misconfigured, expected clone-max -le 2, but found unset. 
Aborting tests

So my question is this: How exactly can I manually invoke (i.e. test) OCF resource agents with ocf-tester? For the given example, I would expect the execution to complete with one of the prescribed return values. I am using DRBD 8.4.3 and Pacemaker 1.1.16 on Debian.

rookie09
  • 623
  • 1
  • 6
  • 17

2 Answers2

2

DRBD can exist in many states, and therefore requires an additional master/slave set to be defined in Pacemaker that references the primitive which uses the ocf:libit:drbd resource agent. Resource agents that require master/slave sets typically cannot be tested using ocf-tester.

However, I can assure you, the ocf:linbit:drbd resource agent is OCF compliant.

Matt Kereczman
  • 1,899
  • 9
  • 12
  • Thx. OCF compliance was not in doubt. I am wondering how I can perhaps "debug" a setup multiple with resource agents and constraints between them that is not yet behaving as expected overall. – rookie09 Aug 23 '17 at 12:52
  • Create a new question and tag it with Pacemaker and DRBD; I'll see it and try to help if I can ;) – Matt Kereczman Aug 23 '17 at 14:10
  • @MattKereczman Thanks for the insights, +1. – gxx Aug 23 '17 at 14:15
  • @MattKereczman Problem solved: I had apparently mistyped the name of a resource in `crm configure`. – rookie09 Aug 24 '17 at 06:46
1

Your error tells:

Beginning tests for /usr/lib/ocf/resource.d/linbit/drbd...
/usr/sbin/ocf-tester: 226: /usr/sbin/ocf-tester: xmllint: not found

It doesn't have xmllint to test the agent, so first install it using: apt-get install libxml2-utils

Then it should work fine. Hope is helps. :) All the best. :)

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
vvk
  • 26
  • 3