[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] nginx resource agent
From:       Keisuke MORI <keisuke.mori+ha () gmail ! com>
Date:       2011-01-04 7:58:20
Message-ID: AANLkTi=+yssXGCV7xNuqAWy9Cy3kCgaTPG4njYWxPxdU () mail ! gmail ! com
[Download RAW message or body]

Hi Alan,

2011/1/2 Alan Robertson <alanr@unix.sh>:
> On 12/14/2010 02:42 AM, Dejan Muhamedagic wrote:
>>>    #
>>>    # I'm not convinced this is a wonderful idea (AlanR)
>>>    #
>>>    for sig in SIGTERM SIGHUP SIGKILL
>>>    do
>>>      if
>>>        pgrep -f "$NGINXD.*$CONFIGFILE">/dev/null
>>>      then
>>>        pkill -$sig -f $NGINXD.*$CONFIGFILE>/dev/null
>>>        ocf_log info "nginxd children were signalled ($sig)"
>>>        sleep 1
>>>      else
>>>        break
>>>      fi
>>>    done
>> Can't recall anymore the details, there was a bit of discussion
>> on the matter a few years ago, but NTT insisted on killing httpd
>> children. Or do you mind the implementation?
>
> Hi Dejan,
>
> I know it's been a long time.  Sorry about that.  If I _hated_ the idea,
> I would have left it out.  It definitely leaves me feeling a bit
> unsettled.  If it causes a problem, it will no doubt eventually show
> up.  It looks like it's just masking a bug in Apache - that is, that
> giving it a shutdown request doesn't really work...

The relevant discussion is this:
http://www.gossamer-threads.com/lists/linuxha/dev/44395#44395
http://developerbugs.linux-foundation.org//show_bug.cgi?id=1800


The intention of the code is to allow to restart the service if the
Apache main process was failed in some reason (maybe a bug in Apache,
maybe the OOM killer or whatever). It's not for masking a bug in
Apache - it's just trying to clean up and continue the service without
the manual intervention as possible.


> Perhaps I shouldn't have kept it in the nginx code - since it does seem
> to be a bit specific to some circumstance in Apache...  On the other
> hand, it shouldn't hurt anything either...

You may want to see what happens if the nginx process was accidentally killed.
I'm not familiar with nginx at all, but in the case of Apache, the
children would keep running and they prevent to restart another Apache
instance until you kill all the orphaned processes manually.
If nginx is a single process application, then I think that the code
should not be necessary.


-- 
Keisuke MORI
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic