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 > Best Regards, > NAKAHIRA Kazutomo > > -- > ---------------------------------------- > NAKAHIRA Kazutomo > NTT DATA INTELLILINK CORPORATION > Open Source Business Unit > Software Services Integration Business Division > # HG changeset patch > # User r...@prec370b > # Date 1263272496 -32400 > # Node ID c425c16744c72729eac03a571e408ed14a15016b > # Parent c76b4a6eb576feb3b39852aa2349a0716bda1078 > pgsql: An echo command is replaced with ocf_log command. > > diff -r c76b4a6eb576 -r c425c16744c7 heartbeat/pgsql > --- a/heartbeat/pgsql Mon Jan 04 14:42:10 2010 +0100 > +++ b/heartbeat/pgsql Tue Jan 12 14:01:36 2010 +0900 > @@ -209,7 +209,7 @@ pgsql_start() { > ocf_log info "PostgreSQL start command sent." > else > ocf_log err "Can't start PostgreSQL." > - echo "$output" > + ocf_log info "psql command output: $output" > return $OCF_ERR_GENERIC > fi > else > @@ -260,9 +260,9 @@ pgsql_stop() { > then > #PostgreSQL is still up. Use another shutdown mode. > ocf_log info "PostgreSQL failed to stop after > ${OCF_RESKEY_stop_escalate}s using -m fast. Trying -m immediate..." > - echo "$output" > + ocf_log info "psql command output: $output" > output=`runasowner "$OCF_RESKEY_pgctl -D $OCF_RESKEY_pgdata stop -m > immediate" 2>&1` > - echo "$output" > + ocf_log info "psql command output: $output" > fi > > while : > @@ -334,7 +334,7 @@ pgsql_monitor() { > then > ocf_log err "Script error(the variable ON_ERROR_STOP was set) > occurred while executing the psql command." > fi > - echo "$output" > + ocf_log info "psql command output: $output" > return $OCF_ERR_GENERIC > fi > > _______________________________________________________ > 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/