<服务>Keepalived服务

时间:Jan. 16, 2017 分类:

目录:

Keepalived

keepalive期初是专门为LVS设计的,专门用来监控LVS集群系统中各个服务节点的状态的,后来又加入了VRRP(虚拟路由器冗余协议)功能,因此除了配合LVS,也可以做Nginx,haproxy和MySQL等高可用性软件,只要是满足一个挂掉,另一个服务接管都可以用keepalived来进行实现高可用。所以keepalived的两大用途就是服务健康检查和失败接管。

Keepalived故障切换是通过VRRP协议来实现,主节点通过不断向备份节点广播心跳信息,用于告诉备节点正常使用,当主节点发生故障,备节点无法继续监测到主节点的心跳信息,进而自身接管程序,接管主节点IP资源以及服务,当主节点恢复服务,备节点会释放主节点故障时接管的IP资源及服务。

VRRP协议是为了解决静态路由的单点故障,VRRP是通过一种竞选协议机制来将路由任务交给某台VRRP路由器。

在一台VRRP虚拟路由中,有多台物理的VRRP路由器,但是这多台物理机器不能同时工作,而是由一台MASTER负责路由工作,而其他都是BACKUP,而MASTER并非一成不变,VRRP协议让每个VRRP路由参与竞选,最终获胜的就是MASTER,MASTER有一些特权,比如拥有虚拟路由器的IP地址,我们的主机就是用这个IP地址作为静态路由的,拥有特权的MASTER要负责转发发送给网关地址的包和响应ARP请求。

VRRP通过竞选协议来实现虚拟路由器的功能,所有的协议报文都是通过IP多播包形式发送的。虚拟路由由VRID和一组IP地址组成,对外表现为一个周知的MAC地址。所以在一个虚拟路由器中不管谁是MASTER,对外都是相同的MAC和IP(即VIP),客户端也不需要因为MASTER的改变而修改自己的路由配置,对外部来说主从切换是透明的。

在一个虚拟路由器中,只有作为MASTER的VRRP路由器会一直发送VRRP广告包,BACKUP不会抢占MASTER,除非它的优先级更高,当MASTER不可用时(收不到广播包),多台的BACKUP中优先级最高的这台会被抢占为MASTER,这种抢占是非常快速的,大概小于1s,以保证服务的连续性。

另外出于安全性,VRRP包使用了加密协议进行加密,不过官方说效果不好。

keepalived安装

[root@why-1 ~]# wget http://www.keepalived.org/software/keepalived-1.1.19.tar.gz
[root@why-1 ~]# tar xf keepalived-1.1.19.tar.gz 
[root@why-1 ~]# cd keepalived-1.1.19
[root@why-1 keepalived-1.1.19]# ./configure
Keepalived configuration
------------------------
Keepalived version       : 1.1.19
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lpopt -lssl -lcrypto 
Use IPVS Framework       : Yes          # 支持IPVS
IPVS sync daemon support : Yes          # 支持IPVS同步
Use VRRP Framework       : Yes          # 支持VRRP
Use Debug flags          : No
[root@why-1 keepalived-1.1.19]# make    # 如果有openssl问题,yum install openssl*,如果有popt问题,yum install popt*
[root@why-1 keepalived-1.1.19]# make install
[root@why-1 keepalived]# cp /usr/local/etc/rc.d/init.d/keepalived /etc/init.d/
[root@why-1 keepalived]# cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/
[root@why-1 keepalived]# mkdir -p /etc/keepalived
[root@why-1 keepalived]# cp /usr/local/etc/keepalived/keepalived.conf /etc/keepalived/
[root@why-1 keepalived]# cp /usr/local/sbin/keepalived /usr/sbin/
[root@why-1 keepalived]# /etc/init.d/keepalived start
正在启动 keepalived:                                      [确定]
[root@why-1 keepalived]# ps -ef | grep keep
root      9405     1  0 19:30 ?        00:00:00 keepalived -D
root      9407  9405  2 19:30 ?        00:00:00 keepalived -D
root      9408  9405  6 19:30 ?        00:00:00 keepalived -D
root      9410  6624  0 19:30 pts/1    00:00:00 grep keep
[root@why-1 keepalived]# /etc/init.d/keepalived stop
停止 keepalived:                                          [确定]
以上配置的过程都可以通过configure的时候加入--sysconf=/etc来解决
然后只需要
cp /usr/local/sbin/keepalived /usr/sbin/

keepalived配置文件(单实例)

#192.168.0.201配置
[root@why-1 keepalived]# cat keepalived.conf
! Configuration File for keepalived     #注释

global_defs {                           #全局定义
   notification_email {                 #监控报警邮箱
   93216193@qq.com                      #邮箱一般不用配置,这些一般通过监控来实现
   }
   notification_email_from Alexandre.Cassen@firewall.loc    #发件人
   smtp_server 127.0.0.1                                        #发邮件的服务器
   smtp_connect_timeout 30                                  #超时时间
   router_id LVS_1                                          #keepalived id
}

vrrp_instance VI_1 {                    #一个实例,可以理解为虚拟路由器(VI_1为实例名)
    state MASTER                        #标记状态
    interface eth0                      #提供服务的接口,即keepalived通过eth0网卡通信
    virtual_router_id 55                #虚拟路由ID,在两个keepalived之间必须一致,在同一keepalived的中不能相同
    priority 150                        #优先级,在优先级和状态标记之间,以优先级为准
    advert_int 1                        #超时间隔,单位为s
    authentication {                    #授权加密口令
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {                 #vip地址
        192.168.0.204/24
    }
}

#192.168.0.130配置
[root@why keepalived]# cat keepalived.conf
! Configuration File for keepalived

global_defs {
   notification_email {
   93216193@qq.com
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_2                      #不同keepalived id
}

vrrp_instance VI_1 {                    #相同实例名
    state BACKUP                        #标记状态
    interface eth0
    virtual_router_id 55                #相同虚拟路由id
    priority 100                        #官方建议,相差50
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {                 #相同的VIP
        192.168.0.204/24
    }
}

更多的配置可以man keepalived.conf

keepalived单实例配置检验

我这边通过两台机器,IP分别为192.168.0.201和192.168.0.130且不做任何别名IP配置,VIP为192.168.0.204,配置文件如上所示

192.168.0.201主机

[root@why-1 keepalived]# /etc/init.d/keepalived start
正在启动 keepalived:                                      [确定]
[root@why-1 keepalived]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:98:5B:B7  
          inet addr:192.168.0.201  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe98:5bb7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:71629 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32927 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:80780577 (77.0 MiB)  TX bytes:2605091 (2.4 MiB)
          Interrupt:19 Base address:0x2000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:88 errors:0 dropped:0 overruns:0 frame:0
          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7368 (7.1 KiB)  TX bytes:7368 (7.1 KiB)

[root@why-1 keepalived]# ip add 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:0c:29:98:5b:b7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.201/24 brd 192.168.0.255 scope global eth0
    inet 192.168.0.204/24 scope global secondary eth0
    inet6 fe80::20c:29ff:fe98:5bb7/64 scope link 
       valid_lft forever preferred_lft forever
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether 16:22:d2:06:6c:1a brd ff:ff:ff:ff:ff:ff

通过ip add我们可以看到虚拟的192.168.0.204/24的ip,但是在ifconfig中没有看到。不要在意那个pan0的网卡,那个是蓝牙网卡。

192.168.0.130主机

[root@why keepalived]# /etc/init.d/keepalived start
正在启动 keepalived:                                      [确定]
[root@why keepalived]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:D1:C4:C3  
          inet addr:192.168.0.130  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fed1:c4c3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:127803 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21491 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:38609705 (36.8 MiB)  TX bytes:6321745 (6.0 MiB)
          Interrupt:19 Base address:0x2000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2195 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2195 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:173144 (169.0 KiB)  TX bytes:173144 (169.0 KiB)

[root@why keepalived]# ip add 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:0c:29:d1:c4:c3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.130/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::20c:29ff:fed1:c4c3/64 scope link 
       valid_lft forever preferred_lft forever
4: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN 
    link/ether 22:49:69:a7:47:45 brd ff:ff:ff:ff:ff:ff

通过第三方机器进行ping再次同时关闭201主机的keepalived

[root@why-3 conf]# ping 192.168.0.204
PING 192.168.0.204 (192.168.0.204) 56(84) bytes of data.
64 bytes from 192.168.0.204: icmp_seq=1 ttl=64 time=18.1 ms
64 bytes from 192.168.0.204: icmp_seq=2 ttl=64 time=2.20 ms
64 bytes from 192.168.0.204: icmp_seq=3 ttl=64 time=9.29 ms
64 bytes from 192.168.0.204: icmp_seq=4 ttl=64 time=8.09 ms
64 bytes from 192.168.0.204: icmp_seq=5 ttl=64 time=6.94 ms
64 bytes from 192.168.0.204: icmp_seq=6 ttl=64 time=6.50 ms
64 bytes from 192.168.0.204: icmp_seq=7 ttl=64 time=2.26 ms
64 bytes from 192.168.0.204: icmp_seq=8 ttl=64 time=3.46 ms
64 bytes from 192.168.0.204: icmp_seq=9 ttl=64 time=9.13 ms
64 bytes from 192.168.0.204: icmp_seq=14 ttl=64 time=14.3 ms
64 bytes from 192.168.0.204: icmp_seq=15 ttl=64 time=5.81 ms
64 bytes from 192.168.0.204: icmp_seq=16 ttl=64 time=8.16 ms
64 bytes from 192.168.0.204: icmp_seq=17 ttl=64 time=8.05 ms
64 bytes from 192.168.0.204: icmp_seq=18 ttl=64 time=4.78 ms
64 bytes from 192.168.0.204: icmp_seq=19 ttl=64 time=4.08 ms
^C64 bytes from 192.168.0.204: icmp_seq=20 ttl=64 time=7.67 ms

--- 192.168.0.204 ping statistics ---
20 packets transmitted, 16 received, 20% packet loss, time 19082ms
rtt min/avg/max/mdev = 2.201/7.435/18.182/4.051 ms

可以看到中间间隔了10,11,12和13是不存在的,丢了4个包,就是在这一时段切换造成的

keepalived多实例配置

#192.168.0.201配置
[root@why-1 keepalived]# cat keepalived.conf
! Configuration File for keepalived

global_defs {
   notification_email {
   93216193@qq.com
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_1
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 150
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.0.205/24
    }
}

vrrp_instance VI_2 {
    state BACKUP
    interface eth0
    virtual_router_id 52
    priority 50
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.0.204/24
    }
}


#192.168.0.130配置
[root@why keepalived]# cat keepalived.conf
! Configuration File for keepalived

global_defs {
   notification_email {
   93216193@qq.com
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_2
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.0.205/24
    }
}

vrrp_instance VI_2 {
    state MASTER
    interface eth0
    virtual_router_id 52
    priority 150
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.0.204/24
    }
}

keepalived多实例配置检验

同时启动192.168.0.130和192.168.0.202的keepalived

[root@why-1 keepalived]# /etc/init.d/keepalived start
正在启动 keepalived:                                      [确定]
[root@why keepalived]# /etc/init.d/keepalived start
正在启动 keepalived:                                      [确定]

分别在两端查看一下启动的ip


[root@why-1 keepalived]# ip add |egrep '204|205'
    inet 192.168.0.205/24 scope global secondary eth0
[root@why keepalived]# ip add |egrep '204|205'
    inet 192.168.0.204/24 scope global secondary eth0

与上述配置文件中配置的权重值和状态一致

192.168.0.201端关闭keepalived

[root@why-1 keepalived]# /etc/init.d/keepalived stop
停止 keepalived:                                          [确定]

192.168.0.130端查看ip

[root@why keepalived]# ip add |egrep '204|205'
    inet 192.168.0.204/24 scope global secondary eth0
    inet 192.168.0.205/24 scope global secondary eth0

192.168.0.201端启动keepalived并查看ip

[root@why-1 keepalived]# /etc/init.d/keepalived start
正在启动 keepalived:                                      [确定]
[root@why-1 keepalived]# ip add |egrep '204|205'
    inet 192.168.0.205/24 scope global secondary eth0

192.168.0.130端查看ip

[root@why keepalived]# ip add |egrep '204|205'
    inet 192.168.0.204/24 scope global secondary eth0

keepalived日志

默认日志位置

[root@why-1 keepalived]# tail -n 10 /var/log/messages
Jan 14 23:52:50 why-1 Keepalived_healthcheckers: Using LinkWatch kernel netlink reflector...
Jan 14 23:52:50 why-1 Keepalived_vrrp: VRRP_Instance(VI_2) Entering BACKUP STATE
Jan 14 23:52:50 why-1 Keepalived_vrrp: VRRP sockpool: [ifindex(2), proto(112), fd(10,11)]
Jan 14 23:52:51 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE
Jan 14 23:52:52 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE
Jan 14 23:52:52 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.
Jan 14 23:52:52 why-1 Keepalived_healthcheckers: Netlink reflector reports IP 192.168.0.205 added
Jan 14 23:52:52 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.0.205
Jan 14 23:52:57 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.0.205
Jan 14 23:59:31 why-1 kernel: IPVS: __ip_vs_del_service: enter

keepalived日志配置

[root@why-1 keepalived]# vi /etc/sysconfig/keepalived
# Options for keepalived. See `keepalived --help' output and keepalived(8) and
# keepalived.conf(5) man pages for a list of all options. Here are the most
# common ones :
#
# --vrrp               -P    Only run with VRRP subsystem.
# --check              -C    Only run with Health-checker subsystem.
# --dont-release-vrrp  -V    Dont remove VRRP VIPs & VROUTEs on daemon stop.
# --dont-release-ipvs  -I    Dont remove IPVS topology on daemon stop.
# --dump-conf          -d    Dump the configuration data.
# --log-detail         -D    Detailed log messages.
# --log-facility       -S    0-7 Set local syslog facility (default=LOG_DAEMON)
#

#KEEPALIVED_OPTIONS="-D"
KEEPALIVED_OPTIONS="-D -d -S 0"

[root@why-1 keepalived]# echo 'local0.*        /var/log/keepalived.log' >> /etc/rsyslog.conf
[root@why-1 keepalived]# tail -n 1 !$
tail -n 2 /etc/rsyslog.conf
local0.*    /var/log/keepalived.log

重启并认证

[root@why-1 keepalived]# /etc/init.d/rsyslog restart
关闭系统日志记录器:                                       [确定]
启动系统日志记录器:                                       [确定]
[root@why-1 keepalived]# /etc/init.d/keepalived restart
停止 keepalived:                                          [确定]
正在启动 keepalived:                                      [确定]
[root@why-1 keepalived]# cat /var/log/keepalived.log 
Jan 15 00:56:48 why-1 Keepalived: Terminating on signal
Jan 15 00:56:48 why-1 Keepalived: Stopping Keepalived v1.1.19 (01/14,2017)
Jan 15 00:56:48 why-1 Keepalived_vrrp: Terminating VRRP child process on signal
Jan 15 00:56:48 why-1 Keepalived_healthcheckers: Terminating Healthchecker child process on signal
Jan 15 00:56:49 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.
Jan 15 00:56:49 why-1 Keepalived: Starting Keepalived v1.1.19 (01/14,2017)
Jan 15 00:56:49 why-1 Keepalived: Starting Healthcheck child process, pid=10401
Jan 15 00:56:49 why-1 Keepalived: Starting VRRP child process, pid=10402
Jan 15 00:56:49 why-1 Keepalived_vrrp: Netlink reflector reports IP 192.168.0.201 added
Jan 15 00:56:49 why-1 Keepalived_vrrp: Registering Kernel netlink reflector
Jan 15 00:56:49 why-1 Keepalived_vrrp: Registering Kernel netlink command channel
Jan 15 00:56:49 why-1 Keepalived_vrrp: Registering gratutious ARP shared channel
Jan 15 00:56:49 why-1 Keepalived_vrrp: Initializing ipvs 2.6
Jan 15 00:56:49 why-1 Keepalived_vrrp: Opening file '/etc/keepalived/keepalived.conf'.
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: Initializing ipvs 2.6
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: Netlink reflector reports IP 192.168.0.201 added
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: Registering Kernel netlink reflector
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: Registering Kernel netlink command channel
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: Opening file '/etc/keepalived/keepalived.conf'.
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: Configuration is using : 7151 Bytes
Jan 15 00:56:49 why-1 Keepalived_vrrp: Configuration is using : 66179 Bytes
Jan 15 00:56:49 why-1 Keepalived_vrrp: ------< Global definitions >------
Jan 15 00:56:49 why-1 Keepalived_vrrp:  Router ID = LVS_1
Jan 15 00:56:49 why-1 Keepalived_vrrp:  Smtp server = 10.0.0.1
Jan 15 00:56:49 why-1 Keepalived_vrrp:  Smtp server connection timeout = 30
Jan 15 00:56:49 why-1 Keepalived_vrrp:  Email notification from = Alexandre.Cassen@firewall.loc
Jan 15 00:56:49 why-1 Keepalived_vrrp:  Email notification = 49000448@qq.com
Jan 15 00:56:49 why-1 Keepalived_vrrp: ------< VRRP Topology >------
Jan 15 00:56:49 why-1 Keepalived_vrrp:  VRRP Instance = VI_1
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Want State = MASTER
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Runing on device = eth0
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Virtual Router ID = 51
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Priority = 150
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Advert interval = 1sec
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Authentication type = SIMPLE_PASSWORD
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Password = 1111
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Virtual IP = 1
Jan 15 00:56:49 why-1 Keepalived_vrrp:      192.168.0.205/24 brd 192.168.0.205 dev eth0 scope global
Jan 15 00:56:49 why-1 Keepalived_vrrp:  VRRP Instance = VI_2
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Want State = BACKUP
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Runing on device = eth0
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Virtual Router ID = 52
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Priority = 50
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Advert interval = 1sec
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Authentication type = SIMPLE_PASSWORD
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Password = 1111
Jan 15 00:56:49 why-1 Keepalived_vrrp:    Virtual IP = 1
Jan 15 00:56:49 why-1 Keepalived_vrrp:      192.168.0.204/24 brd 192.168.0.204 dev eth0 scope global
Jan 15 00:56:49 why-1 Keepalived_vrrp: Using LinkWatch kernel netlink reflector...
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: ------< Global definitions >------
Jan 15 00:56:49 why-1 Keepalived_healthcheckers:  Router ID = LVS_1
Jan 15 00:56:49 why-1 Keepalived_healthcheckers:  Smtp server = 10.0.0.1
Jan 15 00:56:49 why-1 Keepalived_healthcheckers:  Smtp server connection timeout = 30
Jan 15 00:56:49 why-1 Keepalived_healthcheckers:  Email notification from = Alexandre.Cassen@firewall.loc
Jan 15 00:56:49 why-1 Keepalived_healthcheckers:  Email notification = 49000448@qq.com
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: ------< SSL definitions >------
Jan 15 00:56:49 why-1 Keepalived_healthcheckers:  Using autogen SSL context
Jan 15 00:56:49 why-1 Keepalived_healthcheckers: Using LinkWatch kernel netlink reflector...
Jan 15 00:56:49 why-1 Keepalived_vrrp: VRRP_Instance(VI_2) Entering BACKUP STATE
Jan 15 00:56:49 why-1 Keepalived_vrrp: VRRP sockpool: [ifindex(2), proto(112), fd(10,11)]
Jan 15 00:56:50 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) Transition to MASTER STATE
Jan 15 00:56:51 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE
Jan 15 00:56:51 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) setting protocol VIPs.
Jan 15 00:56:51 why-1 Keepalived_healthcheckers: Netlink reflector reports IP 192.168.0.205 added
Jan 15 00:56:51 why-1 Keepalived_vrrp: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.0.205