View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000099 | pgpool-HA | Bug | public | 2014-04-28 20:55 | 2016-05-06 19:00 |
| Reporter | asgaroth | Assigned To | harukat | ||
| Priority | high | Severity | major | Reproducibility | always |
| Status | assigned | Resolution | open | ||
| Platform | x86_64 | OS | CentOS | OS Version | 6.5 |
| Summary | 0000099: PGPool HA v2.2 unable to parse xml output | ||||
| Description | Using pgpool-ha-2.2 on centOS 6.5 I am unable to describe the parameters required for the resource agent. For example: # pcs resource describe pgpool Resource options for: ocf:heartbeat:pgpool Error: Unable to parse xml for: pgpool | ||||
| Steps To Reproduce | [1] Install CentOS 6.5 with Pacemaker/CMAN stack [2] Install pgpool-ha-2.2 Run: pcs resource describe pgpool | ||||
| Additional Information | This appears to be the same issue as listed int bug id 0000091: http://www.pgpool.net/mantisbt/view.php?id=91 I had a look at the commit posted there and this appears to be included in v2.2, but I am still getting the same error message | ||||
| Tags | No tags attached. | ||||
|
|
I think I found the issue, the problem appears to be with this part of the code: 86 if [ ! -e $OCF_RESKEY_pgpoolconf ]; then 87 ocf_log warn "${OCF_RESOURCE_INSTANCE}: file '$OCF_RESKEY_pgpoolconf' (pgpoolconf) does not exists." 88 89 else 90 PIDFILE=$(cat "$OCF_RESKEY_pgpoolconf" | grep "^pid_file_name" | cut -d "'" -f 2) 91 92 fi With the default setting of the config file being: OCF_RESKEY_pgpoolconf_default="/usr/pgpool-9.3/etc/pgpool.conf" Running "pcs --debug resource descibe pgpool" Gives the following output (snipped for brevity) # pcs --debug resource describe pgpool Running: /usr/lib/ocf/resource.d/heartbeat/pgpool meta-data Return Value: 0 --Debug Output Start-- WARNING: default: file '/usr/pgpool-9.3/etc/pgpool.conf' (pgpoolconf) does not exists. <?xml version="1.0"?> <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> NOTE: Notice the WARNING message at the top about not finding the config file. If I then go ahead and set the config file deafult to: OCF_RESKEY_pgpoolconf_default="" I then get the following error: # pcs --debug resource describe pgpool Running: /usr/lib/ocf/resource.d/heartbeat/pgpool meta-data Return Value: 0 --Debug Output Start-- cat: : No such file or directory <?xml version="1.0"?> <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> <resource-agent name="pgpool"> NOTE: Notice the error returned by cat command However, when I set it to a file that exists, like below: OCF_RESKEY_pgpoolconf_default="/etc/pgpool-II-93/pgpool.conf.sample" Then the command completes successfully: # pcs resource describe pgpool Resource options for: ocf:heartbeat:pgpool pgpoolconf: Path to pgpool.conf of pgpool. pcpconf: Path to pcp.conf of pgpool. hbaconf: Path to pool_hba.conf of pgpool. logfile: pgpool log file for stdout and stderr redirection; or a program for log collecting by a pipeline. (e.g.) "/var/log/pgpool.log", "| logger -t pgpool -p local3.info" options: pgpool command line options (except configuration file options). pgpooluser: pgpool run as this user. checkmethod: monitoring method type. "pid" process existence check only. "pcp" check by pcp_node_count command. "psql" check by psql command. checkstring: parameter for monitoring method. when checkmetod="pid", this means pidfile path. (e.g.) "/var/run/pgpool/pgpool.pid" when checkmetod="pcp", this means a parameter string for pcp_node_count. (e.g.) "10 localhost 9898 postgres pass" when checkmetod="psql", this means a parameter string for psql. (e.g.) "-U postgres -h localhost -l -p 9999" pgpoolcmd: pgpool command. psqlcmd: psql command. pcpnccmd: pcp_node_count command. Maybe we need to improve that initial check, or, possibly move it to the start block so that it does not interfere with any of the other functions chosen in the case statement, or move it to it's own function which is called from the other functions that require those commands to be run beforehand. |
|
|
Another option is to check for a default pgpool config file at the src configuration stage, maybe add as an option to "configure" |
|
|
I confirmed it as the following. CentOS 6.x + Pacemaker 1.0.x : # rpm -q pcs pcs-0.9.139-9.el6_7.2.x86_64 # pcs resource describe pgpool --> doesn't occur that # pcs --debug resource describe pgpool --> doesn't occur that # rpm -qf /usr/sbin/crm pacemaker-1.0.12-1.el6.x86_64 # crm ra info pgpool --> after closing pager's screen, WARNING appeared CentOS 7.x + Pacemaker 1.1.x : # rpm -qf /sbin/crm crmsh-2.1.4-1.el7.x86_64 # rpm -q pcs pcs-0.9.141-1.el7.x86_64 # crm ra info pgpool --> doesn't occur that # pcs --debug resource describe pgpool --> doesn't occur that # pcs resource describe pgpool --> doesn't occur that |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-04-28 20:55 | asgaroth | New Issue | |
| 2014-04-29 17:12 | asgaroth | Note Added: 0000408 | |
| 2014-04-29 17:21 | asgaroth | Note Added: 0000409 | |
| 2016-05-06 18:57 | harukat | Note Added: 0000794 | |
| 2016-05-06 19:00 | harukat | Assigned To | => harukat |
| 2016-05-06 19:00 | harukat | Status | new => assigned |