[FUG-BR] Carp + ifstated
Christiano Liberato
christianoliberato em gmail.com
Sexta Novembro 22 16:51:10 BRST 2013
Caros,
estou com problemas para um servidor retornar a ser master com as trocas de
advskew via ifstated.
Segue o cenário:
##########
server1
##########
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:01
priority: 0
carp: MASTER carpdev vic0 vhid 1 advbase 1 advskew 0
groups: carp
inet6 fe80::200:5eff:fe00:101%carp0 prefixlen 64 scopeid 0x5
inet 172.16.1.250 netmask 0xfffffe00 broadcast 172.16.1.255
carp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:02
priority: 0
carp: MASTER carpdev vic1 vhid 2 advbase 1 advskew 0
groups: carp
inet6 fe80::200:5eff:fe00:102%carp1 prefixlen 64 scopeid 0x6
inet 192.168.56.12 netmask 0xffffff00 broadcast 192.168.56.255
##########
server2
##########
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:01
priority: 0
carp: BACKUP carpdev vic0 vhid 1 advbase 1 advskew 128
groups: carp
inet6 fe80::200:5eff:fe00:101%carp0 prefixlen 64 scopeid 0x5
inet 172.16.1.250 netmask 0xfffffe00 broadcast 172.16.1.255
carp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:00:5e:00:01:02
priority: 0
carp: BACKUP carpdev vic1 vhid 2 advbase 1 advskew 128
groups: carp
inet6 fe80::200:5eff:fe00:102%carp1 prefixlen 64 scopeid 0x6
inet 192.168.56.12 netmask 0xffffff00 broadcast 192.168.56.255
##############################################
/etc/ifstated.conf (rodando apenas no server1)
##############################################
init-state one
if_up="carp0.link.up && carp1.link.up "
state one {
if ( ! $if_up ) {
run "ifconfig carp0 advskew 200"
run "ifconfig carp1 advskew 200"
set-state two
}
}
state two {
if ( $if_up ) {
run "ifconfig carp0 advskew 0"
run "ifconfig carp1 advskew 0"
set-state one
}
}
#########
Conforme o ifstated.conf, ao derrubar a int carp0 (ou carp1) no server1,
ele se torna BACKUP, pois recebe advskew 200.
E o problema acontece aqui: ao subir a int carp0 (ou carp1) no server1, ele
deveria receber advskew 0 e se tornar MASTER.
Isso nao acontece, mesmo se fizer na mao, ele vira MASTER e volta para
BACKUP.
Alguem sabe se estou errando ou se falta alguma coisa?
Obrigado!
Mais detalhes sobre a lista de discussão freebsd