clusterを設定すると内部的にはheartbeat が動き出す。というわけでheartbeatがわかっていれば、設定値も見たことある感じでわかりやすい。
clusterはvrrpのようにinterfaceごとではなくて、vyatta system全体の設定。↓のtimeout等は適当
$ configure # set cluster group cluster1 primary vyatta1 # set cluster group cluster1 secondary vyatta2 # set cluster group cluster1 service 192.168.0.1/24/eth0 # set cluster group cluster1 service 10.0.0.1/24/eth1 # set cluster auto-failback false # set cluster interface eth0 # set cluster dead-interval 20000 # set cluster keepalive-interval 5000 # set cluster monitor-dead-interval 20000 # set cluster pre-shared-secret hogehoge # commit # save
$ show cluster status === Status report on primary node vyatta1 === Primary vyatta1 (this node): Active Secondary vyatta2: Active (standby) Resources [192.168.0.1/24/eth0]: Active on primary vyatta1 (this node)
おまけ
vyattaの設定とheartbeatのha.cf の対応
vyatta | /etc/ha.d/ha.cf |
dead-interval | deadtime |
keepalive-interval | keepalive |
monitor-dead-interval | deadping |