Public bug reported:

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
=============================================================================

** Affects: pacemaker (Ubuntu)
     Importance: Undecided
         Status: New

-- 
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:
  New

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

Reply via email to