[Linux-ha-jp] cib.xmlのon_failの設定ついて

Back to archive index

takahasi hideo hideo_tk960****@hotma*****
2011年 10月 12日 (水) 20:01:53 JST


お世話になっております。
高橋です。
cib.xmlのon_failの設定についてご質問させください。
現在 heartbeat 2.1.4 + drbd + postgres 8.2.3にて、
システム構築しております。

cib.xmlの設定にて現在以下の2通りの設定で悩んでおります。
設定1
--ここから---
 <primitive class="ocf" provider="heartbeat" type="pgsql" id="pgsql0">
           <instance_attributes id="ia-pgsql0">
             <attributes>
               <nvpair id="ia-pgsql0-1" name="pgctl" value="/usr/local/pgsql/bin/pg_ctl"/>
               <nvpair id="ia-pgsql0-2" name="psql" value="/usr/local/pgsql/bin/psql"/>
               <nvpair id="ia-pgsql0-3" name="pgdata" value="/data/pgsql/data/"/>
               <nvpair id="ia-pgsql0-4" name="pgdba" value="postgres"/>
               <nvpair id="ia-pgsql0-5" name="pgdb" value="check"/>
               <nvpair id="ia-pgsql0-6" name="logfile" value="/var/log/postgresql/postgresql_log"/>
             </attributes>
           </instance_attributes>
           <operations>
             <op id="pgsql0_mon" interval="30s" name="monitor" timeout="60s" on_fail="restart"/>
             <op id="pgsql0_start" name="start" timeout="60s" on_fail= "restart"/>
             <op id="pgsql0_stop" name="stop" timeout="60s" on_fail="block"/>
           </operations>
         </primitive>
--ここまで--

設定2

--ここから---
 
<primitive class="ocf" provider="heartbeat" type="pgsql" id="pgsql0">

           <instance_attributes id="ia-pgsql0">

             <attributes>

               <nvpair id="ia-pgsql0-1" name="pgctl" value="/usr/local/pgsql/bin/pg_ctl"/>

               <nvpair id="ia-pgsql0-2" name="psql" value="/usr/local/pgsql/bin/psql"/>

               <nvpair id="ia-pgsql0-3" name="pgdata" value="/data/pgsql/data/"/>

               <nvpair id="ia-pgsql0-4" name="pgdba" value="postgres"/>

               <nvpair id="ia-pgsql0-5" name="pgdb" value="check"/>

               <nvpair id="ia-pgsql0-6" name="logfile" value="/var/log/postgresql/postgresql_log"/>

             </attributes>

           </instance_attributes>

           <operations>

             <op id="pgsql0_mon" interval="30s" name="monitor" timeout="60s">

             <op id="pgsql0_start" name="start" timeout="60s" >

             <op id="pgsql0_stop" name="stop" timeout="60s" >

           </operations>

         </primitive>

--ここまで--

設定1では <operations>の箇所に
on_failを設定し、restartを設定しております。
設定2ではon_failを指定を行っていません。
設定1と設定2は両方ともフェイルオーバーされますが、
on_failにrestartを設定した場合しない場合にはどうような動作の違いがあるのでしょうか?

動作検証のためpgsql0_monの箇所でタイムアウトを故意に発生されたのですが、
どちらもフェイルオーバーされました。
on_failにrestartを設定した場合はrestartが設定されている処理が再度実行されるのでしょうか?
またon_failにblockを指定した場合はどのようになるのでしょうか?


以上 よろしくお願いします






 		 	   		  
-------------- next part --------------
HTMLの添付ファイルを保管しました...
下载 



Linux-ha-japan メーリングリストの案内
Back to archive index