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.

4
  • Re: xmllint not found: apt-get install libxml2-utils. Also, I think, you should set the clone-max param.
    – gxx
    Aug 22, 2017 at 13:10
  • @gf_ How can I set clone-max?
    – rookie09
    Aug 22, 2017 at 13:13
  • It's described in the man page (of ocf-tester), and you did use the syntax already for drbd_resource....
    – gxx
    Aug 22, 2017 at 13:23
  • 1
    clone-max is an ms (fancy cloned resource) meta option... you cannot define that in a primitive. Aug 22, 2017 at 21:53

2 Answers 2

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. :)

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.

4
  • 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, 2017 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 ;) Aug 23, 2017 at 14:10
  • @MattKereczman Thanks for the insights, +1.
    – gxx
    Aug 23, 2017 at 14:15
  • @MattKereczman Problem solved: I had apparently mistyped the name of a resource in crm configure.
    – rookie09
    Aug 24, 2017 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .