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.
Moreover, echo command in the start/stop functions are
replaced by ocf_log to unify the logging methods.
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: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/