今度はkeepalived(1.1.15)でもたついている
repcached(memcached+レプリケーション)を2台のサーバで起動して、マルチマスターで動くことまでは確認できた→(テスト進行表)
そこで、keepalivedでロードバランスと、health checkをしようとして、keepalivedのインストール、起動までは問題が無かった。しかし、設定がちゃんと反映されているかを確かめたくて、/etc/sysconfig/keepalived に -D -d のコマンドオプションを指定して service keepalived startしたらば、下記のようにGlobal definitionsしか表示されない。(環境はFedora5 カーネルは2.6.15-1.2054_FC5でx86_64)
today now servername Keepalived: Starting Keepalived v1.1.15 (05/10,2008) today now servername Keepalived: Starting VRRP child process, pid=25759 today now servername Keepalived_vrrp: Using MII-BMSR NIC polling thread... today now servername Keepalived_vrrp: Registering Kernel netlink reflector today now servername Keepalived_vrrp: Registering Kernel netlink command chann el today now servername Keepalived_vrrp: Registering gratutious ARP shared channe l today now servername Keepalived_vrrp: Opening file '/etc/keepalived/keepalived .conf'. today now servername Keepalived_vrrp: Configuration is using : 59219 Bytes today now servername Keepalived_vrrp: ------< Global definitions >------ today now servername Keepalived_vrrp: Router ID = LVS_MEMCACHED today now servername Keepalived_vrrp: Smtp server = 127.0.0.1 today now servername Keepalived_vrrp: Smtp server connection timeout = 30 today now servername Keepalived_vrrp: Email notification from = root@hostname today now servername Keepalived_vrrp: Email notification = mgrsite@hostname
ちなみに/etc/keepalived/keepalived.confはこんな感じ
global_defs { notification_email { mgrsite@amuse.co.jp } notification_email_from root@mysql1.amuse.co.jp smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_MEMCACHED } virtual_server_group MEMCACHED { 192.168.1.10 11213 } virtual_server MEMCACHED { delay_loop 6 lb_algo rr lb_kind NAT persistence_timeout 50 protocol TCP real_server 192.168.1.10 11211 { weight 1 TCP_CHECK { connect_port 11211 connect_timeout 3 } } real_server 192.168.1.11 11211 { weight 1 TCP_CHECK { connect_port 11211 connect_timeout 3 } } }
あー、もしかしてkeepalivedって、ルータ構成(NIC2枚挿しで、loadbalancerとreal_serverは別サーバ)というのを仮定してるのか?つまり、load balancerとreal_serverの1台が同じマシンじゃダメとか、NICが1枚じゃダメとか...
(追記)
別のマシンにkeepalivedをインストールしてみたが、特に挙動は変化なし。Keepalived for LVSのUserguideの8.3節の2のようなログを期待してるんだけど....