This is not really a bug. Sure, the resource agent has defaults set that
don't match Ubuntu's, but every relevant parameter can (and probably
should) be set explicitly in the CIB. For example:
primitive p_postgresql ocf:heartbeat:pgsql \
params pgctl="/usr/lib/postgresql/9.1/bin/pg_ctl" psql="/usr/bin/psql"
pgdata="/var/lib/postgresql/9.1/main"
config="/etc/postgresql/9.1/main/postgresql.conf"
logfile="/var/log/postgresql/postgresql-9.1-main.log" \
op start interval="0" timeout="120s" \
op stop interval="0" timeout="120s" \
op monitor interval="30s" timeout="30s"
The resource agent is able to start a PostgreSQL server just fine,
having the parameters set to correct values.
--
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to pacemaker in Ubuntu.
https://bugs.launchpad.net/bugs/955164
Title:
PostgreSQL resource agent has wrong default paths
Status in “pacemaker” package in Ubuntu:
Confirmed
Bug description:
The pgsql resource agent has default paths which don't match those
used by the Ubuntu postgresql package
In the resource agent:
* The default configuration file is /etc/postgresql/9.1/main/postgresql.conf
* The default loction of pg_ctl is /usr/lib/postgresql/9.1/bin/pg_ctl
* The default data directory is given as /var/lib/pgsql/data
This causes Pacemaker to be unable to start the postgresql server, and the
following errors in /var/log/syslog:
Mar 14 14:51:38 OB1 pgsql[3533]: ERROR: Configuration file
/var/lib/pgsql/data/postgresql.conf doesn't exist
Mar 14 14:51:38 OB1 pgsql[3533]: ERROR: Setup problem: couldn't find command:
/usr/bin/pg_ctl
The problem is in the file /usr/lib/ocf/resource.d/heartbeat/pgsql
The following patch fixes these problems:
=============================================================================
--- pgsql.old 2012-03-14 15:17:09.123507205 +0000
+++ pgsql 2012-03-14 15:19:37.521641615 +0000
@@ -45,13 +45,13 @@
}
# Defaults
-OCF_RESKEY_pgctl_default=/usr/bin/pg_ctl
+OCF_RESKEY_pgctl_default=/usr/lib/postgresql/9.1/bin/pg_ctl
OCF_RESKEY_psql_default=/usr/bin/psql
-OCF_RESKEY_pgdata_default=/var/lib/pgsql/data
+OCF_RESKEY_pgdata_default=/var/lib/postgresql/9.1/main
OCF_RESKEY_pgdba_default=postgres
OCF_RESKEY_pghost_default=""
OCF_RESKEY_pgport_default=5432
-OCF_RESKEY_config_default=""
+OCF_RESKEY_config_default=/etc/postgresql/9.1/main/postgresql.conf
OCF_RESKEY_start_opt_default=""
OCF_RESKEY_pgdb_default=template1
OCF_RESKEY_logfile_default=/dev/null
=============================================================================
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pacemaker/+bug/955164/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-ha
Post to : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help : https://help.launchpad.net/ListHelp