[ClusterLabs Developers] Receiving duplicated events with votequorum

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Sat Jun 13 22:46:06 UTC 2015


Hi all,

I am currently playing with corosync libs but fail to understand how votequorum
works. Especially, why I receive *every* events multiple times.

Take "test/testvotequorum1.c" from corosync git repo and compile it. When I
start the binary with all other corosync daemons stopped but the local one, I
got:

    # ./testquorum 
    node votes       1
    expected votes   3
    highest expected 3
    total votes      1
    quorum           2
    flags            
    Waiting for votequorum events, press ^C to finish
    -------------------
    votequorum notification called 
      quorate         = 0
      number of nodes = 2
      current ringid  = (168430210.96)
          168430210: Member
          168430211: Dead


So far so good. But if I start a remote corosync daemon, I receive this:

    votequorum notification called 
      quorate         = 0
      number of nodes = 2
      current ringid  = (168430210.100)
          168430210: Member
          168430211: Dead

    votequorum notification called 
      quorate         = 1
      number of nodes = 2
      current ringid  = (168430210.100)
          168430210: Member
          168430211: Member

    votequorum notification called 
      quorate         = 1
      number of nodes = 2
      current ringid  = (168430210.100)
          168430210: Member
          168430211: Member


If I shut this remote corosync down, I have:

    votequorum notification called 
      quorate         = 0
      number of nodes = 2
      current ringid  = (168430210.104)
          168430210: Member
          168430211: Dead

    votequorum notification called 
      quorate         = 0
      number of nodes = 2
      current ringid  = (168430210.104)
          168430210: Member
          168430211: Dead

Why events are sent twice? And why do we receive a first event showing a node
Dead when this node become a Member? How application relying on votequorum
should process this duplicated events?

Is it related to the following fix?
https://github.com/corosync/corosync/commit/82526d2fe9137e8b604f1bbae6d6e39ba41377f9

Bonus question: what are the definitions of CS_TRACK_CHANGES, CS_TRACK_CURRENT
and CS_TRACK_CHANGES_ONLY?


Regards,
-- 
Jehan-Guillaume de Rorthais
Dalibo
http://www.dalibo.com




More information about the Developers mailing list