Heartbeatの設定方法
●概要
●事前準備
●インストール(RPM版)
●バージョン1? or バージョン2?
バージョン2用のモジュールのインストール
●インストール(ソース)
●認証方式と認証鍵の設定
●クラスタの設定
●リソースの設定
●Heartbeatの動作確認
フェールオーバのテスト
フェールバックのテスト
オートフェールバックの停止
●各種エラーログ
UDPポート694番が開いていない場合のエラーログ
cluster-glueのインストール
heartbeatのインストール
cib.xml or cib.xml.sig exist in /var/lib/heartbeat/crm/
file = open(resource_file, "r")/
ERROR: te_connect_stonith: Sign-in failed: triggered a retry
EMERG: Rebooting system. Reason: /usr/lib/heartbeat/crmd
●heartbeatで切り替わるとSSHで接続が拒否される
●auto_failbackの設定がoffなのにマスターとして起動してしまう
●概要
HaertbeatはHAクラスタリングを実現するソフトウェアです。
Heartbeatを利用する事により、2台のサーバでサービスのアクティブ/スタンバイ構成をとり、サービスの冗長化が実現出来ます。
例えば、httpサービスをしているサーバがあるとします。この時にHeartbeatを使えば、1台のサーバが何らかの障害でサービスを継続する事が困難になった場合、もう1台の呼びサーバに自動で切り替えてサービスを継続する事が可能です。このような構成をHAクラスタ(ハイアベイラビリティーフェールオーバクラスタ)と言い、Heartbeatを利用する事によりこの機能を実現できます。
また、NFSやNAS、DRBD(ネットワークディスクミラー)などと組み合わせる事により、ファイルストレージが必須のサービスも冗長化することができますので、より多くのサービスをHAクラスタ構成にする事が出来ます。
なお、Heartbeatを利用する場合は、ntpなどで時刻を合わせるようにしておいてください。
●事前準備
heartbeartでHAクラスタを構築する場合、システム構成を事前に決めておく事をお勧めします。たとえば、以下のような項目は事前に決めておきましょう。
本番系サーバのIPアドレス
待機系サーバのIPアドレス
実サービス用(仮想)のIPアドレス
管理サービス(httpなど)
今回のサーバ構成例
仮想IPアドレス(eth0)
|
|-----------------------|
|eth0 |eth0
------ -------
| | eth1(監視用) | |
| inu|------------------|neko |
| | | |
------ -------
*inu、nekoはサーバ名
eth0がサービス系のネットワークインタフェースとし、IPアドレスは以下の通りとします。
仮想IP eth0 1.0.0.101
inu eth0 1.0.0.5
neko eth0 1.0.0.4
eth1はinu、nekoとの死活監視用のネットワークインタフェースとして利用し、IPアドレスは以下の通りとします。
ただし、死活監視用ネットワークインターフェースを利用せずに、サービス系のネットワークインターフェースだけでも監視可能です。
inu eth0 192.168.0.5
neko eth0 192.168.0.4
今回はシリアルケーブルは使用しませんが、設定方法は記載しておきます。
シリアルケーブルもinu、nekoとの死活監視用に利用します。シリアルケーブルはクロスケーブルを用意してください。
シリアルインタフェースを利用出来るか確認しておきます。シリアルケーブル(クロス)でinu、nekoを接続し作業します。片側のサーバで、シリアルインタフェースの/dev/ttyS0を読み込みます。
cat < /dev/ttyS0
もう片側のサーバで、/dev/ttyS0に文字列を送ります。
# echo "Serial Test" > /dev/ttyS0
正常に接続されていれば、読み込んでいるサーバ側でメッセージが表示されます。
Serial Test
この確認ができれば、シリアルケーブルの接続はOKです。
次に、名前解決ができるように必要なファイルを編集しておきます。
/etc/hostsの編集(inuもnekoも同じ内容)
192.168.0.5 inu inu.bigbang.dyndns.org inu
192.168.0.4 neko neko.bigbang.dyndns.org neko
1.0.0.101 www.bigbang.dyndns.org www
named設定ファイルの編集(正引き)
www IN A 1.0.0.101
named設定ファイルの編集(逆引き)
101 IN PTR www.bigbang.dyndns.org
●インストール(RPM版)
今回は、Fedora 14(inu)、CentOS 5.6(neko)にHeartbeatをインストールします。両ディストリビューションともRPMパッケージが用意されていますので、yumコマンドを使用してインストールします。
# yum -y install heartbeat
依存関係でその他必要なモジュールもインストールされます。Fedora 14でインストールされたバージョンは「3.0.0」、CentOS 5.6でインストールされたバージョンは「2.1.3」でした。
ソースからインストールする場合はhttp://www.linux-ha.org/wiki/Downloadsからダウンロード出来ます。
設定は、/etc/ha.d/以下のauthkeys、ha.cf、haresourcesファイルで行います。
なお、テンプレートファイルが、/usr/share/doc/heartbeat-*.*.*/以下にありますので、これを利用します。
# cp /usr/share/doc/heartbeat-*.*.*/authkeys /etc/ha.d/authkeys
# cp /usr/share/doc/heartbeat-*.*.*/ha.cf /etc/ha.d/ha.cf
# cp /usr/share/doc/heartbeat-*.*.*/haresources /etc/ha.d/haresources
バージョン1で動作させる場合は、上記のモジュールと設定ファイルで動作します。
CentOS 6の場合、heartbeatをyumコマンドでインストールできませんでした。そこでwgetによりRPMパッケージをダウンロードします。
# wget http://download.fedora.redhat.com/pub/epel/6/i386/heartbeat-3.0.4-1.el6.i686.rpm
# wget http://download.fedora.redhat.com/pub/epel/6/i386/heartbeat-libs-3.0.4-1.el6.i686.rpm
# wget http://mirror.centos.org/centos/6/os/i386/Packages/PyXML-0.8.4-19.el6.i686.rpm
# rpm -ivh heartbeat-* PyXML-0.8.4-19.el6.i686.rpm
/usr/share/doc/heartbeat-3.0.4より/etc/ha.dにauthkeys、ha.cf、haresourcesをコピーし設定します。
バージョン2で動作させる場合は、下記ファイルを使用することになります。
/etc/ha.d/authkeys
/etc/ha.d/ha.cf
/var/lib/heartbeat/crm/cib.xml ← バージョン2用
heartbeatをバージョン2で動作させるためには他のモジュールをインストールする必要があります。
●バージョン1? or バージョン2?
Heartbeatバージョン2系では、バージョン1系の設定とバージョン2系設定の両方が行えます。これにより、設定ファイルを変更することなくバージョン1系からの移行が行えます。
ただしバージョン1系の設定には、アクティブ/スタンバイ構成の2ノードのクラスタしかサポートしないことやクラスタの設定を動的に変更できないというデメリットがあります。
また、バージョン1系の設定からバージョン2系の設定への移行を支援するためのツールとして「haresources2cib.py」が提供されています。これを用いて、バージョン1系設定を行った後にバージョン2系の設定に移行することも可能です。
バージョン2用のモジュールのインストール
下記のモジュールをインストールする必要があります。
# yum install ldirectord pacemaker cluster-glue
しかし、「haresources2cib.py」がインストールされないためPasemaekarをソースからインストールしてください。
●インストール(ソース)
ソースからのインストールは未だ起動することが確認できていません
prefixを/usr/local/heartbeatとして行います(prefixを指定しないと削除に手間がかかりそう)。
cluster-glueのインストール
http://www.linux-ha.org/wiki/Download/からダウンロードし展開します。
$ wget http://hg.linux-ha.org/glue/archive/glue-1.0.3.tar.bz2
$ tar xjf glue-1.0.3.tar.bz2
$ ls
Reusable-Cluster-Components-glue-1.0.3/
$ cd Reusable-Cluster-Components-glue-1.0.3
* configure
configureを実行する前にまずautogenスクリプトを実行します(ドキュメントにはThe autogen.sh script is a convenience wrapper around automake, autoheader, autoconf, and libtool.と書かれているので環境をチェックするためと思われます)。
$ ./autogen.sh
configure --helpを実行してみると、インストールディレクトリは以下のようになっています。
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/cluster-glue]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
基本的にはprefixが効くようだが、oldincludedirのみprefixが効かないようなので個別に--oldincludedir=/usr/local/heartbeat/includeとします。
※cluster-glueのインストールディレクトリをheartbeatにするのはheartbeatのprefixとcluster-glueのインストールディレクトリは同じでないとheartbeatのconfigure時にエラーになってしまうため。
configure実行
$ ./configure --prefix=/usr/local/heartbeat --oldincludedir=/usr/local/heartbeat/include
無事終了。
$ make 2>&1 | tee make.log
# make install 2>&1 | tee make_install.log
xsltproc --xinclude http://xxxx.xmlに少し時間がかかります。止まっているように見えるが問題ありません。
heartbeatのインストール
http://www.linux-ha.org/wiki/Downloadsからダウンロードし展開します。
$ wget http://hg.linux-ha.org/heartbeat-STABLE_3_0/archive/STABLE-3.0.2.tar.bz2
$ tar xjf STABLE-3.0.2.tar.bz2
$ ls Heartbeat-3-0-STABLE-3.0.2/
$ cd Heartbeat-3-0-STABLE-3.0.2
* configure
注意点:cluster-glueとインストールディレクトリを一緒にしないとエラーになります。
エラーになる場合を以下に記す(cluster-glueのインストールディレクトリが/usr/local/cluster-glueの場合)。
$ ./bootstrap
$ ./ConfigureMe configure --prefix=/usr/local/heartbeat --oldincludedir=/usr/local/heartbeat/include
...
...
checking for unistd.h... yes
checking heartbeat/glue_config.h usability... no
checking heartbeat/glue_config.h presence... no
checking for heartbeat/glue_config.h... no
configure: error: in `/home/aki/src/HA/Heartbeat-3-0-STABLE-3.0.2':
configure: error: Core development headers were not found
See `config.log' for more details.
cluster-glueに含まれているヘッダファイルが見つからないと言っている。
よってCPPFLAGSを指定する。
./ConfigureMe configure CPPFLAGS="-I/usr/local/cluster-glue/include" --prefix=/usr/local/heartbeat --oldincludedir=/usr/local/heartbeat/include
...
...
checking for unistd.h... yes
checking heartbeat/glue_config.h usability... yes
checking heartbeat/glue_config.h presence... yes
checking for heartbeat/glue_config.h... yes
checking glue_config.h usability... no
checking glue_config.h presence... no
checking for glue_config.h... no
configure: error: in `/home/aki/src/HA/Heartbeat-3-0-STABLE-3.0.2':
configure: error: Core development headers were not found
See `config.log' for more details.
/usr/local/cluster-glueの下のheartbeat/glue_config.hは見つけることができたが、なぜか同じ名前のファイルが見つからないと言っている。原因がわからないので、ググるとcluster-glueとheartbeatを同じprefixにするとよいというようなコメントを見つけたのでそうしてみるとエラーが出なかった
(/usr/local/heartbeatへcluster-glueの再インストールを行った後)
$ ./ConfigureMe configure CPPFLAGS="-I/usr/local/heartbeat/include" --prefix=/usr/local/heartbeat --oldincludedir=/usr/local/heartbeat/include
configureの最後の方の出力はこんな感じ。
heartbeat configuration:
Version = "3.0.2"
Executables = "/usr/local/heartbeat/sbin"
Man pages = "/usr/share/man"
Libraries = "/usr/local/heartbeat/lib"
Header files = "/usr/local/heartbeat/include"
Arch-independent files = "/usr/local/heartbeat/share"
Documentation files = "/usr/local/heartbeat/share/doc/heartbeat"
State information = "/var"
System configuration = "/etc"
Init (rc) scripts = "/etc/init.d"
Init (rc) defaults = "/etc/sysconfig"
Use system LTDL = "no"
HA group name = ""
HA group id = "65"
HA user name = ""
HA user user id = "17"
SNMP libraries = "-lcrypto -lsensors -L/usr/lib -lnetsnmp"
Build IPMILan Plugin = "no"
Build dopd plugin = "yes"
Enable times kludge = "yes"
CC_WARNINGS = " -Wall -Wmissing-prototypes -Wmissing- declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror "
Mangled CFLAGS = "-g -O2 -I/usr/local/heartbeat/include/heartbeat -DNETSNMP_BROKEN_INLINE -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ggdb3 -funsigned-char"
Libraries = "-lbz2 -lz -lxml2 -lc -luuid -lpam -lrt -ldl "
RPATH enabled = "no"
Distro-style RPMs = "no"
Note: If you use the 'make install' method for installation you
also need to adjust '/etc/passwd' and '/etc/group' manually.
makeします。
$ make
...
...
error
エラーになり途中で止まってしまう。
エラーの詳細
/usr/local/heartbeat/include/heartbeat/glue_config.h:44:1: error: "HA_SYSCONFDIR" redefined
In file included from ../include/lha_internal.h:38,
from strlcpy.c:1:
../include/config.h:456:1: error: this is the location of the previous definition
In file included from ../include/lha_internal.h:41,
from strlcpy.c:1:
/usr/local/heartbeat/include/heartbeat/glue_config.h:96:1: error: "HA_HBCONF_DIR" redefined
In file included from ../include/lha_internal.h:38,
from strlcpy.c:1:
../include/config.h:441:1: error: this is the location of the previous definition
gmake[1]: *** [strlcpy.lo] エラー 1
gmake[1]: ディレクトリ `/home/aki/src/HA/Heartbeat-3-0-STABLE-3.0.2/replace' から出ます
make: *** [all-recursive] エラー 1
原因不明のためprefixを指定せずに再度cluster-glueからインストールを行います。無事完了しました。
ソースからのインストールは未だ起動することが確認できていません
●認証方式と認証鍵の設定
/etc/ha.d/authkeysでサーバ間で行われる通信の暗号方式をを指定します。指定出来る種類は以下の通りです。バージョン1・2共通です。
sha1:SHA1暗号化方式を使用します。現在使用可能な中では最高のセキュリティを備えています。
md5:MD5暗号化方式を使用します。セキュリティを備え、それほど多くのCPUリソースを消費しません
crc:セキュリティをほとんど持たず、多くのリソースを使用しません。実際のネットワークでは使用しないでください。
今回は、crc方式で設定します。
# vi /etc/ha.d/authkeys
auth 1 ← コメントアウト
1 crc ← コメントアウト
または
auth 2 ← コメントアウト
#2 sha1 HI!
→ 2 sha1 password_character ← コメントアウト及び書き換え
また、authkeysのファイルパーミッションは600にする必要があります。
# chmod 600 authkeys
なお、設定は2台のサーバで同一にする必要があります。
●クラスタの設定
ha.cfでheartbeatの基本設定を行います。inuの設定例を以下に示します。
# vi /etc/ha.d/ha.cf
logfile /var/log/ha-log ← ログの出力先を指定します
logfacility local0 ← ログをsyslogに送ります
keepalive 2 ← ハートビートの監視間隔
deadtime 30 ← 相手ホストがダウンしたと判断する時間
warntime 10 ← 相手ホストがダウンしたと警告を出すまでの時間
initdead 120 ← 起動時、ハートビート監視を開始するまでの時間
udpport 694 ← ブロードキャスト/ユニキャスト利用時のポート番号
baud 19200 ← シリアルのポートレート
serial /dev/ttyS0 ← シリアルのデバイス
ucast eth1 192.168.0.4 ← ハートビートをユニキャストで行う場合のデバイスと相手先IP
auto_failback on ← 自動フェールバックのon/off
node inu.bigbang.dyndns.org ← クラスタに参加するサーバを指定(uname -nで求める)
node neko.bigbang.dyndns.org ← クラスタに参加するサーバを指定(uname -nで求める)
同様に、nekoも設定します。
ファイルha.cf説明は以下を参照してください。
-----------------------
udpport
ノード間の通信にHeartbeatが使用するポートを指定します。デフォルトは694です。
ファイアーウォールを設定している場合はUDPポート694番を開けるようにしてください。開けていない場合、UDPポート694番が開いていない場合のエラーログに記載されているようなログが出力されます。
keepalive
キープ・アライブ・パケットの間隔を指定します。
deadtime
Heartbeatがクラスタのノードが停止していると判断するまでの時間を指定します。
initdead
起動時間とネットワーク初期化を考慮して、(再起動後などに)全てが最初に起動してから、ノードが停止していると判断するまでの待機時間を指定します。
bcast
キープ・アライブ・パケットを送信するインターフェースを指定します(ブロードキャストを使用する場合)。
use_logd
ha-logdを使用します。「yes」に設定することをお勧めします。
ログデーモンの構成ファイルをチェックしてください(デフォルトは/etc/logd.cfです)。
/usr/share/doc/heartbeat-2/ha_logd.cfでは、例が紹介されています。
logfacility
メッセージのログに使用するsyslogログファシリティを定義します。use_logdが有効な場合は無視されます。
logfile
Heartbeatのデバッグ以外のメッセージは全て、このファイルに出力されます。use_logdが有効な場合は無視されます。
debugfile
Heartbeatがデバッグメッセージを書き込むファイルを指定します。use_logdが有効な場合は無視されます。
node
どのマシンがクラスタ内にあるかを通知します。
crm
Heartbeatでバージョン2スタイルのクラスタマネージャを実行するかどうかを指定します。バージョン2の場合のみ設定出来ます。
●リソースの設定
/etc/ha.d/haresourcesでHAクラスタで管理するリソースの設定を行います。
ただし、Heartbeatのv1とv2の設定が異なります。
・v1の場合:
haresources→リソースの構成を作成する必要があります。
・v2の場合:
ファイル/var/lib/heartbeat/crm/cib.xmlの設定を行います。
ここでは、仮想IPとhttpd(Apache)を、Heartbeatの管理リソースとします。ここでの注意点は、Heartbeatのリソースとして管理されるデーモンのhttpdは、Heartbeatから起動や停止が行われます。そのため、OSの起動時などにhttpdが自動起動しないよう、あらかじめ停止しておきます。
# service httpd stop
また、自動起動もOFFにしておきます。
# chkconfig httpd off
Heartbeatバージョン1のリソース設定は以下の通りです。
# vi /etc/ha.d/haresources
inu.bigbang.dyndns.org 1.0.0.100/24 httpd
同様に、nekoも設定します。
Heartbeatバージョン2のリソース設定は以下の通りです。
# python /usr/lib/heartbeat/haresources2cib.py /etc/ha.d/haresources /var/lib/heartbeat/crm/cib.xml
# python /usr/lib/heartbeat/haresources2cib.py /etc/ha.d/haresources
エラーが表示された場合はcib.xml or cib.xml.sig exist in /var/lib/heartbeat/crm/を参照してください。
または
file = open(resource_file, "r")/を参照してください。
ここまでの設定が完了したら、Heartbeatサービスを起動することになります。ただし、その前にcib.xmlの記述が正しいかどうかを確認してください。エラーが表示された場合は修正する必要があります。
# crm_verify -x /var/lib/heartbeat/crm/cib.xml
そして、プライマリ、セカンダリの順で起動します。
ifconfigなどで確認するとinuにはeth0:0があり、nekoにはないはずです。
●Heartbeatの動作確認
ここでは、設定したHeartbeatの動作確認を行います。まずは、両サーバでhearbeatを起動しますが、起動順は、本番系、待機系の順で行います。
# service heartbeat start
heartbeatが起動すると、本番系サーバにリソースとして、仮想IPが割り当てられhttpdサーバが起動していると思いますので確認してください。
フェールオーバ、フェールバックのテスト
現在の設定では、両サーバともauto_failback onになってると思いますので、この状態でフェールオーバ、フェールバックのテストを行います。
フェールオーバのテスト
本番系のheartbeatを停止し、本番系から待機系にフェールオーバさせます。
# /usr/lib/heartbeat/heartbeat -k
これで本番系のheartbeatが停止、待機系にフェールオーバするはずです。待機系にリソースが移り、仮想IP割当とhttpdが起動しているか確認してください。
以下は、haresourcesの設定が下記の場合のフェールオーバ時のログです。
# vi /etc/ha.d/haresources
inu.bigbang.dyndns.org IPaddr::1.0.0.101/24
このログは、heartbeatがバージョン1で、haresourcesの設定が下記の場合のフェールオーバ時のものです。
# vi /etc/ha.d/haresources
inu.bigbang.dyndns.org IPaddr::1.0.0.101/24
サーバinuのログ
Jul 07 20:52:43 inu.bigbang.dyndns.org heartbeat: [12900]: info: Heartbeat shutdown in progress. (12900)
Jul 07 20:52:43 inu.bigbang.dyndns.org heartbeat: [21539]: info: Giving up all HA resources.
ResourceManager[21552]: 2011/07/07_20:52:43 info: Releasing resource group: inu.bigbang.dyndns.org IPaddr::1.0.0.101/24
ResourceManager[21552]: 2011/07/07_20:52:43 info: Running /etc/ha.d/resource.d/IPaddr 1.0.0.101/24 stop
IPaddr[21612]: 2011/07/07_20:52:43 INFO: ifconfig eth0:0 down
IPaddr[21589]: 2011/07/07_20:52:43 INFO: Success
Jul 07 20:52:43 inu.bigbang.dyndns.org heartbeat: [21539]: info: All HA resources relinquished.
Jul 07 20:52:44 inu.bigbang.dyndns.org heartbeat: [12900]: WARN: 1 lost packet(s) for [neko.bigbang.dyndns.org] [3916:3918]
Jul 07 20:52:44 inu.bigbang.dyndns.org heartbeat: [12900]: info: No pkts missing from neko.bigbang.dyndns.org!
Jul 07 20:52:45 inu.bigbang.dyndns.org heartbeat: [12900]: info: killing HBFIFO process 12905 with signal 15
Jul 07 20:52:45 inu.bigbang.dyndns.org heartbeat: [12900]: info: killing HBWRITE process 12906 with signal 15
Jul 07 20:52:45 inu.bigbang.dyndns.org heartbeat: [12900]: info: killing HBREAD process 12907 with signal 15
Jul 07 20:52:45 inu.bigbang.dyndns.org heartbeat: [12900]: info: Core process 12907 exited. 3 remaining
Jul 07 20:52:45 inu.bigbang.dyndns.org heartbeat: [12900]: info: Core process 12905 exited. 2 remaining
Jul 07 20:52:45 inu.bigbang.dyndns.org heartbeat: [12900]: info: Core process 12906 exited. 1 remaining
Jul 07 20:52:45 inu.bigbang.dyndns.org heartbeat: [12900]: info: inu.bigbang.dyndns.org Heartbeat shutdown complete.
サーバnekoのログ
heartbeat[24543]: 2011/07/07_20:52:43 info: Received shutdown notice from 'inu.bigbang.dyndns.org'.
heartbeat[24543]: 2011/07/07_20:52:43 info: Resources being acquired from inu.bigbang.dyndns.org.
heartbeat[26651]: 2011/07/07_20:52:43 info: acquire all HA resources (standby).
ResourceManager[26678]: 2011/07/07_20:52:43 info: Acquiring resource group: neko.bigbang.dyndns.org IPaddr::1.0.0.101/24
IPaddr[26720]: 2011/07/07_20:52:44 INFO: Resource is stopped
IPaddr[26733]: 2011/07/07_20:52:44 INFO: Resource is stopped
heartbeat[26652]: 2011/07/07_20:52:44 info: Local Resource acquisition completed.
ResourceManager[26678]: 2011/07/07_20:52:44 info: Running /etc/ha.d/resource.d/IPaddr 1.0.0.101/24 start
IPaddr[26867]: 2011/07/07_20:52:44 INFO: Using calculated nic for 1.0.0.101: eth1
IPaddr[26867]: 2011/07/07_20:52:44 INFO: Using calculated netmask for 1.0.0.101: 255.255.255.0
IPaddr[26867]: 2011/07/07_20:52:44 INFO: eval ifconfig eth1:0 1.0.0.101 netmask 255.255.255.0 broadcast 1.0.0.255
IPaddr[26841]: 2011/07/07_20:52:44 INFO: Success
heartbeat[26651]: 2011/07/07_20:52:44 info: all HA resource acquisition completed (standby).
heartbeat[24543]: 2011/07/07_20:52:44 info: Standby resource acquisition done [all].
harc[26967]: 2011/07/07_20:52:44 info: Running /etc/ha.d/rc.d/status status
mach_down[26983]: 2011/07/07_20:52:44 info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
mach_down[26983]: 2011/07/07_20:52:44 info: mach_down takeover complete for node inu.bigbang.dyndns.org.
heartbeat[24543]: 2011/07/07_20:52:44 info: mach_down takeover complete.
harc[27017]: 2011/07/07_20:52:44 info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp
ip-request-resp[27017]: 2011/07/07_20:52:44 received ip-request-resp IPaddr::1.0.0.101/24 OK yes
ResourceManager[27038]: 2011/07/07_20:52:44 info: Acquiring resource group: neko.bigbang.dyndns.org IPaddr::1.0.0.101/24
IPaddr[27065]: 2011/07/07_20:52:44 INFO: Running OK
heartbeat[24543]: 2011/07/07_20:53:15 WARN: node inu.bigbang.dyndns.org: is dead
heartbeat[24543]: 2011/07/07_20:53:15 info: Dead node inu.bigbang.dyndns.org gave up resources.
heartbeat[24543]: 2011/07/07_20:53:15 info: Link inu.bigbang.dyndns.org:eth1 dead.
フェールバックのテスト
今度は待機系から本番系にフェールバックを行います。先ほど、本番系のheartbeatを停止したために、待機系にフェールオーバしていると思います。この場合、本番系のheartbeatを起動すればフェールバックします。
# service heartbeat start
本番系にリソースが戻り、仮想IP割当とhttpdが起動しているか確認してください。
オートフェールバックの停止
何らかの障害でフェールオーバした場合には、障害の対応などのため復旧作業をすることになりますが、この時、再起動などによる意図しないタイミングでフェールバックが起らないように、フェールバックは手動オペレーションにする方がより安全かもしれません。そのような設定をする場合は、待機系サーバのha.cfを以下のように変更してください。
# vi /etc/ha.d/ha.cf
auto_failback off
この設定で、本番系から待機系へはオートフェールオーバがかかりますが、待機系から本番系へはオートフェールバックはかかりません。待機系がリソースを保持している場合に本番系に戻すには、本番系のheartbeatを起動し、全てのシステムが正常に動作している事を確認してから、待機系のheartbeatを再起動します。
# service heartbeat restart
本番系にリソースが戻り、仮想IP割当とhttpdが起動しているか確認してください。
下記はサーバneko側は「auto_failback off」でactive状態、サーバinu側は「auto_failback off」でstandby状態で、サーバneko側でハートビートを手動停止させたときのログです。
サーバnekoのログ
このログは、heartbeatがバージョン1で、haresourcesの設定が下記の場合のフェールオーバ時のものです。
# vi /etc/ha.d/haresources
inu.bigbang.dyndns.org IPaddr::1.0.0.101/24
heartbeat[24543]: 2011/07/07_21:13:46 info: Heartbeat shutdown in progress. (24543)
heartbeat[27886]: 2011/07/07_21:13:46 info: Giving up all HA resources.
ResourceManager[27899]: 2011/07/07_21:13:46 info: Releasing resource group: neko.bigbang.dyndns.org IPaddr::1.0.0.101/24
ResourceManager[27899]: 2011/07/07_21:13:46 info: Running /etc/ha.d/resource.d/IPaddr 1.0.0.101/24 stop
IPaddr[27963]: 2011/07/07_21:13:46 INFO: ifconfig eth1:0 down
IPaddr[27937]: 2011/07/07_21:13:46 INFO: Success
heartbeat[27886]: 2011/07/07_21:13:46 info: All HA resources relinquished.
heartbeat[24543]: 2011/07/07_21:13:47 WARN: 1 lost packet(s) for [inu.bigbang.dyndns.org] [48:50]
heartbeat[24543]: 2011/07/07_21:13:47 info: No pkts missing from inu.bigbang.dyndns.org!
heartbeat[24543]: 2011/07/07_21:13:48 info: killing HBFIFO process 24545 with signal 15
heartbeat[24543]: 2011/07/07_21:13:48 info: killing HBWRITE process 24546 with signal 15
heartbeat[24543]: 2011/07/07_21:13:48 info: killing HBREAD process 24547 with signal 15
heartbeat[24543]: 2011/07/07_21:13:48 info: Core process 24545 exited. 3 remaining
heartbeat[24543]: 2011/07/07_21:13:48 info: Core process 24546 exited. 2 remaining
heartbeat[24543]: 2011/07/07_21:13:48 info: Core process 24547 exited. 1 remaining
heartbeat[24543]: 2011/07/07_21:13:48 info: neko.bigbang.dyndns.org Heartbeat shutdown complete.
サーバinuのログ
Jul 07 21:13:46 inu.bigbang.dyndns.org heartbeat: [25178]: info: Received shutdown notice from 'neko.bigbang.dyndns.org'.
Jul 07 21:13:46 inu.bigbang.dyndns.org heartbeat: [25178]: info: Resources being acquired from neko.bigbang.dyndns.org.
Jul 07 21:13:46 inu.bigbang.dyndns.org heartbeat: [25343]: info: acquire all HA resources (standby).
ResourceManager[25363]: 2011/07/07_21:13:46 info: Acquiring resource group: inu.bigbang.dyndns.org IPaddr::1.0.0.101/24
IPaddr[25409]: 2011/07/07_21:13:46 INFO: Resource is stopped
IPaddr[25426]: 2011/07/07_21:13:46 INFO: Resource is stopped
Jul 07 21:13:46 inu.bigbang.dyndns.org heartbeat: [25344]: info: Local Resource acquisition completed.
Jul 07 21:13:46 inu.bigbang.dyndns.org heartbeat: [25178]: info: Initial resource acquisition complete (T_RESOURCES(us))
ResourceManager[25363]: 2011/07/07_21:13:46 info: Running /etc/ha.d/resource.d/IPaddr 1.0.0.101/24 start
IPaddr[25540]: 2011/07/07_21:13:47 INFO: Using calculated nic for 1.0.0.101: eth0
IPaddr[25540]: 2011/07/07_21:13:47 INFO: Using calculated netmask for 1.0.0.101: 255.255.255.0
IPaddr[25540]: 2011/07/07_21:13:47 INFO: eval ifconfig eth0:0 1.0.0.101 netmask 255.255.255.0 broadcast 1.0.0.255
IPaddr[25516]: 2011/07/07_21:13:47 INFO: Success
Jul 07 21:13:47 inu.bigbang.dyndns.org heartbeat: [25343]: info: all HA resource acquisition completed (standby).
Jul 07 21:13:47 inu.bigbang.dyndns.org heartbeat: [25178]: info: Standby resource acquisition done [all].
harc[25638]: 2011/07/07_21:13:47 info: Running /etc/ha.d//rc.d/status status
mach_down[25655]: 2011/07/07_21:13:47 info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
mach_down[25655]: 2011/07/07_21:13:47 info: mach_down takeover complete for node neko.bigbang.dyndns.org.
Jul 07 21:13:47 inu.bigbang.dyndns.org heartbeat: [25178]: info: mach_down takeover complete.
harc[25691]: 2011/07/07_21:13:47 info: Running /etc/ha.d//rc.d/ip-request-resp ip-request-resp
ip-request-resp[25691]: 2011/07/07_21:13:47 received ip-request-resp IPaddr::1.0.0.101/24 OK yes
ResourceManager[25714]: 2011/07/07_21:13:47 info: Acquiring resource group: inu.bigbang.dyndns.org IPaddr::1.0.0.101/24
IPaddr[25742]: 2011/07/07_21:13:47 INFO: Running OK
Jul 07 21:14:18 inu.bigbang.dyndns.org heartbeat: [25178]: WARN: node neko.bigbang.dyndns.org: is dead
Jul 07 21:14:18 inu.bigbang.dyndns.org heartbeat: [25178]: info: Dead node neko.bigbang.dyndns.org gave up resources.
Jul 07 21:14:18 inu.bigbang.dyndns.org heartbeat: [25178]: info: Link neko.bigbang.dyndns.org:eth0 dead.
サーバinuに切り替わっていることが分かります。上記の状態(inu:active、neko:stop)から、サーバnekoのハートビートを手動起動します。
このログは、heartbeatがバージョン1で、haresourcesの設定が下記の場合のフェールオーバ時のものです。
# vi /etc/ha.d/haresources
inu.bigbang.dyndns.org IPaddr::1.0.0.101/24
サーバnekoのログ
heartbeat[28858]: 2011/07/07_21:30:49 info: Version 2 support: false
heartbeat[28858]: 2011/07/07_21:30:49 WARN: Logging daemon is disabled --enabling logging daemon is recommended
heartbeat[28858]: 2011/07/07_21:30:49 info: **************************
heartbeat[28858]: 2011/07/07_21:30:49 info: Configuration validated. Starting heartbeat 2.1.3
heartbeat[28859]: 2011/07/07_21:30:49 info: heartbeat: version 2.1.3
heartbeat[28859]: 2011/07/07_21:30:50 info: Heartbeat generation: 1309787372
heartbeat[28859]: 2011/07/07_21:30:50 info: seed is -1816177681
heartbeat[28859]: 2011/07/07_21:30:50 info: glib: ucast: write socket priority set to IPTOS_LOWDELAY on eth1
heartbeat[28859]: 2011/07/07_21:30:50 info: glib: ucast: bound send socket to device: eth1
heartbeat[28859]: 2011/07/07_21:30:50 info: glib: ucast: bound receive socket to device: eth1
heartbeat[28859]: 2011/07/07_21:30:50 info: glib: ucast: started on port 694 interface eth1 to 1.0.0.5
heartbeat[28859]: 2011/07/07_21:30:50 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[28859]: 2011/07/07_21:30:50 info: G_main_add_TriggerHandler: Added signal manual handler
heartbeat[28859]: 2011/07/07_21:30:50 notice: Using watchdog device: /dev/watchdog
heartbeat[28859]: 2011/07/07_21:30:50 info: G_main_add_SignalHandler: Added signal handler for signal 17
heartbeat[28859]: 2011/07/07_21:30:50 info: Local status now set to: 'up'
heartbeat[28859]: 2011/07/07_21:30:52 info: Link inu.bigbang.dyndns.org:eth1 up
.
heartbeat[28859]: 2011/07/07_21:30:52 info: Status update for node inu.bigbang.dyndns.org: status active
harc[28867]: 2011/07/07_21:30:52 info: Running /etc/ha.d/rc.d/status status
heartbeat[28859]: 2011/07/07_21:30:52 info: Comm_now_up(): updating status to active
heartbeat[28859]: 2011/07/07_21:30:52 info: Local status now set to: 'active'
heartbeat[28859]: 2011/07/07_21:30:53 info: remote resource transition completed.
heartbeat[28859]: 2011/07/07_21:30:53 info: remote resource transition completed.
heartbeat[28859]: 2011/07/07_21:30:53 info: Local Resource acquisition completed. (none)
heartbeat[28859]: 2011/07/07_21:30:53 info: Initial resource acquisition complete (T_RESOURCES(them))
サーバinuのログ
Jul 07 21:30:51 inu.bigbang.dyndns.org heartbeat: [28392]: info: Link neko.bigbang.dyndns.org:eth0 up.
Jul 07 21:30:51 inu.bigbang.dyndns.org heartbeat: [28392]: info: Status update for node neko.bigbang.dyndns.org: status init
Jul 07 21:30:51 inu.bigbang.dyndns.org heartbeat: [28392]: info: Status update for node neko.bigbang.dyndns.org: status up
harc[29017]: 2011/07/07_21:30:51 info: Running /etc/ha.d//rc.d/status status
harc[29035]: 2011/07/07_21:30:51 info: Running /etc/ha.d//rc.d/status status
Jul 07 21:30:52 inu.bigbang.dyndns.org heartbeat: [28392]: info: Status update for node neko.bigbang.dyndns.org: status active
harc[29056]: 2011/07/07_21:30:52 info: Running /etc/ha.d//rc.d/status status
Jul 07 21:30:53 inu.bigbang.dyndns.org heartbeat: [28392]: info: remote resource transition completed.
サーバinuがacitiveのまま、サーバnekoがstanbyとしてハートビートが起動しました。
●各種エラーログ
設定中に出会ったエラーログの例を示します。
UDPポート694番が開いていない場合のログ
例えば、サーバneko側のファイアーウォールの設定でUDPポート694番が開いていない場合、サーバinu側のログ(/var/log/ha-log)に下記のようなログが表示されます。
テキスト版はこちらにあります。
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: 1 lost packet(s) for [neko.bigbang.dyndns.org] [34:36]
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: info: Status update for node neko.bigbang.dyndns.org: status active
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: info: No pkts missing from neko.bigbang.dyndns.org!
harc[9480]: 2011/07/05_20:52:19 info: Running /etc/ha.d//rc.d/status status
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: ERROR: Both machines own our resources!
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: info: remote resource transition completed.
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: ERROR: Both machines own our resources!
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: ERROR: Both machines own foreign resources!
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: info: inu.bigbang.dyndns.org wants to go standby [foreign]
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: ERROR: Both machines own our resources!
Jul 05 20:52:19 inu.bigbang.dyndns.org heartbeat: [15431]: ERROR: Both machines own foreign resources!
Jul 05 20:52:29 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: No reply to standby request. Standby request cancelled.
Jul 05 20:52:29 inu.bigbang.dyndns.org heartbeat: [15431]: ERROR: Both machines own our resources!
Jul 05 20:52:29 inu.bigbang.dyndns.org heartbeat: [15431]: ERROR: Both machines own foreign resources!
Jul 05 20:55:21 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (376 messages in queue)
Jul 05 20:55:23 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (377 messages in queue)
Jul 05 20:55:25 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (378 messages in queue)
Jul 05 20:55:27 inu.bigbang.dyndns.org heartbeat: [15431]: info: Received shutdown notice from 'neko.bigbang.dyndns.org'.
Jul 05 20:55:27 inu.bigbang.dyndns.org heartbeat: [15431]: info: Resources being acquired from neko.bigbang.dyndns.org.
harc[9995]: 2011/07/05_20:55:27 info: Running /etc/ha.d//rc.d/status status
mach_down[10031]: 2011/07/05_20:55:27 info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired
mach_down[10031]: 2011/07/05_20:55:27 info: mach_down takeover complete for node neko.bigbang.dyndns.org.
Jul 05 20:55:27 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (379 messages in queue)
Jul 05 20:55:27 inu.bigbang.dyndns.org heartbeat: [15431]: info: mach_down takeover complete.
IPaddr[10063]: 2011/07/05_20:55:27 INFO: Running OK
Jul 05 20:55:27 inu.bigbang.dyndns.org heartbeat: [9996]: info: Local Resource acquisition completed.
Jul 05 20:55:27 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (380 messages in queue)
Jul 05 20:55:27 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (381 messages in queue)
Jul 05 20:55:29 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (382 messages in queue)
Jul 05 20:55:31 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (383 messages in queue)
Jul 05 20:55:33 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (384 messages in queue)
Jul 05 20:55:35 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (385 messages in queue)
Jul 05 20:55:37 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (386 messages in queue)
Jul 05 20:55:39 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (387 messages in queue)
Jul 05 20:55:41 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (388 messages in queue)
Jul 05 20:55:43 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (389 messages in queue)
Jul 05 20:55:45 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (390 messages in queue)
Jul 05 20:55:47 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (391 messages in queue)
Jul 05 20:55:49 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (392 messages in queue)
Jul 05 20:55:51 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (393 messages in queue)
Jul 05 20:55:53 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (394 messages in queue)
Jul 05 20:55:55 inu.bigbang.dyndns.org heartbeat: [15431]: WARN: Message hist queue is filling up (395 messages in queue)
cib.xml or cib.xml.sig exist in /var/lib/heartbeat/crm/
下記コマンドを実行すると、エラーが表示される場合があります。
# python /usr/lib/heartbeat/haresources2cib.py /etc/ha.d/haresources /var/lib/heartbeat/crm/cib.xml
cib.xml or cib.xml.sig exist in /var/lib/heartbeat/crm/
please remove them before generating new cib.xml
この場合は、/var/lib/heartbeat/crmフォルダ内を全て削除してください。
file = open(resource_file, "r")/
また、下記のように表示されることもあります。
Traceback (most recent call last):
File "/usr/lib/heartbeat/haresources2cib.py", line 464, in <module>
file = open(resource_file, "r")
IOError: [Errno 2] No such file or directory: '/var/lib/heartbeat/crm/cib.xml
この場合は下記のようにします。
# python /usr/lib/heartbeat/haresources2cib.py -c /etc/ha.d/ha.cf /etc/ha.d/haresources
その後、haresources2cib.pyでcib.xmlを作成させます。ファイルが出来ていれば問題ありません。
ERROR: te_connect_stonith: Sign-in failed: triggered a retry
これはheartbeatバージョン2の時にheartbeatを停止させるまで、1秒ごとに表示されるようになりました。
..
Jul 08 22:18:13 inu.bigbang.dyndns.org crmd: [16866]: ERROR: te_connect_stonith: Sign-in failed: triggered a retry
Jul 08 22:18:13 inu.bigbang.dyndns.org crmd: [16866]: info: te_connect_stonith: Attempting connection to fencing daemon.
..
Jul 08 22:18:14 inu.bigbang.dyndns.org crmd: [16866]: ERROR: te_connect_stonith: Sign-in failed: triggered a retry
Jul 08 22:18:14 inu.bigbang.dyndns.org crmd: [16866]: info: te_connect_stonith: Attempting connection to fencing daemon.
..
Jul 08 22:18:15 inu.bigbang.dyndns.org crmd: [16866]: ERROR: te_connect_stonith: Sign-in failed: triggered a retry
Jul 08 22:18:15 inu.bigbang.dyndns.org crmd: [16866]: info: te_connect_stonith: Attempting connection to fencing daemon.
対処としては、ha.cfに「apiauth stonith-ng uid=root」を追記します。
EMERG: Rebooting system. Reason: /usr/lib/heartbeat/crmd
heartbeat(バージョン2)を起動後、マシンが再起動してしまう現象にあいました。ログには下記のようです。
EMERG: Rebooting system. Reason: /usr/lib/heartbeat/crmd
ha.cfでcrm on(yesでも可)とした場合に起動に失敗し、システムが自動的に再起動してしまうようです。調べてみると、crm respawnに変更すれば再起動はしないようです。
確かにこうすれば無限自動リブート現象は起きなくなりました。Pacemakerを使用する場合は、「crm respawn」ではなく「pacemaker on」とした。これでも現象は起きません。
●heartbeatで切り替わるとSSHで接続が拒否される
何かしらのタイミングでheartbeatにより切り替わるとSSHで接続できなくなる現象が発生しました。
下記はWindows PCからの接続時に出力されました。
C:\Documents and Settings\ユーザホームディレクトリ名>ssh -2 -i C:\"Documents and Settings"\ユーザホームディレクトリ名\.ssh\id_dsa -l ユーザ名 ***.***.***.*** -o ProxyCommand="proxy-ssh.win proxy プロキシのポート番号 bigbang.dyndns.org" -L 5910:localhost:5901
connect: Operation now in progress ← 接続コマンド実行
以下が出力された内容
The authenticity of host '***.***.***.*** (<no hostip for proxy command>)' can't be established.
RSA key fingerprint is **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '***.***.***.***' (RSA) to the list of known hosts.
Enter passphrase for key 'C:\Documents and Settings\ユーザホームディレクトリ名\.ssh\id_dsa':
Last login: Sun Sep 18 15:57:00 2011 from ****.bigbang.dyndns.org
これに対処するには、C:\"Documents and Settings"\ユーザホームディレクトリ名\.sshにあるknown_hostsファイルを削除するかknown_hostsファイルにある***.***.***.***の行を削除すれば解決します。
●auto_failbackの設定がoffなのにマスターとして起動してしまう
ホストnezumi、nekoでクラスタ構成としています。
各ホストの設定情報等は下記のとおりです。
inu
OS:CentOS release 6.2 (Final)
kernel:2.6.32-220.13.1.el6.i686
heartbeat:3.0.4-1.el6.i686
/etc/ha.d/ha.cfの設定内容
logfile /var/log/ha-log
logfacility local0
keepalive 5
deadtime 30
warntime 15
initdead 60
udpport 694
ucast eth0 192.168.0.1
auto_failback on
watchdog /dev/watchdog
node nezumi.bigbang.dyndns.org
node neko.bigbang.dyndns.org
uuidfrom nodename
neko
OS:Fedora release 16 (Verne)
kernel:3.3.4-3.fc16.i686.PAE
heartbeat:3.0.4-1.fc15.1.i686
/etc/ha.d/ha.cfの設定内容
logfile /var/log/ha-log
logfacility local0
keepalive 5
deadtime 30
warntime 15
initdead 60
udpport 694
ucast em1 192.168.0.2
auto_failback off
watchdog /dev/watchdog
node neko.bigbang.dyndns.org
node nezumi.bigbang.dyndns.org
uuidfrom nodename
nekoはauto_failbackが「off」にも関わらず再起動等すると必ずマスターとして立ち上がってしまいます。
この点について、現在調査中です。