Heartbeat está me dando dor de cabeça

2

Eu tenho 2 VMs do Ubuntu 11.04 nas quais eu instalei o Heartbeat + apache2 para obter uma configuração de "alta disponibilidade". O Heartbeat está ativo e funcionando em ambos, mas eu não consigo fazer ping no IP Virtual (ip do cluster)

A partir do guia que eu segui, o Heartbeat é automaticamente criado para criar um alias no nó ativo. Mas eu não vejo nenhum alias em ambos os meus VM's

A configuração é assim:

ha-node1 configs:

root@ha-node1:/etc/ha.d# cat ha.cf
autojoin none
#mcast bond0 239.0.0.43 694 1 0
warntime 5
deadtime 15
initdead 60
keepalive 2
node ha-node1
node ha-node2
pacemaker respawn
logfile /var/log/ha-log
debugfile /var/log/ha-debug
udpport 694
auto_failback on
bcast eth0

root@ha-node1:/etc/ha.d# cat haresources
ha-node1 IPaddr::10.0.0.10 apache2

root@ha-node1:/etc/ha.d# crm_mon -1
============
Last updated: Thu Oct  6 17:42:57 2011
Stack: Heartbeat
Current DC: ha-node1 (710962f3-6239-4519-8ab7-b176af92cfe4) - partition with quorum
Version: 1.0.9-da7075976b5ff0bee71074385f8fd02f296ec8a3
2 Nodes configured, unknown expected votes
0 Resources configured.
============

Online: [ ha-node1 ha-node2 ]

root@ha-node1:/etc/ha.d# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0c:29:cb:ae:9d
          inet addr:10.0.0.8  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fecb:ae9d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25247 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17038 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25278878 (25.2 MB)  TX bytes:2374181 (2.3 MB)
          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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)

root@ha-node1:/etc/ha.d# ip addr show
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:cb:ae:9d brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.8/8 brd 10.255.255.255 scope global eth0
    inet6 fe80::20c:29ff:fecb:ae9d/64 scope link
       valid_lft forever preferred_lft forever

ha-node2 configs:

root@ha-node2:/etc/ha.d# cat ha.cf
autojoin none
#mcast bond0 239.0.0.43 694 1 0
warntime 5
deadtime 15
initdead 60
keepalive 2
node ha-node1
node ha-node2
pacemaker respawn
logfile /var/log/ha-log
debugfile /var/log/ha-debug
udpport 694
auto_failback on
bcast eth0

root@ha-node2:/etc/ha.d# cat haresources
ha-node1 IPaddr::10.0.0.10 apache2

root@ha-node2:/etc/ha.d# crm_mon -1
============
Last updated: Thu Oct  6 17:44:07 2011
Stack: Heartbeat
Current DC: ha-node1 (710962f3-6239-4519-8ab7-b176af92cfe4) - partition with quorum
Version: 1.0.9-da7075976b5ff0bee71074385f8fd02f296ec8a3
2 Nodes configured, unknown expected votes
0 Resources configured.
============

Online: [ ha-node1 ha-node2 ]

root@ha-node2:/etc/ha.d# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0c:29:d9:ca:5c
          inet addr:10.0.0.9  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20c:29ff:fed9:ca5c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23310 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15397 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25070323 (25.0 MB)  TX bytes:2044327 (2.0 MB)
          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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)

root@ha-node2:/etc/ha.d# ip addr show
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:d9:ca:5c brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.9/8 brd 10.255.255.255 scope global eth0
    inet6 fe80::20c:29ff:fed9:ca5c/64 scope link
       valid_lft forever preferred_lft forever

crm_mon -1 me diz que 0 Recursos configurados. Mas eu adicionei claramente o recurso IPaddr nos recursos haresources. Não consigo fazer ping ou navegar pelo IP virtual. Eu fiz alguma coisa errada na configuração?

    
por Nel 06.10.2011 / 14:18

1 resposta

2

0 Resources configured significa que o IP de failover é não configurado como um recurso de alta disponibilidade.

A propósito, se o failover de IP é tudo que você precisa, o CARP (via ucarp / ucarpd) é muito mais simples.

    
por 06.10.2011 / 15:38