[Linux-ha-jp] stonith-helperの動作について

Zurück zum Archiv-Index

midja****@tsuna***** midja****@tsuna*****
2013年 6月 26日 (水) 09:53:52 JST


松浦です

あかわだ様
ありがとうございました。
ご指摘の部分の修正で無事正常に動作することが確認できました。

以上です。

> 松浦様
> 
> おかわだです。
> 
> 回答します。
> >【問題】
> > 動作評価のためにインターコネクトLANをすべて抜いてSTONITHの動作を確認したところ
> > プライマリ、セカンダリの状態にかかわらずnode01.hoge.com(192.168.0.1)が再起動するようになった
> 
> > あと、質問ですが
> > stonith-helperでACT-SBY判定して、この際ACTが生き残るのが正しい動作ですよね?
> > このACT-SBY判定は何を以て判断しているのでしょうか?
> 
> まず、stonith-helperを使用している場合、ご認識通り、ACT-SBY判定して、
> ACTが生き残るのが正しい動作となります。
> 
> その際に、ACTノードの判定を行っているのが以下の設定です。
> ---
> standby_check_command="/usr/sbin/crm_resource -r vip -W | grep -q `hostname`" \
> ---
> 
> stonith-helperプラグインが実行されると、dead_check_targetに設定されたIPの死活監視を行った
> あと、standby_check_commandのコマンドを実行して、"vip"のリソースIDが起動しているかどうかで
> ACTノード判定を行います。
> 
> 従って、【問題】の事象の原因は、standby_check_commandにて確認している
> リソースID"vip"がnode01.hoge.com、node02.hoge.comのどちらにも
> 存在しなかったことと考えられます。
> 
> 松浦様の環境ですと、プライマリに存在するリソースIDとして"res_vip"を設定してあげると
> 想定の動作となると思います。
> ---
> standby_check_command="/usr/sbin/crm_resource -r res_vip -W | grep -q `hostname`" \
> ---
> 
> 
> On Tue, 25 Jun 2013 18:03:27 +0900
> midja****@tsuna***** wrote:
> 
> > 松浦と申します。
> > 
> > アドバイスをいただきたくメールさせていただきました。
> > 
> > 以前STONITHの動作について質問いたしました。
> > その後、gihyo.jpの紹介ページ(http://gihyo.jp/admin/serial/01/pacemaker/0004?page=1)に設定ファイル例としてある
> > apache+stonith.crmファイル((http://image.gihyo.co.jp/assets//files/admin/serial/01/pacemaker/0004/apache+stonith.crm)
> > を参考にstonith-helper,meatwareを設定しました。
> > 
> > 【問題】
> > 動作評価のためにインターコネクトLANをすべて抜いてSTONITHの動作を確認したところ
> > プライマリ、セカンダリの状態にかかわらずnode01.hoge.com(192.168.0.1)が再起動するようになった
> > 
> > 【構成】
> > ノード             :node01.hoge.com         , node02.hoge.com
> > サービスLAN        :192.168.0.1             , 192.168.0.2
> > 仮想IP             :192.168.0.3
> > インターコネクトLAN:192.168.1.1/192.168.2.1 , 192.168.1.2/192.168.2.2
> > IPMIポート         :192.168.3.10            , 192.168.3.20
> > 
> > 使用しているRA     :drbd , Filesystem , IPaddr2 , pingd
> > 
> > 【以下設定したファイル】
> > ----ここから-------------------------------------------------
> > #####クラスタ全体に関係する設定
> > property $id="cib-bootstrap-options" \
> >      no-quorum-policy="ignore"       \
> >      stonith-enabled="true"          \
> >      startup-fencing="false"
> > 
> > #####リソース動作のデフォルト値を設定
> > rsc_defaults $id="rsc-options"      \
> >      resource-stickiness="INFINITY" \
> >      migration-threshold="1"
> > 
> > #####リソースを登録
> > #DRBD
> > primitive res_drbd0 ocf:linbit:drbd \
> >      params                         \
> >           drbd_resource="r0"        \
> >           drbdconf="/etc/drbd.conf" \
> >      op start   timeout="240s" interval="0s"  on-fail="restart" \
> >      op monitor timeout="60s"  interval="10s" on-fail="restart" \
> >      op stop    timeout="100s" interval="0s"  on-fail="fence"
> > 
> > #Filesystem
> > primitive res_fs_drbd0 ocf:heartbeat:Filesystem \
> >      params                   \
> >           device="/dev/drbd0" \
> >           directory="/hogeroot" \
> >           fstype="ext3"       \
> >      op start   timeout="60s" interval="0s"  on-fail="restart" \
> >      op monitor timeout="60s" interval="10s" on-fail="restart" \
> >      op stop    timeout="60s" interval="0s"  on-fail="fence"
> > 
> > #IPaddr2
> > primitive res_vip ocf:heartbeat:IPaddr2 \
> >      params                   \
> >           nic="eth0"          \
> >           ip="192.168.0.3"    \
> >           cidr_netmask="24"   \
> >      op start   timeout="60s" interval="0s"  on-fail="restart" \
> >      op monitor timeout="60s" interval="10s" on-fail="restart" \
> >      op stop    timeout="60s" interval="0s"  on-fail="fence"
> > 
> > #pingd
> > primitive res_ping ocf:pacemaker:pingd \
> >      params                            \
> >           name="default_ping_set"      \
> >           host_list="192.168.0.254"    \
> >           multiplier="100"             \
> >           interval="1"                 \
> >           timeout="2"                  \
> >           attempts="5"                 \
> >           dampen="15"
> > 
> > #####グループ登録
> > group rg_drbd \
> >      res_vip res_fs_drbd0
> > 
> > #####マスタースレーブ制御
> > ms ms_drbd0 res_drbd0         \
> >      meta                     \
> >           master-max="1"      \
> >           master-node-max="1" \
> >           clone-max="2"       \
> >           clone-node-max="1"  \
> >           notify="true"
> > 
> > #####クローン制御
> > clone cl_ping res_ping       \
> >      meta                    \
> >           clone-max="2"      \
> >           clone-node-max="1"
> > 
> > #####ロケーション設定
> > location loc_rg_drbd rg_drbd             \
> >      rule 200: #uname eq node01.hoge.com \
> >      rule 100: #uname eq node02.hoge.com \
> >      rule role=master -inf: defined fail-count-res_fs_drbd0 \
> >      rule role=master -inf: defined fail-count-res_vip      \
> >      rule -inf: defined default_ping_set and default_ping_set lt 100
> > 
> > location loc_ms_drbd0 ms_drbd0           \
> >      rule 200: #uname eq node01.hoge.com \
> >      rule 100: #uname eq node02.hoge.com \
> >      rule role=master -inf: defined default_ping_set and default_ping_set lt 100
> > 
> > #####リソースの制約設定
> > colocation col_rg_on_drbd inf: rg_drbd ms_drbd0:Master
> > order ord_rg_aft_drbd inf: ms_drbd0:promote rg_drbd:start
> > 
> > #####STONITH設定
> > #stonith-helperリソースを追加(node01.hoge.comフェンシング用)
> > primitive stonith1-1 stonith:external/stonith-helper \
> >      params                                                                             \
> >           priority="1"                                                                  \
> >           stonith-timeout="80s"                                                         \
> >           hostlist="node01.hoge.com"                                                    \
> >           dead_check_target="192.168.0.1 192.168.1.1 192.168.2.1 192.168.3.10"          \
> >           standby_check_command="/usr/sbin/crm_resource -r vip -W | grep -q `hostname`" \
> >      op monitor interval="10s"
> > 
> > #ipmiリソースを追加(node01.hoge.comフェンシング用)
> > primitive stonith1-2 stonith:external/ipmi \
> >      params                             \
> >           priority="2"                  \
> >           userid="user"                 \
> >           passwd="pass"                 \
> >           ipaddr="192.168.3.10"         \
> >           hostname="node01.hoge.com"    \
> >           interface="lanplus"           \
> >      op monitor interval="300s"
> > 
> > #meatwareリソースを追加(node01.hoge.comフェンシング用)
> > primitive stonith1-3 stonith:meatware \
> >      params \
> >           priority="3"               \
> >           stonith-timeout="600s"     \
> >           hostlist="node01.hoge.com" \
> >      op monitor interval="3600s"
> > 
> > #stonith-helperリソースを追加(node02.hoge.comフェンシング用)
> > primitive stonith2-1 stonith:external/stonith-helper \
> >      params                                                                             \
> >           priority="1"                                                                  \
> >           stonith-timeout="80s"                                                         \
> >           hostlist="node02.hoge.com"                                                    \
> >           dead_check_target="192.168.0.2 192.168.1.2 192.168.2.2 192.168.3.20"          \
> >           standby_check_command="/usr/sbin/crm_resource -r vip -W | grep -q `hostname`" \
> >      op monitor interval="10s"
> > 
> > #ipmiリソースを追加(node02.hoge.comフェンシング用)
> > primitive stonith2-2 stonith:external/ipmi \
> >      params                             \
> >           priority="2"                  \
> >           userid="user"                 \
> >           passwd="pass"                 \
> >           ipaddr="192.168.3.20"         \
> >           hostname="node02.hoge.com" \
> >           interface="lanplus"           \
> >      op monitor interval="300s"
> > 
> > #meatwareリソースを追加(node02.hoge.comフェンシング用)
> > primitive stonith2-3 stonith:meatware \
> >      params \
> >           priority="3" \
> >           stonith-timeout="600s" \
> >           hostlist="node02.hoge.com" \
> >      op monitor interval="3600s"
> > 
> > #node01.hoge.comをフェンシングするSTONITHリソースのグループ設定を追加
> > group grpStonith1 \
> >      stonith1-1 stonith1-2 stonith1-3
> >            
> > #node02.hoge.comをフェンシングするSTONITHリソースのグループ設定を追加
> > group grpStonith2 \
> >      stonith2-1 stonith2-2 stonith2-3
> > 
> > #grpStonith1がnode02.hoge.com上で起動する制約を追加
> > location location-grpStonith1 grpStonith1 \
> >      rule 200: #uname eq node02.hoge.com \
> >      rule -inf: #uname eq node01.hoge.com
> > 
> > # grpStonith2がnode01.hoge.com上で起動する制約を設定
> > location location-grpStonith2 grpStonith2 \
> >      rule 200: #uname eq node01.hoge.com \
> >      rule -inf: #uname eq node02.hoge.com
> > ----ここまで-------------------------------------------------
> > 
> > STONITHの設定以外は以前設定して問題なく動作は確認していたのですが、
> > stonith-helperとmeatwareを追加する際に、上記の設定例ファイルを
> > ほぼそのまま流用したため、この内容で合っているか不安です。
> > 
> > あと、質問ですが
> > stonith-helperでACT-SBY判定して、この際ACTが生き残るのが正しい動作ですよね?
> > このACT-SBY判定は何を以て判断しているのでしょうか?
> > 
> > お忙しいところ申し訳ありませんが設定内容に不備など、
> > また対処方法などわかりましたらご教授願します。
> > 
> > 以上、よろしくお願いいたします。
> > 
> > _______________________________________________
> > Linux-ha-japan mailing list
> > Linux****@lists*****
> > http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan
> 
> _______________________________________________
> Linux-ha-japan mailing list
> Linux****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan
> 





Linux-ha-japan メーリングリストの案内
Zurück zum Archiv-Index