View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000091 | pgpool-HA | Bug | public | 2014-01-11 09:15 | 2014-01-28 13:50 |
| Reporter | maxiperez | Assigned To | |||
| Priority | high | Severity | major | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Platform | x86_64 | OS | Linux 2.6.32-431.3.1.el6.x86_6 | OS Version | CentOS 6.5 |
| Summary | 0000091: Can't use pgpool-ha with CentoOS 6.5 ccs/pacemaker (Error: Unable to parse xml for: pgpool) | ||||
| Description | I have a new Cluster with Postgres 9 and SR working nicely. Last updated: Fri Jan 10 01:13:11 2014 Last change: Fri Jan 10 01:13:04 2014 via crm_attribute on pg01 Stack: cman Current DC: pg01 - partition with quorum Version: 1.1.10-14.el6_5.1-368c726 2 Nodes configured 4 Resources configured Online: [ pg01 pg02 ] Full list of resources: Master/Slave Set: mxdb-msPostgresql [mxdb-motor] Masters: [ pg01 ] Slaves: [ pg02 ] Resource Group: mxdb-group mxdb-vip-master (ocf::heartbeat:IPaddr2): Started pg01 mxdb-vip-rep (ocf::heartbeat:IPaddr2): Started pg01 Node Attributes: * Node pg01: + master-mxdb-motor : 1000 + mxdb-motor-data-status : LATEST + mxdb-motor-master-baseline : 000000000B022DD8 + mxdb-motor-status : PRI * Node pg02: + master-mxdb-motor : 100 + mxdb-motor-data-status : STREAMING|SYNC + mxdb-motor-status : HS:sync Migration summary: * Node pg01: * Node pg02: When I want to use pgpool-ha RA it keeps saying there is an XML parse error inside python: [root@pg01 pgpool-ha-2.1]# ./configure.sh --with-pgsql=/usr/pgsql-9.3 --with-pgpool=/usr PGSQL_DIR: /usr/pgsql-9.3 PGPOOL_DIR: /usr OCF_DIR: /usr/lib/ocf/resource.d/heartbeat Makefile generated [root@pg01 pgpool-ha-2.1]# make ; make install sed -e 's#@_PGSQL_DIR_@#/usr/pgsql-9.3#g' < pgpool.in | \ sed -e 's#@_PGPOOL_DIR_@#/usr#g' | \ sed -e 's#@_OCF_DIR_@#/usr/lib/ocf/resource.d/heartbeat#g' > pgpool /usr/bin/install -c -m 755 pgpool /usr/lib/ocf/resource.d/heartbeat [root@pg01 pgpool-ha-2.1]# [root@pg01 pgpool-ha-2.1]# ls -la /usr/lib/ocf/resource.d/heartbeat/pgpool -rwxr-xr-x. 1 root root 11923 Jan 10 01:07 /usr/lib/ocf/resource.d/heartbeat/pgpool [root@pg01 pgpool-ha-2.1]# pcs resource describe pgpool Resource options for: ocf:heartbeat:pgpool Error: Unable to parse xml for: pgpool But other RA are parsed OK: [root@pg01 pgpool-ha-2.1]# pcs resource describe Squid Resource options for: ocf:heartbeat:Squid squid_exe (required): This is a required parameter. This parameter specifies squid's executable file. squid_conf (required): This is a required parameter. This parameter specifies a configuration file for a squid instance managed by this RA. squid_pidfile (required): This is a required parameter. This parameter specifies a process id file for a squid instance managed by this RA. squid_port (required): This is a required parameter. This parameter specifies a port number for a squid instance managed by this RA. If plural ports are used, you must specifiy the only one of them. squid_stop_timeout: On stop, a squid shutdown is invoked first. If the resource doesn't stop within this timeout, we resort to stopping processes by sending signals and finally KILLing them. debug_mode: This is an optional parameter. This RA runs in debug mode when this parameter includes 'x' or 'v'. If 'x' is included, both of STDOUT and STDERR redirect to the logfile specified by "debug_log", and then the builtin shell option 'x' is turned on. It is similar about 'v'. debug_log: This is an optional and omittable parameter. This parameter specifies a destination file for debug logs and works only if this RA run in debug mode. Refer to "debug_mode" about debug mode. If no value is given but it's requied, it's made by the following rules: "/var/log/" as a directory part, the basename of the configuration file given by "syslog_ng_conf" as a basename part, ".log" as a suffix. [root@pg01 pgpool-ha-2.1]# [root@pg01 ~]# pcs resource create mxdb-pgpool pgpool \ > pgpoolconf="/bases/mx/pgpool-II-93/pgpool.conf" \ > pcpconf="/bases/mx/pgpool-II-93/pcp.conf" \ > hbaconf="/bases/mx/pgpool-II-93/pool_hba.conf" \ > logfile="/bases/mx/log/pgpool.log" \ > checkmethod="pcp" \ > checkstring="10 localhost 40015 postgres postgres" \ > options="" \ > pgpooluser="postgres" \ > op monitor interval="60s" \ > op start interval="0" timeout="60" \ > op stop interval="0" timeout="60" Traceback (most recent call last): File "/usr/sbin/pcs", line 129, in <module> main(sys.argv[1:]) File "/usr/sbin/pcs", line 108, in main resource.resource_cmd(argv) File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 71, in resource_cmd resource_create(res_id, res_type, ra_values, op_values, meta_values, clone_opts) File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 330, in resource_create bad_opts = utils.validInstanceAttributes(ra_id, params , get_full_ra_type(ra_type, True)) File "/usr/lib/python2.6/site-packages/pcs/utils.py", line 1003, in validInstanceAttributes root = ET.fromstring(metadata) File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 963, in XML parser.feed(text) File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 1245, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: junk after document element: line 110, column 0 I can’t see what is going on wrong…..maybe this is not supported with CMAN+pcs? [root@pg01 ~]# rpm -qa | grep ccs ccs-0.16.2-69.el6_5.1.x86_64 [root@pg01 ~]# rpm -qa | grep pace pacemaker-cli-1.1.10-14.el6_5.1.x86_64 pacemaker-libs-1.1.10-14.el6_5.1.x86_64 pacemaker-1.1.10-14.el6_5.1.x86_64 pacemaker-cluster-libs-1.1.10-14.el6_5.1.x86_64 [root@pg01 ~]# rpm -qa | grep cman cman-3.0.12.1-59.el6_5.1.x86_64 [root@pg01 pgpool-ha-2.1]# cat test.sh #!/bin/sh export OCF_ROOT=/usr/lib/ocf export OCF_RESOURCE_INSTANCE=test_res export OCF_RESKEY_pgpoolconf="/bases/mx/pgpool-II-93/pgpool.conf" export OCF_RESKEY_pcpconf="/bases/mx/pgpool-II-93/pcp.conf" export OCF_RESKEY_hbaconf="/bases/mx/pgpool-II-93/pool_hba.conf" export OCF_RESKEY_logfile="" export OCF_RESKEY_options="-D" export OCF_RESKEY_pgpooluser="postgres" # export OCF_RESKEY_checkmethod="pid" # export OCF_RESKEY_checkstring="" export OCF_RESKEY_checkmethod="pcp" export OCF_RESKEY_checkstring="10 localhost 40015 postgres postgres" #export OCF_RESKEY_checkmethod="psql" #export OCF_RESKEY_checkstring="-h localhost -U postgres -p 5432 -c \\'SELECT 1\\'" sh pgpool $* [root@pg01 pgpool-ha-2.1]# ./test.sh meta-data <?xml version="1.0"?> <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> <resource-agent name="pgpool"> <version>2.1</version> <longdesc lang="en"> This is an OCF Resource Agent for pgpool-II. </longdesc> <shortdesc lang="en">OCF Resource Agent for pgpool-II</shortdesc> <parameters> <parameter name="pgpoolconf" unique="0" required="0"> <longdesc lang="en"> Path to pgpool.conf of pgpool. </longdesc> <shortdesc lang="en">pgpool.conf path</shortdesc> <content type="string" default="/usr/etc/pgpool.conf" /> </parameter> <parameter name="pcpconf" unique="0" required="0"> <longdesc lang="en"> Path to pcp.conf of pgpool. </longdesc> <shortdesc lang="en">pcp.conf path</shortdesc> <content type="string" default="" /> </parameter> <parameter name="hbaconf" unique="0" required="0"> <longdesc lang="en"> Path to pool_hba.conf of pgpool. </longdesc> <shortdesc lang="en">pool_hba.conf path</shortdesc> <content type="string" default="" /> </parameter> <parameter name="logfile" unique="0" required="0"> <longdesc lang="en"> 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" </longdesc> <shortdesc lang="en">pgpool logfile</shortdesc> <content type="string" default="" /> </parameter> <parameter name="options" unique="0" required="0"> <longdesc lang="en"> pgpool command line options (except configuration file options). </longdesc> <shortdesc lang="en">pgpool command line options</shortdesc> <content type="string" default="" /> </parameter> <parameter name="pgpooluser" unique="0" required="0"> <longdesc lang="en"> pgpool run as this user. </longdesc> <shortdesc lang="en">pgpool user</shortdesc> <content type="string" default="postgres" /> </parameter> <parameter name="checkmethod" unique="0" required="0"> <longdesc lang="en"> monitoring method type. "pid" process existence check only. "pcp" check by pcp_node_count command. "psql" check by psql command. </longdesc> <shortdesc lang="en">monitoring method type</shortdesc> <content type="string" default="pid" /> </parameter> <parameter name="checkstring" unique="0" required="0"> <longdesc lang="en"> 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" </longdesc> <shortdesc lang="en">a parameter for monitoring method</shortdesc> <content type="string" default="" /> </parameter> <parameter name="pgpoolcmd" unique="0" required="0"> <longdesc lang="en"> pgpool command. </longdesc> <shortdesc lang="en"></shortdesc> <content type="string" default="/usr/bin/pgpool" /> </parameter> <parameter name="psqlcmd" unique="0" required="0"> <longdesc lang="en"> psql command. </longdesc> <shortdesc lang="en">psql command</shortdesc> <content type="string" default="/usr/pgsql-9.3/bin/psql" /> </parameter> <parameter name="pcpnccmd" unique="0" required="0"> <longdesc lang="en"> pcp_node_count command. </longdesc> <shortdesc lang="en">pcp_node_count command</shortdesc> <content type="string" default="/usr/bin/pcp_node_count" /> </parameter> </parameters> <actions> <action name="start" timeout="20" /> <action name="stop" timeout="20" /> <action name="monitor" depth="0" timeout="20" interval="10" /> <action name="reload" timeout="20" /> <action name="meta-data" timeout="5" /> <action name="validate-all" timeout="5" /> </actions> </resource-agent> DEBUG: test_res: meta-data returned 0 [root@pg01 pgpool-ha-2.1]# | ||||
| Tags | No tags attached. | ||||
|
|
Same error with pgpool-ha-2.0. BTW, pgpool-ha-1.3 works well: [root@pg02 src]# pcs resource describe pgpool Resource options for: ocf:heartbeat:pgpool pgpoolconf: Path to pgpool.conf pcpconf: Path to pcp.conf. pgpool-II only. hbaconf: Path to pool_hba.conf. requires pgpool > 3.2 only. logfile: Path to output logfile . logfile contains debuglog. if this entry is empty , log output is depends on pgpool. pidfile: Path to pgpool.pid options: additional options of pgpool-II start command. (e.g. -d) pgpooluser: pgpool-II user. (e.g. "postgres"(default), "pgpool" or "root") |
|
|
I have the same problem with pgpool-HA v2.1 |
|
|
I fix it. Thanks your detailed analysis. http://git.postgresql.org/gitweb/?p=pgpoolha.git;a=commit;h=a41add614b72e0a286c3e47efa09686c6806c8b3 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-01-11 09:15 | maxiperez | New Issue | |
| 2014-01-11 23:43 | maxiperez | Note Added: 0000383 | |
| 2014-01-23 00:32 | asgaroth | Note Added: 0000386 | |
| 2014-01-28 12:07 | harukat | Note Added: 0000389 | |
| 2014-01-28 13:50 | nagata | Status | new => closed |
| 2014-01-28 13:50 | nagata | Resolution | open => fixed |