Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

[PATCH]Improvement of the log output of apache.

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


renayama19661014 at ybb

Nov 11, 2009, 8:42 PM

Post #1 of 6 (1153 views)
Permalink
[PATCH]Improvement of the log output of apache.

Hi,

We review the output of the error log of RA.

In RA of apace, the error of the kill command is canceled somehow or other.

I made a patch to output it without canceling the failure of the kill command.

It is a small patch, but wants you to include it in the latest edition by all means.

Best Regards,
Hideo Yamauchi.
Attachments: apache.patch (0.96 KB)


dejanmm at fastmail

Nov 13, 2009, 3:29 AM

Post #2 of 6 (1081 views)
Permalink
Re: [PATCH]Improvement of the log output of apache. [In reply to]

Hi Hideo-san,

On Thu, Nov 12, 2009 at 01:42:21PM +0900, renayama19661014 [at] ybb wrote:
> Hi,
>
> We review the output of the error log of RA.
>
> In RA of apace, the error of the kill command is canceled somehow or other.

Right. That is common practice, since there's typically not
anything interesting in the output of the kill command (either
process doesn't exist or permission denied).

> I made a patch to output it without canceling the failure of the kill command.
>
> It is a small patch, but wants you to include it in the latest
> edition by all means.

Let me quote part of the code:

silent_status() {
if
[ -f $PidFile ]
then
ProcessRunning `cat $PidFile`
...

ProcessRunning() {
...
# This assumes we're running as root...
kill -0 "$ApachePID" >/dev/null 2>&1

If you drop 2>&1 this won't be silent status any more :)

So, I would like to understand what are your circumstances, i.e.
why does this bother you so much that you want it included "by
all means".

Cheers,

Dejan

>
> Best Regards,
> Hideo Yamauchi.


> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


renayama19661014 at ybb

Nov 15, 2009, 5:22 PM

Post #3 of 6 (1058 views)
Permalink
Re: [PATCH]Improvement of the log output of apache. [In reply to]

Hi Dejan,

> If you drop 2>&1 this won't be silent status any more :)
>
> So, I would like to understand what are your circumstances, i.e.
> why does this bother you so much that you want it included "by
> all means".

I forgot an original purpose.
The revision of ProcessRunning withdraws it.

-----------------------------------------------------------------------
--- a/heartbeat/apache Thu Nov 12 13:26:59 2009 +0900
+++ b/heartbeat/apache Mon Nov 16 10:18:46 2009 +0900
@@ -342,7 +342,7 @@
[ $tries -lt 10 ]
do
sleep 1
- kill $ApachePID >/dev/null 2>&1
+ kill $ApachePID >/dev/null
ocf_log info "Killing apache PID $ApachePID"
tries=`expr $tries + 1`
done
@@ -362,8 +362,8 @@
fi

for sig in SIGTERM SIGHUP SIGKILL ; do
- if pgrep -f $HTTPD.*$CONFIGFILE >/dev/null 2>&1 ; then
- pkill -$sig -f $HTTPD.*$CONFIGFILE >/dev/null 2>&1
+ if pgrep -f $HTTPD.*$CONFIGFILE >/dev/null ; then
+ pkill -$sig -f $HTTPD.*$CONFIGFILE >/dev/null
ocf_log info "apache children were signalled ($sig)"
sleep 1
else

-----------------------------------------------------------------------

Best Regards,
Hideo Yamauchi.


--- Dejan Muhamedagic <dejanmm [at] fastmail> wrote:

> Hi Hideo-san,
>
> On Thu, Nov 12, 2009 at 01:42:21PM +0900, renayama19661014 [at] ybb wrote:
> > Hi,
> >
> > We review the output of the error log of RA.
> >
> > In RA of apace, the error of the kill command is canceled somehow or other.
>
> Right. That is common practice, since there's typically not
> anything interesting in the output of the kill command (either
> process doesn't exist or permission denied).
>
> > I made a patch to output it without canceling the failure of the kill command.
> >
> > It is a small patch, but wants you to include it in the latest
> > edition by all means.
>
> Let me quote part of the code:
>
> silent_status() {
> if
> [ -f $PidFile ]
> then
> ProcessRunning `cat $PidFile`
> ...
>
> ProcessRunning() {
> ...
> # This assumes we're running as root...
> kill -0 "$ApachePID" >/dev/null 2>&1
>
> If you drop 2>&1 this won't be silent status any more :)
>
> So, I would like to understand what are your circumstances, i.e.
> why does this bother you so much that you want it included "by
> all means".
>
> Cheers,
>
> Dejan
>
> >
> > Best Regards,
> > Hideo Yamauchi.
>
>
> > _______________________________________________________
> > Linux-HA-Dev: Linux-HA-Dev [at] lists
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Nov 23, 2009, 6:38 AM

Post #4 of 6 (953 views)
Permalink
Re: [PATCH]Improvement of the log output of apache. [In reply to]

Hi Hideo-san,

On Mon, Nov 16, 2009 at 10:22:01AM +0900, renayama19661014 [at] ybb wrote:
> Hi Dejan,
>
> > If you drop 2>&1 this won't be silent status any more :)
> >
> > So, I would like to understand what are your circumstances, i.e.
> > why does this bother you so much that you want it included "by
> > all means".
>
> I forgot an original purpose.
> The revision of ProcessRunning withdraws it.

OK. But I'd still like to know what was your motivation. See, all
other resource agents ignore output of kill and grep and similar.
What relevant messages did you actually miss in the logs?

Thanks,

Dejan
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


renayama19661014 at ybb

Nov 23, 2009, 6:38 PM

Post #5 of 6 (942 views)
Permalink
Re: [PATCH]Improvement of the log output of apache. [In reply to]

Hi Dejan,

> OK. But I'd still like to know what was your motivation. See, all
> other resource agents ignore output of kill and grep and similar.
> What relevant messages did you actually miss in the logs?

We do not leak the log of the result of these commands for the moment.
But, we think that the failure of these commands should be recorded.
It helps problem solving.

I revise it from RA to always use.
However, I am ready to review all RA.

Best Regards,
Hideo Yamauchi.



--- Dejan Muhamedagic <dejanmm [at] fastmail> wrote:

> Hi Hideo-san,
>
> On Mon, Nov 16, 2009 at 10:22:01AM +0900, renayama19661014 [at] ybb wrote:
> > Hi Dejan,
> >
> > > If you drop 2>&1 this won't be silent status any more :)
> > >
> > > So, I would like to understand what are your circumstances, i.e.
> > > why does this bother you so much that you want it included "by
> > > all means".
> >
> > I forgot an original purpose.
> > The revision of ProcessRunning withdraws it.
>
> OK. But I'd still like to know what was your motivation. See, all
> other resource agents ignore output of kill and grep and similar.
> What relevant messages did you actually miss in the logs?
>
> Thanks,
>
> Dejan
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Nov 27, 2009, 6:01 AM

Post #6 of 6 (899 views)
Permalink
Re: [PATCH]Improvement of the log output of apache. [In reply to]

Hi Hideo-san,

Not entirely convinced :) But applied anyway, since it only
affects output of the stop operation.

Cheers,

Dejan

On Tue, Nov 24, 2009 at 11:38:11AM +0900, renayama19661014 [at] ybb wrote:
> Hi Dejan,
>
> > OK. But I'd still like to know what was your motivation. See, all
> > other resource agents ignore output of kill and grep and similar.
> > What relevant messages did you actually miss in the logs?
>
> We do not leak the log of the result of these commands for the moment.
> But, we think that the failure of these commands should be recorded.
> It helps problem solving.
>
> I revise it from RA to always use.
> However, I am ready to review all RA.
>
> Best Regards,
> Hideo Yamauchi.
>
>
>
> --- Dejan Muhamedagic <dejanmm [at] fastmail> wrote:
>
> > Hi Hideo-san,
> >
> > On Mon, Nov 16, 2009 at 10:22:01AM +0900, renayama19661014 [at] ybb wrote:
> > > Hi Dejan,
> > >
> > > > If you drop 2>&1 this won't be silent status any more :)
> > > >
> > > > So, I would like to understand what are your circumstances, i.e.
> > > > why does this bother you so much that you want it included "by
> > > > all means".
> > >
> > > I forgot an original purpose.
> > > The revision of ProcessRunning withdraws it.
> >
> > OK. But I'd still like to know what was your motivation. See, all
> > other resource agents ignore output of kill and grep and similar.
> > What relevant messages did you actually miss in the logs?
> >
> > Thanks,
> >
> > Dejan
> > _______________________________________________________
> > Linux-HA-Dev: Linux-HA-Dev [at] lists
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
> >
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.