RE: [dev] Proposed path to allow LDAP server redundancy

Robert Kehl wrote:
On Friday, May 28, 2004 11:13 PM Tyler Hepworth
wrote: Ack. Don't want to break things, now do we? I have attached the fix. User's can use the old method
$Self->{'AuthModule::...'} = 'ldap@example.com';
or they can pass an array reference:
$Self->{'AuthModule::...'} = \@hosts;
Am I right in stating that OTRS will yike again as usual if none of the given servers are ready?
Well, depends on what you consider to be a "yike". If the user sticks with the old method, and the server is not ready, it will yike with a nice little $@ message. However, if the user passes a reference and none of the servers are ready, then it will yike with an ugly "Internal Server Error" and they will have to look in the apache log to get the specifics of why. The problem lies in this little line of code that is encapsulated in a foreach loop: $LDAP = Net::LDAP->new($Host) or next; Normally it would be ... or die ... but I can't do that. If an LDAP server is not availabe and I tell it to die, then none of the other servers in the array get looked at. Is there are way to tell the foreach loop to die with a message only if none of the servers in the array are available? I have thought about this, but probably not hard enough because I don't know the answer right now.
Could I get you to diff this version against the most recent CVS version and attach one or multiple patch file(s) that can be applied to the source tree?
Oh man. Now you are talking way over my head. To be honest, perl is the only programming language I know and I've only been doing that less than a year. Trying to throw in source code management, linux, and the rest on top of it is a struggle for me. I never even realized that source code management existed until I posted to the thread about how to maintain changes in my files. I looked at CVS but it seemed to make absolutely no sense to me. I have managed to get a copy of Subversion running and understand the basics, but have not yet even attempted merging or wholesale distribution upgrades yet. Got any advice for me? In the meantime I will see what I can learn about merging and see if I can fill your request. Tyler

On Saturday, May 29, 2004 12:15 AM
Tyler Hepworth
Normally it would be ... or die ... but I can't do that. If an LDAP server is not availabe and I tell it to die, then none of the other servers in the array get looked at. Is there are way to tell the foreach loop to die with a message only if none of the servers in the array are available? I have thought about this, but probably not hard enough because I don't know the answer right now.
One could think about my $Flag being set ($Flag = 1;) when a server is found, and an action if ($Flag = 1).
Could I get you to diff this version against the most recent CVS version and attach one or multiple patch file(s) that can be applied to the source tree?
Oh man. Now you are talking way over my head. To be honest, perl is yet. Got any advice for me? In the meantime I will see what I can learn about merging and see if I can fill your request.
Don't worry, it's not that hard. Try to get a GUI client for cvs to get you started. Tortoisecvs.sf.net is a good one on the Windows platform. All we need to render your changes usable is a diff against the CVS version of the files. So you take the original file you developed afrom, and diff it with your working version, using 'diff -bru'. You supplied diffs against your most recent working version, which doesn't help that much. Get it? Regards, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388
participants (2)
-
Robert Kehl
-
Tyler Hepworth