Hi Serge, I add a patch, too. Because runasowner adopted ocf_run, there is useless "if" statement. (ocf_run return only 0 or 1.)
diff -r 49603d860cf7 heartbeat/pgsql
--- a/heartbeat/pgsql Thu Sep 02 10:17:59 2010 +0900
+++ b/heartbeat/pgsql Thu Sep 02 10:20:31 2010 +0900
@@ -422,13 +422,6 @@
rc=$?
if [ $rc -ne 0 ]; then
ocf_log $loglevel "PostgreSQL $OCF_RESKEY_pgdb isn't running"
- if [ $rc -eq 1 ]; then
- ocf_log err "Fatal error (out of memory, file not found, etc.)
occurred while executing
the psql command."
- elif [ $rc -eq 2 ]; then
- ocf_log $loglevel "Connection error (connection to the server went
bad and the session
was not interactive) occurred while executing the psql command."
- elif [ $rc -eq 3 ]; then
- ocf_log err "Script error (the variable ON_ERROR_STOP was set)
occurred while executing
the psql command."
- fi
return $OCF_ERR_GENERIC
fi
Best Regards,
Hideo Yamauchi.
--- Serge Dubrouski <[email protected]> wrote:
> Attached is a patch for pgsql to fix the problem with access to the
> /var/lib/heartbeat/cores/root directory at runtime.
>
> --
> Serge Dubrouski.
> > diff -r 7200186935f1 heartbeat/pgsql
> --- a/heartbeat/pgsql Tue Aug 31 17:01:39 2010 +0900
> +++ b/heartbeat/pgsql Wed Sep 01 10:42:25 2010 -0600
> @@ -229,7 +229,7 @@
> shift 1
> }
>
> - ocf_run $quietrun su $OCF_RESKEY_pgdba -c "$*"
> + ocf_run $quietrun su $OCF_RESKEY_pgdba -c "cd $OCF_RESKEY_pgdata; $@"
> }
>
> #
> > _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>
pgsql-0902.patch
Description: 38914662-pgsql-0902.patch
_______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
