![Keepalived 找不到我的某个接口](https://linux22.com/image/668561/Keepalived%20%E6%89%BE%E4%B8%8D%E5%88%B0%E6%88%91%E7%9A%84%E6%9F%90%E4%B8%AA%E6%8E%A5%E5%8F%A3.png)
我刚刚安装了一台新服务器(Ubuntu 14.04)来开始测试我们的 keepalived 配置,它在(Ubuntu 12.04)上运行良好
我们不在 eth1 接口上分配公共 IP,我们允许 keepalived 这样做以保留我们环境中的公共 IP。
这在 12.04 服务器上有效
/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address x.x.x.x
netmask x.x.x.x
auto eth1
iface eth1 inet static
/etc/keepalived/keepalived.conf
vrrp_script chk_haproxy {
script "/usr/bin/killall -0 haproxy"
interval 2
weight
}
vrrp_script chk_stunnel {
script "/usr/bin/killall -s 0 -r 'stunnel[4]?'"
interval 2
weight
}
global_defs {
notification_email {
[email protected]
}
notification_email_from [email protected]
smtp_server x.x.x.x
smtp_connect_timeout 30
router_id somehost
}
vrrp_instance VI_01 {
interface eth0
state MASTER
virtual_router_id 1
priority 150
advert_int 1
garp_master_delay 5
smtp_alert
# notify scripts and alerts are optional
#
# filenames of scripts to run on transitions
# can be unquoted (if just filename)
# or quoted (if has parameters)
# to MASTER transition
notify_master "/sbin/route del default gw x.x.x.x"
# to BACKUP transition
notify_backup "/sbin/route add default gw x.x.x.x"
authentication {
auth_type PASS
auth_pass somepas
}
track_script {
chk_stunnel
chk_haproxy
}
virtual_ipaddress {
x.x.x.x/x dev eth1
}
virtual_routes {
default via x.x.x.x dev eth1
}
}
然而,在 14.04 系统上,当通过复制和粘贴(仅修改新子网的 IP)进行安装时,keepalived 表示接口队列为空,并将 eth1 声明为缺失接口。
这是 Ubuntu 14.04 中 ipvs 行为的改变吗?没有 IP 的接口将不再可用?