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

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] [PATCH] pgsql RA: Replace echo command with
From:       Dejan Muhamedagic <dejanmm () fastmail ! fm>
Date:       2010-01-15 9:34:02
Message-ID: 20100115093402.GD13369 () rondo ! homenet
[Download RAW message or body]

Hi Kazutomo-san,

On Fri, Jan 15, 2010 at 11:43:14AM +0900, NAKAHIRA Kazutomo wrote:
> Hi, Dejan and Serge
> 
> Thank you for being interested in my patche.
> 
>  >>>> It is a cause that log-level of the echo command output
>  >>>> in the monitor function is set to debug2.
>  >>> Which log-level is that? echo can't have log-level.
> 
>  >>> When run from lrmd, i.e. in normal cluster operation, all
>  >>> stdout/stderr output is logged, so sending output to stdout
>  >>> shouldn't be a problem.
> According to the handle_pipe_ra_stdout() in the lrmd.c,
> two log-levels are set to the stdout output of the RA
> depending on the kind of the RA operation.
> 
> -- lrmd.c 3614-3623 --
>          if ( data!=NULL ) {
>                  if (  (0==STRNCMP_CONST(rapop->op_type, "meta-data"))
>                      ||(0==STRNCMP_CONST(rapop->op_type, "monitor"))
>                      ||(0==STRNCMP_CONST(rapop->op_type, "status")) ) {
>                          lrmd_debug2(LOG_DEBUG, "RA 
> output:(%s:%s:stdout) %s", lrm_str(rapop->rsc_id), rapop->op_type, data);
>                  } else {
>                          lrmd_log(LOG_INFO, "RA output: (%s:%s:stdout) 
> %s", lrm_str(rapop->rsc_id), rapop->op_type, data);
>                  }
> ----
> 
> It seems that log-level of the echo output in the monitor operation is
> set to "debug2".

Ugh. That really shouldn't be the case. And it is up to resource
agents not to print to stdout unnecessarily. Now, it's not clear
in which state resource agents are in this respect, so that may
never change, lest we flood the logs on the next upgrade.

> And "degub2" log messages are not recorded in the normal cluster
> operation because it is necessary to set the "debug 2" in the ha.cf.
> # Please point it out if my understanding is wrong.

That should be at least debug. Nobody's ever using debug 2.

Thanks,

Dejan

> Best Regards,
> NAKAHIRA Kazutomo
> 
> Dejan Muhamedagic wrote:
> > Hi,
> > 
> > On Wed, Jan 13, 2010 at 02:09:00PM -0700, Serge Dubrouski wrote:
> >> On Wed, Jan 13, 2010 at 3:13 AM, Dejan Muhamedagic <dejanmm@fastmail.fm> wrote:
> >>> Hi Kazutomo-san,
> >>>
> >>> On Wed, Jan 13, 2010 at 11:39:57AM +0900, NAKAHIRA Kazutomo wrote:
> >>>> Hi, all
> >>>>
> >>>> I replace echo command with ocf_log in the pgsql RA
> >>>> because echo command output in the monitor function
> >>>> was not recorded in the ha-log and ha-debug.
> >>>>
> >>>> It is a cause that log-level of the echo command output
> >>>> in the monitor function is set to debug2.
> >>> Which log-level is that? echo can't have log-level.
> >>>
> >>>> Moreover, echo command in the start/stop functions are
> >>>> replaced by ocf_log to unify the logging methods.
> >>> When run from lrmd, i.e. in normal cluster operation, all
> >>> stdout/stderr output is logged, so sending output to stdout
> >>> shouldn't be a problem.
> >>>
> >>> Cheers,
> >>>
> >>> Dejan
> >>>
> >> You are absolutely right here and results of those echo commands are
> >> logged in, at least in my configuration. But this patch makes sense
> >> anyway since it unifies output methods. So please apply it if you
> >> don't have any arguments against it.
> > 
> > None in particular. Just thought that sb may want to see the
> > output if the RA is run from the command line. I'll apply it.
> > 
> > Thanks,
> > 
> > Dejan
> > 
> >> Thanks.
> >>
> >>
> >> -- 
> >> Serge Dubrouski.
> >> _______________________________________________________
> >> 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/
> > _______________________________________________________
> > 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/
> > 
> 
> 
> -- 
> ----------------------------------------
> NAKAHIRA Kazutomo
> NTT DATA INTELLILINK CORPORATION
> Open Source Business Unit
> Software Services Integration Business Division
> _______________________________________________________
> 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/
_______________________________________________________
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