Hi,
On Sun, May 10, 2009 at 07:36:35AM -0700, Rodrigo Costa wrote:
>
> Dear Linux-HA list,
>
> I would like to clarify some doubts I'm having preparing a possible
> openldap OCF RA. I prepared the OCF RA using as reference the mysql
> resource agent already existent in the Linux-HA scripts.
>
> I already had some scripts to ldapsearch the database for integrity
> purposes and then I use this same approach for the monitor operation.
> For this purpose I create some "parameters" like test_dn and rootdn,
> concepts from LDAP.
>
> The first problem is that I have more than one DB in my openLDAP. In
> this way I would like in the end to make a ldapsearch for a specific DN
> in each DB. Since I do not see how the operation and parameters can have
> a 1 to 1 relation I do not see how can I set, for example, more than one
> test_dn parameters and call the monitor twice, each testing a different DN.
>
> Is there a configuration way in cib.xml or even creating the OCF RA that
> could handle this case? I was expecting I would make OCF RA generic and
> don't need to create a specific OCF RA for my case with 2 DBs.
Of course not. The question is: If you have a single resource
(LDAP server) which handles multiple databases, then why would
you want to monitor all databases? If the LDAP server can handle
one, then it should be able to handle all. Of course, there could
be, say, a corruption affecting just one database, but I don't
see how this RA can manage that, i.e. restart/migrate cannot fix
this kind of problem. So, I'd say that you need to monitor
single LDAP trees elsewhere, in a proper monitoring tool, and not
in the cluster.
> Since I also intend to use the openldap in a pair of machines in a
> master/slave replication database model, I was also wondering how can I
> make the resouce initialization(colocated - no disk sharing) could
> receive different parameters like the URL which identifies to slapd the
> interfaces listening for ldap connections(e.g ldap://<IP>:<port>).
Sorry, don't understand this. Can you please rephrase.
> Not sure again how can I correlate parameters for the resource
> specifically in each machining(colocated) running the resource? I want
> one master machine to listen in its own IP and the VIP and the slave
> only in it's specific IP address. So my parameter for the OCF RA called
> urls would be different depending on the machine running it.
>
> I also had some issues running the ocf-testing. There is a script
> mistake which doesn't allow you have parameters with alphanumeric like
> =. This was caught because in the DN in ldap I have commonly the = in
> the values. In the ocf-testing there was :
>
> -o) name=${2%%=*}; value=${2##*=};
> lrm_ra_args="$lrm_ra_args $2";
>
> Where I needed to change to :
>
> -o) name=${2%%=*}; value=${2#*=};
> lrm_ra_args="$lrm_ra_args $2";
>
> See the -o need to suffer a change from ## to #. This is needed to allow
> a more flexible options passed and testing the OCF RA.
Thanks. Just fixed that.
> I'm also having a problem to pass parameter, not sure if only to
> ocf-testing, which contains spaces. I tried to use the parameter urls to
> pass one or more slapd URLs, like urls="ldap://10.142.15.170:389
> ldap://10.142.15.41:389" but at least in ocf-testing it always get only
> the first part(e.g ldap://10.142.15.170:389) and put a shell warning
> based in the export directive issue.
ocf-tester is a shell script. That's probably an expansion issue
somewhere. I'll take a look.
> I would like clarifications if in the OCF RA I can have parameters which
> contains white spaces and if the logic will operate correctly on it.
Yes.
> If you could clarify these doubts I would really appreciate it. This
> information could be used as reference for many others that could be
> having this same kind of doubt.
Thanks,
Dejan
> Best Regards,
>
> Rodrigo.
>
>
>
>
>
>
>
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems