[pgpool-general-jp: 823] pgpool-ha

ポンパー revivex36 @ gmail.com
2010年 10月 10日 (日) 05:57:13 JST


お世話になります。

OSは CENTOS5 64BITと pgpool-II-3.0 pgpool-ha-1.2 および heartbeat.x86_64
2.1.3-3.el5.centos を使っています。
CIB.XMLファイルに HTTPDを先にHA化して動作が確認されて問題が無い状況で以下の部分だけ追加しています。
(HTTPDが落ちても、自動的にHAが働くようになっていました。基本的にはHAが問題なくHTTPDを監視している状況です。)

         <primitive id="resource_pgpool2" class="ocf" type="pgpool"
provider="heartbeat">
           <meta_attributes id="resource_pgpool2_meta_attrs">
             <attributes>
               <nvpair id="resource_pgpool2_metaattr_target_role"
name="target_role" value="started"/>
             </attributes>
           </meta_attributes>
           <instance_attributes id="resource_pgpool2_instance_attrs">
             <attributes>
               <nvpair id="5adb33f4-6641-41a2-be3d-31264c579a67"
name="pgpoolconf" value="/usr/local/etc/pgpool.conf"/>
               <nvpair id="db163efd-0e00-41f1-9a4b-dfa3c5b299e0"
name="pcpconf" value="/usr/local/etc/pool_ha/pcp.conf"/>
               <nvpair id="9f69680a-ca9c-44b5-9644-d35e1b0286d4"
name="hbaconf" value="/usr/local/etc/pool_hba.conf"/>
               <nvpair id="1fabaefd-716d-4f6c-8827-0cd79e8505ae"
name="logfile" value="/tmp/pgpool.log"/>
               <nvpair id="ff4d7726-7bc1-4f3d-8d0e-8bc4aafafbf7"
name="pidfile" value="/var/run/pgpool/pgpool.pid"/>
             </attributes>
           </instance_attributes>
           <operations>
             <op id="op_pool_mon" name="monitor" interval="10" timeout="20"
start_delay="1m"/>
             <op id="op_pool_start" name="start" timeout="20"/>
             <op id="op_pool_stop" name="stop" timeout="20"/>
           </operations>
         </primitive>


HEARTBEATのLOGを見る限りPGPOOLを立ち上げているようですが、実際には立ち上がりません。
 以下はHEARTBEATのLOGです。

crmd[20363]: 2010/10/09_13:29:49 info: process_lrm_event: LRM operation
httpd_2_start_0 (call=50, rc=0) complete
crmd[20363]: 2010/10/09_13:29:49 info: process_lrm_event: LRM operation
IPaddr_113_212_74_9_monitor_5000 (call=49, rc=0) complete
crmd[20363]: 2010/10/09_13:29:50 info: do_lrm_rsc_op: Performing
op=httpd_2_monitor_120000 key=1:32:6c809822-5155-48ba-b080-3717062cb8e3)
crmd[20363]: 2010/10/09_13:29:50 info: do_lrm_rsc_op: Performing
op=resource_pgpool2_start_0 key=13:32:6c809822-5155-48ba-b080-3717062cb8e3)
lrmd[20360]: 2010/10/09_13:29:50 info: rsc:resource_pgpool2: start
crmd[20363]: 2010/10/09_13:29:50 info: process_lrm_event: LRM operation
httpd_2_monitor_120000 (call=44, rc=-2) Cancelled
crmd[20363]: 2010/10/09_13:29:50 info: process_lrm_event: LRM operation
httpd_2_monitor_120000 (call=51, rc=0) complete
pgpool[22504]:  2010/10/09_13:29:50 INFO: pgpoolRA: su -c " nohup
/usr/local/bin/pgpool -f /usr/local/etc/pgpool.conf -a
/usr/local/etc/pool_hba.conf -F /usr/local/etc/pool_ha/pcp.conf  -n
>>/tmp/pgpool.log 2>&1 & " postgres
crmd[20363]: 2010/10/09_13:29:50 info: process_lrm_event: LRM operation
resource_pgpool2_start_0 (call=52, rc=0) complete
crmd[20363]: 2010/10/09_13:29:52 info: do_lrm_rsc_op: Performing
op=resource_pgpool2_monitor_10000
key=2:32:6c809822-5155-48ba-b080-3717062cb8e3)
crmd[20363]: 2010/10/09_13:30:52 info: process_lrm_event: LRM operation
resource_pgpool2_monitor_10000 (call=53, rc=7) complete
crmd[20363]: 2010/10/09_13:30:54 info: do_lrm_rsc_op: Performing
op=resource_pgpool2_stop_0 key=3:33:6c809822-5155-48ba-b080-3717062cb8e3)
lrmd[20360]: 2010/10/09_13:30:54 info: rsc:resource_pgpool2: stop
crmd[20363]: 2010/10/09_13:30:54 info: process_lrm_event: LRM operation
resource_pgpool2_monitor_10000 (call=53, rc=-2) Cancelled
pgpool[22706]:  2010/10/09_13:30:54 INFO: pgpoolRA: request stop, but not
running.
crmd[20363]: 2010/10/09_13:30:54 info: process_lrm_event: LRM operation
resource_pgpool2_stop_0 (call=54, rc=0) complete
crmd[20363]: 2010/10/09_13:30:55 info: do_lrm_rsc_op: Performing
op=IPaddr_111_222_333_444_start_0
key=10:33:6c809822-5155-48ba-b080-3717062cb8e3)
lrmd[20360]: 2010/10/09_13:30:55 info: rsc:IPaddr_113_212_74_9: start
IPaddr[22735]:  2010/10/09_13:30:55 INFO: Using calculated nic for
111.222.333.444: eth0
IPaddr[22735]:  2010/10/09_13:30:55 INFO: Using calculated netmask for
111.222.333.444: 255.255.255.0
crmd[20363]: 2010/10/09_13:30:55 info: process_lrm_event: LRM operation
IPaddr_111_222_333_444_start_0 (call=55, rc=0) complete
crmd[20363]: 2010/10/09_13:30:56 info: do_lrm_rsc_op: Performing
op=IPaddr_111_222_333_444_monitor_5000
key=4:33:6c809822-5155-48ba-b080-3717062cb8e3)
crmd[20363]: 2010/10/09_13:30:56 info: do_lrm_rsc_op: Performing
op=httpd_2_start_0 key=12:33:6c809822-5155-48ba-b080-3717062cb8e3)
lrmd[20360]: 2010/10/09_13:30:56 info: rsc:httpd_2: start
lrmd[22800]: 2010/10/09_13:30:56 WARN: For LSB init script, no additional
parameters are needed.
crmd[20363]: 2010/10/09_13:30:56 info: process_lrm_event: LRM operation
IPaddr_111_222_333_444_monitor_5000 (call=49, rc=-2) Cancelled
lrmd[20360]: 2010/10/09_13:30:56 info: RA output: (httpd_2:start:stdout)
Starting httpd:
lrmd[20360]: 2010/10/09_13:30:56 info: RA output: (httpd_2:start:stdout)
crmd[20363]: 2010/10/09_13:30:56 info: process_lrm_event: LRM operation
httpd_2_start_0 (call=57, rc=0) complete
crmd[20363]: 2010/10/09_13:30:56 info: process_lrm_event: LRM operation
IPaddr_111_222_333_444_monitor_5000 (call=56, rc=0) complete
crmd[20363]: 2010/10/09_13:30:57 info: do_lrm_rsc_op: Performing
op=httpd_2_monitor_120000 key=1:33:6c809822-5155-48ba-b080-3717062cb8e3)
crmd[20363]: 2010/10/09_13:30:57 info: do_lrm_rsc_op: Performing
op=resource_pgpool2_start_0 key=13:33:6c809822-5155-48ba-b080-3717062cb8e3)
lrmd[20360]: 2010/10/09_13:30:57 info: rsc:resource_pgpool2: start
crmd[20363]: 2010/10/09_13:30:57 info: process_lrm_event: LRM operation
httpd_2_monitor_120000 (call=51, rc=-2) Cancelled
crmd[20363]: 2010/10/09_13:30:57 info: process_lrm_event: LRM operation
httpd_2_monitor_120000 (call=58, rc=0) complete
pgpool[22817]:  2010/10/09_13:30:57 INFO: pgpoolRA: su -c " nohup
/usr/local/bin/pgpool -f /usr/local/etc/pgpool.conf -a
/usr/local/etc/pool_hba.conf -F /usr/local/etc/pool_ha/pcp.conf  -n
>>/tmp/pgpool.log 2>&1 & " postgres
crmd[20363]: 2010/10/09_13:30:57 info: process_lrm_event: LRM operation
resource_pgpool2_start_0 (call=59, rc=0) complete
crmd[20363]: 2010/10/09_13:30:58 info: do_lrm_rsc_op: Performing
op=resource_pgpool2_monitor_10000
key=2:33:6c809822-5155-48ba-b080-3717062cb8e3)

PGPOOL-HAの参考TXTのCIB.XMLを使うとPGPOOLは立ち上がらないので、一旦HTTPDで作成したCIB.XMLに追加で上のPGPOOLのprimitive部分だけを
COPYペーストして、  cibadmin -U -x /var/lib/heartbeat/crm/cib.xml を実行しています。また当然ですが
[root @ host]# crm_resource --locate -r pgpool_2
Resource pgpool_2 not found: The object/attribute does not exist
Error performing operation: The object/attribute does not exist

また、crm_mon -i 3 の出力結果では
2 Nodes configured.
1 Resources configured.
============
Node: host01.domain.com (9ccf5916-5487-450f-961e-4d84907077d4): online
Node: host02.domain.com (dfff6205-74c6-4860-b4b9-ff9accbdcac5): online
Resource Group: group_1
    IPaddr_111_222_333_444 (heartbeat::ocf:IPaddr):        Started
host01.domain.com
    httpd_2     (lsb:httpd):    Started host01.domain.com
    resource_pgpool2    (heartbeat::ocf:pgpool):        Started
host01.domain.com
それと、/etc/ha.d/haresources には

host01 111.222.333.444. httpd

と設定してあります。HTTPDはLSBでPGPOOLはOCFなので このファイルにはPGPOOLと書き込んでいません。

HTTPDだけで作成したCIB.XMLに、ただ単に、
<primitive id="resource_pgpool2" class="lsb" type="pgpool"
provider="heartbeat">とLSBで追加した場合には問題なく
立ち上がります。ただしこの状況ではPGPOOLのモニターは出来ていない設定なりますね?

このHAの設定について参考資料があれば教えていただきたくお願いします。
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: http://www.sraoss.jp/pipermail/pgpool-general-jp/attachments/20101009/ca11293b/attachment.html 


pgpool-general-jp メーリングリストの案内