FW: [dev] Diff to provide patch for LDAP redundancy

Robert, I sent this to your personal mail on June 8, but I never heard back from you, so I am posting it in the dev list. Please let me know what you think of my proposal to gracefully handle no available ldap servers. Tyler -----Original Message----- From: Tyler Hepworth Sent: Tuesday, June 08, 2004 2:58 PM To: 'Robert Kehl' Subject: RE: [dev] Diff to provide patch for LDAP redundancy Robert Kehl wrote:
On Thursday, June 03, 2004 4:10 PM Tyler Hepworth
wrote: I diffed my working copies of */LDAP.pm against their original 1.2.3 versions (version 1.9). Please find enlosed a single file that contains the three diffs. These diffs make it possible to have LDAP server failover by passing a reference to an array of servers rather than specifying a single server in Config.pm. Old Config.pm files will continue to work (not necessary to pass an array reference). Program will yike properly if no valid LDAP server is found.
Dear Tyler. I really appreciate your work, but have to tell you something you most probably would like to have heard a week or two ago.
Reading http://search.cpan.org/~gbarr/perl-ldap-0.31/lib/Net/LDAP.pod#CONSTRUC TOR
"HOST may also be a reference to an array of hosts, host-port pairs or URIs to try. Each will be tried in order until a connection is made. Only when all have failed will the result of undef be returned."
And:
"onerror => 'die' | 'warn' | undef | sub { ... } "
So it means Net::LDAP does provide fallback hosts oob. :(
No need to frown! That is awesome. Much simpler.
So all we really had to do is to change the reaction of OTRS when no host is found. Currently, we just 'die', but one could think of a more intelligent solution.
I think so too.
What do you think now, Tyler? Are you discouraged for having worked
No. I'm having fun. :-D
against the wall? You haven't, as you could rewrite your code to reflect the new situation - will you? I would like you to.
I will and I have. Please see my attached diff file. Here is the gist of it. Don't die if no LDAP connection made. Instead return a value back to the file that called the LDAP module. Check for that value and display a message. I have done this for CustomerAuth/LDAP.pm and bin/cgi-bin/customer.pl for right now. If you like the concept, then I will work something up for the other two LDAP.pm modules. Let me know what you think. Thanks, Tyler Hepworth
participants (1)
-
Tyler Hepworth