Corosync em servidores em nuvem

1

Eu tenho dois servidores Oracle Linux 7 na nuvem e quero usar o Corosync. Os servidores estão na mesma rede de nuvem (não na LAN), mas eles têm apenas um nic. Aqui estão os arquivos conf.

Servidor A:

totem {
        version: 2

        secauth: off
        transport: udpu

        crypto_cipher: none
        crypto_hash: none

        interface {
                member {
                        memberaddr: x.y.z.i
                }
                member {
                        memberaddr: x.y.z.j
                }
                ringnumber: 0
                bindnetaddr: x.y.z.i
                mcastport: 5405
                ttl: 1
        }
}

logging {
        fileline: off
        to_stderr: no
        to_logfile: yes
        logfile: /var/log/cluster/corosync.log
        to_syslog: yes
        debug: off
        timestamp: on
        logger_subsys {
                subsys: QUORUM
                debug: off
        }
}

quorum {
        #provider: corosync_votequorum
}

Servidor B:

totem {
        version: 2

        secauth: off
        transport: udpu

        crypto_cipher: none
        crypto_hash: none

        interface {
                member {
                        memberaddr: x.y.z.i
                }
                member {
                        memberaddr: x.y.z.j
                }
                ringnumber: 0
                bindnetaddr: x.y.z.j
                mcastport: 5405
                ttl: 1
        }
}

logging {
        fileline: off
        to_stderr: no
        to_logfile: yes
        logfile: /var/log/cluster/corosync.log
        to_syslog: yes
        debug: off
        timestamp: on
        logger_subsys {
                subsys: QUORUM
                debug: off
        }
}

quorum {
        #provider: corosync_votequorum
}

Quando inicio os serviços do Corosync nos dois servidores, vejo que eles não se unem, mas nos logs do servidor A há entradas de log recorrentes a cada dois segundos:

Jun 08 04:22:48 [17856] serverA corosync notice  [TOTEM ] A new membership (x.y.z.i:20544) was formed. Members
Jun 08 04:22:48 [17856] serverA corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.
Jun 08 04:22:49 [17856] serverA corosync notice  [TOTEM ] A new membership (x.y.z.i:20548) was formed. Members
Jun 08 04:22:49 [17856] serverA corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.
Jun 08 04:22:50 [17856] serverA corosync notice  [TOTEM ] A new membership (x.y.z.i:20552) was formed. Members
Jun 08 04:22:50 [17856] serverA corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.
Jun 08 04:22:52 [17856] serverA corosync notice  [TOTEM ] A new membership (x.y.z.i:20556) was formed. Members
Jun 08 04:22:52 [17856] serverA corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.
Jun 08 04:22:53 [17856] serverA corosync notice  [TOTEM ] A new membership (x.y.z.i:20560) was formed. Members
Jun 08 04:22:53 [17856] serverA corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.
Jun 08 04:22:55 [17856] serverA corosync notice  [TOTEM ] A new membership (x.y.z.i:20564) was formed. Members
Jun 08 04:22:55 [17856] serverA corosync notice  [MAIN  ] Completed service synchronization, ready to provide service.

E aqui estão as saídas "corosync-cmapctl | grep member":

Servidor A:

runtime.totem.pg.mrp.srp.members.1489420110.config_version (u64) = 0
runtime.totem.pg.mrp.srp.members.1489420110.ip (str) = r(0) ip(x.y.z.i)
runtime.totem.pg.mrp.srp.members.1489420110.join_count (u32) = 1
runtime.totem.pg.mrp.srp.members.1489420110.status (str) = joined
totem.interface.0.member.0 (str) = x.y.z.j
totem.interface.0.member.1 (str) = x.y.z.i

Servidor B:

runtime.totem.pg.mrp.srp.members.1489420107.config_version (u64) = 0
runtime.totem.pg.mrp.srp.members.1489420107.ip (str) = r(0) ip(x.y.z.j)
runtime.totem.pg.mrp.srp.members.1489420107.join_count (u32) = 1
runtime.totem.pg.mrp.srp.members.1489420107.status (str) = joined
totem.interface.0.member.0 (str) = x.y.z.j
totem.interface.0.member.1 (str) = x.y.z.i

O que estou fazendo de errado?

    
por Hakan 08.06.2015 / 10:34

2 respostas

1

Você deve usar um IP privado e não o IP público

    
por 09.06.2015 / 14:35
0

O corosync usa comunicação de rede multicast que é bloqueada por alguns provedores de nuvem, e a AWS deve nomear um.

link

Q. Does Amazon VPC support multicast or broadcast?

No

    
por 08.06.2015 / 14:21

Tags