zhang
j.zha****@jmtec*****
2010年 2月 24日 (水) 17:07:39 JST
田中様 はじめまして、木下と申します。 heartbeatでXenライブマイグレーションについて、 以下の環境で検証を行いました。xenライブ マイグレーションができていないみたいなので、 質問させていただきたいです。ご指摘をお願い致します。 質問: ------------------ heartbeatのリソースには、Xenだけ追加し、仮想マシンのライブマイグレーション の検証を行いました。 サーバ1のheartbeatを停止し、サーバ2へライブマイグレーションしたいのですが、 ライブマイグレーションができていないみたいです。 現象としては、 xm listでは、サーバ1側では、仮想マシンが停止(shutdown)され、サーバ2側で、 再起動されました。 仮想マシンへpingを打ち続けて、heartbeatがフェイルオーバで、 切り替わったタイミングで繋がらなくなり、sshで仮想マシンへ接続している コンソールも接続できなくなりました。 切り替わった後、sshで仮想マシンへ再接続できるようになりました。 上記の挙動ではライブマイグレーション出来ていないと思うのですが、 出来るようにする為には、何か別の設定が必要なのでしょうか? # 私の認識しているライブマイグレーションとは、フェイルオーバで切り替わる際に # ネットワーク接続が切れず、サービスを継続したまま別サーバにリソースが移 動する # ということです。ライブマイグレーション中pingは常に返ってきて、sshで # 接続しているコンソールも切断されずに切り替わる事だと認識しています。 ------------------ 以下heartbeatでXenのライブマイグレーション検証を行っている環境です。 環境: 物理サーバ2台: OS:debian5.0 64bit (lenny) カーネル:2.6.26-2-xen-amd64 heartbeat:2.1.3-6lenny4 サーバ1 debhost01:192.168.36.121 サーバ2 debhost02:192.168.36.122 両物理サーバは、社内LANの同じセグメントに 繋がっています。 仮想マシン1台: xenvm1:192.168.36.120 XenのゲストOSもdebian5.0 64bit (lenny)です。 Xen仮想マシンのdisk,swapのimgファイルは、 NFSにて共有しております。 Xen仮想マシン設定ファイルxenvm1.cfgはサーバ1側の /etc/xen/に設定しており、scpにてサーバ1へ転送しました。 heartbeatの設定について、リソースをXenのみ設定しています。 cib.xmlの中身は最後に添付しております。 田中様の環境との違いは以下になると思います。 仮想マシンのimgファイルは、ISCSIではなく、NFSにて共有しています。 また、pingdを使ったネットワークが必要みたいなので、 pingdを使ったネットワークというのは、以下の設定以外に必要な設定は ありますか? 設定ファイル/etc/ha.d/ha.cfに以下のコメントアウトをはずします。 respawn root /usr/lib/heartbeat/pingd -m 100 -d 5s -a default_ping_set 検証を行う際の情報は以下になります。 ライブマイグレーションを行う前に、 Xen仮想(192.168.36.125)へpingを打ち続け、sshにて仮想マシンへ 接続しております。 pingが通っている状態で、サーバ1のheartbeatを停止します。 画面表示「Started debhost02」から「Started debhost01」へ 変わる瞬間、pingが通らなくなりまして、sshにて接続されていた 仮想マシンのコンソールは切れました。 画面表示が「Started debhost01」へ切り替わった後、pingは 通るようになり、sshにて再接続もできました。 ちなみに、heartbeatを使わず、xmのコマンドでライブマイグレーションを行う時、 上述の現象はなく、ライブマイグレーションがうまくできました。 # xm migrate --live <仮想マシン名> <移動先IPアドレス> heartbeatにて、Xenのライブマイグレーションを正常に行うための設定が不足 していましたら教えていただければ助かります。 以下は、cib.xmlの設定内容です。 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ </attributes> </cluster_property_set> </crm_config> <nodes> <node id="986d636d-1ee5-4a48-a241-0bb23468fb32" uname="debhost02" type="normal"/> <node id="14cdc6fb-abec-4c88-bacc-867aea34c829" uname="debhost01" type="normal"> </attributes> </cluster_property_set> </crm_config> <nodes> <node id="986d636d-1ee5-4a48-a241-0bb23468fb32" uname="debhost02" type="normal"/> <node id="14cdc6fb-abec-4c88-bacc-867aea34c829" uname="debhost01" type="normal"> <nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="de fault-resource-failure-stickiness" value="0"/> <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value ="false"/> <nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value=" reboot"/> <nvpair id="cib-bootstrap-options-startup-fencing" name="startup-fencing" value ="true"/> <nvpair id="cib-bootstrap-options-stop-orphan-resources" name="stop-orphan-reso urces" value="true"/> <nvpair id="cib-bootstrap-options-stop-orphan-actions" name="stop-orphan-action s" value="true"/> <nvpair id="cib-bootstrap-options-remove-after-stop" name="remove-after-stop" v alue="false"/> <nvpair id="cib-bootstrap-options-short-resource-names" name="short-resource-na mes" value="true"/> <nvpair id="cib-bootstrap-options-transition-idle-timeout" name="transition-idl e-timeout" value="5min"/> <nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action- timeout" value="20s"/> <nvpair id="cib-bootstrap-options-is-managed-default" name="is-managed-default" value="true"/> <nvpair id="cib-bootstrap-options-cluster-delay" name="cluster-delay" value="60 s"/> <nvpair id="cib-bootstrap-options-pe-error-series-max" name="pe-error-series-ma x" value="-1"/> <nvpair id="cib-bootstrap-options-pe-warn-series-max" name="pe-warn-series-max" value="-1"/> <nvpair id="cib-bootstrap-options-pe-input-series-max" name="pe-input-series-ma x" value="-1"/> <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="2.1.3-no de: 552305612591183b1628baa5bc6e903e0f1e26a3"/> </attributes> </cluster_property_set> </crm_config> <nodes> <node id="986d636d-1ee5-4a48-a241-0bb23468fb32" uname="debhost02" type="normal"/> <node id="14cdc6fb-abec-4c88-bacc-867aea34c829" uname="debhost01" type="normal"> <instance_attributes id="nodes-14cdc6fb-abec-4c88-bacc-867aea34c829"> <attributes/> </instance_attributes> </node> </nodes> <resources> <group id="group_1"> <primitive class="ocf" id="Xen_2" provider="heartbeat" type="Xen"> <operations> <op id="Xen_2_mon" interval="120s" name="monitor" timeout="60s"/> </operations> <instance_attributes id="Xen_2_inst_attr"> <attributes> <nvpair id="Xen_2_attr_0" name="xmfile" value="/etc/xen/xenvm1.cfg"/> </attributes> </instance_attributes> <meta_attributes id="Xen_2_meta_attr"> <attributes> <nvpair id="Xen_2_meta_attr-01" name="allow_migrate" value="true"/> <nvpair id="Xen_2_meta_attr-02" name="allow_mem_management" value="true"/> </meta_attributes> </primitive> </group> </resources> <constraints> <rsc_location id="cli-prefer-Xen_2" rsc="Xen_2"> <rule id="cli-prefer-rule-Xen_2" score="INFINITY"> <expression id="cli-prefer-expr-Xen_2" attribute="#uname" operation="eq" value= "debhost01" type="string"/> </rule> </rsc_location> </constraints> </configuration> </cib> ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ 以上、宜しくお願い致します。 Linux-ha-japan mailing list Linux****@lists***** http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan