[Pacemaker] slapd resource agent does not accept multiple values in 'services' parameters

Jake Smith jsmith at argotec.com
Thu May 3 10:27:34 EDT 2012


----- Original Message -----
> From: "Igor Zinovik" <zinovik.igor at gmail.com>
> To: pacemaker at oss.clusterlabs.org
> Sent: Thursday, May 3, 2012 9:08:11 AM
> Subject: [Pacemaker] slapd resource agent does not accept multiple values in	'services' parameters
> 
> Hello.
> 
> I'm trying to deploy pacemaker active/passive cluster for openldap
> with slapd resource agent from:
> https://github.com/jhohm/resource-agents/blob/master/heartbeat/slapd
> 
> This agent has parameter called `services'.  Documentation says that
> this parameter is a string and can accept multiple values separated
> by
> spaces:
> # crm ra info ocf:heartbeat:slapd | grep -A 2 services
>  crm ra info ocf:heartbeat:slapd | grep -A 3 services
> services (string, [ldap:///]): LDAP (and other scheme) URLs to serve
>     LDAP (and other scheme) URLs slapd will serve.
>     For example, "ldap://127.0.0.1:389 ldaps:/// ldapi:///"
> 
> When i try to specify multiple valus when i work with shadow copy
> i get an error:
> # crm_shadow --create test
> shadow[test] # crm configure primitive slapd_mirrormode
> ocf:heartbeat:slapd params slapd="/usr/lib/openldap/slapd"
> config="/etc/openldap/slapd.conf" user="ldap" group="ldap"
> services="ldap:/// ldaps:/// ldapi:///" meta migration-threshold="3"
> op monitor interval=10s
> element nvpair: Relax-NG validity error : Type ID doesn't allow value
> 'slapd_mirrormode-instance_attributes-ldaps:///'
> element nvpair: Relax-NG validity error : Element nvpair failed to
> validate attributes
> Relax-NG validity error : Extra element nvpair in interleave
> element nvpair: Relax-NG validity error : Element instance_attributes
> failed to validate content
> Relax-NG validity error : Extra element instance_attributes in
> interleave
> element cib: Relax-NG validity error : Element cib failed to validate
> content
> crm_verify[29922]: 2012/05/03_17:06:13 ERROR: main: CIB did not pass
> DTD/schema validation
> Errors found during check: config not valid
> ERROR: slapd_mirrormode: parameter ldapi:/// does not exist
> ERROR: slapd_mirrormode: parameter ldaps:/// does not exist
> Do you still want to commit? no
> 
> Even single quotes does not solve the problem.

I'm using it with multiple service values without issue.  I believe I configured it with something like this and it worked fine:
primitive slapd_mirrormode ocf:heartbeat:slapd params \
  slapd="/usr/lib/openldap/slapd" \
  config="/etc/openldap/slapd.d/" \
  user="ldap" group="ldap" \
  services="ldap:/// ldaps:/// ldapi:///" \
  watch_suffix="dc=example,dc=com" \
  meta migration-threshold="3" \
  op monitor interval=10s

I would recommend using the latest version of the RA here and see if the problem still exists:
https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/slapd

I'm also running it in mirrormode (active on both nodes) which is working well. If you are interested there is a good document about how this works and how to do it by Ralf Haferkamp at SUSE from LDAPcon2011. 
http://www.daasi.de/ldapcon2011/downloads/Haferkamp-paper.pdf

HTH
Jake

> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started:
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 
> 




More information about the Pacemaker mailing list