[Freeipa-devel] [PATCH] 0001 Ensure that Apache is running in Prefork mode

Jan Zelený jzeleny at redhat.com
Mon Nov 15 10:21:11 UTC 2010


Jan Zeleny <jzeleny at redhat.com> wrote:
> Rob Crittenden <rcritten at redhat.com> wrote:
> > Jan Zelený wrote:
> > > Rob Crittenden<rcritten at redhat.com>  wrote:
> > >> Jan Zelený wrote:
> > >>> I tried one other solution, but this approach was recommended to me
> > >>> by Pavel. It seems to be working fine. If you don't agree with the
> > >>> concept (detection per request), I can present you the original one.
> > >>> 
> > >>> https://fedorahosted.org/freeipa/ticket/252
> > >>> 
> > >>> Jan
> > >> 
> > >> nack. I think we need some logging to say "IPA does not work with the
> > >> threaded MPM, use the pre-fork MPM" or something like that.
> > >> 
> > >> Otherwise it is going to silently fail and users will have no idea
> > >> why.
> > > 
> > > I added logging as you requested. I'm still not quite sure how does the
> > > logging work exactly, but as I understand it, this way it should be ok.
> > > 
> > > Jan
> > 
> > nack, I can still run httpd.worker and serve IPA requests.
> > 
> > We do things to the environment so we need to be sure that each request
> > is isolated from all others which is why we want to run in multi-process
> > mode.
> > 
> > rob
> 
> I based that patch on WSGI specification, which says:
> 
> "This value should evaluate true if the application object may be
> simultaneously invoked by another thread in the same process, and should
> evaluate false otherwise."
> 
> I didn't realize that this condition may be evaluated as false even when
> running multiple threads.
> 
> That means I have to abandon this approach and try the original one. I'm
> going to sync the patch I have prepared with the current HEAD and I'll
> send it ASAP.

Ok, so I've hit a small complication and I had to update the patch, so the 
detection is as robust as possible. This patch is working in Fedora 
environment, where the packaging of httpd is ... well ... strange at least. 

The only situation it isn't handling 100% well is the case when 2 different 
Apache servers are running. But since that's not common case and I can't think 
of a way to detect which instance is running current WSGI script, the script 
just doesn't allow such situation.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jzeleny-freeipa-0001-03-Ensure-that-Apache-is-running-with-MPM-Prefork.patch
Type: text/x-patch
Size: 2127 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20101115/670dbced/attachment.bin>


More information about the Freeipa-devel mailing list