[SOLVED] Corosync Redundancy question

RobFantini

Famous Member
May 24, 2012
2,043
111
133
Boston,Mass
I want to manually edit corosync.conf to set ring network priorities . I am reading pve-docs/chapter-pvecm.html#pvecm_redundancy . my question is how do I set priority in the .conf ?
Code:
 # pvecm create CLUSTERNAME --link0 10.10.10.1,priority=15 --link1 10.20.20.1,priority=20
this is the totem part of our .conf
Code:
totem {
  cluster_name: 20170226
  config_version: 80
  interface {
    bindnetaddr: 10.10.0.10
    ringnumber: 0
  }
  interface {
    bindnetaddr: 10.10.1.10
    ringnumber: 1
  }
  ip_version: ipv4
  rrp_mode: passive
  secauth: on
  version: 2
}
 
Last edited:
You can find all available config options in the manpage (man corosync.conf). The option is named knet_link_priority.
 
can I verify this:

udp used to be used , so lines' like bindnetaddr: 10.10.0.10' now be deleted now that knet is used ?
 
Last edited:
Yes, since corosync 3 and the switch to knet the bindnetaddr option is no longer needed.
 
OK i am also reading https://people.redhat.com/ccaulfie/docs/KnetCorosync.pdf . "Under the old corosync this was called ringnumber but I've renamed it linknumber to be more consistent with knet"

so if you do not mind check my proposed change
old:
Code:
totem {
  cluster_name: 20170226
  config_version: 80
  interface {
    bindnetaddr: 10.10.0.10
    ringnumber: 0
  }
  interface {
    bindnetaddr: 10.10.1.10
    ringnumber: 1
  }
  ip_version: ipv4
  rrp_mode: passive
  secauth: on
  version: 2
}
new:
Code:
totem {
  cluster_name: 20170226
  config_version: 81
  interface {
    linknumber: 0
    knet_link_priority: 5
  }
  interface {
    linknumber: 1
    knet_link_priority: 10
  }
  ip_version: ipv4
  link_mode: passive
  secauth: on
  version: 2
}

Question:
since the knet_link_priority has a higher number for linknumber 1 then linknumber 0 - linknumber 1 will be used first I assume?
 
Last edited:
Looks good and yes, the one with the higher priority (higher number) will be chosen first as long as the link_mode is 'passive'. You could change rrp_mode to link_mode as well.
 
Looks good and yes, the one with the higher priority (higher number) will be chosen first as long as the link_mode is 'passive'. You could change rrp_mode to link_mode as well.
OK thanks for the help. I also changed rrp_mode to link_mode in my post above..
 
all works well after the changes, these helped verify:
Code:
journalctl -b -u corosync

corosync-cfgtool -s

pvecm nodes

pvecm status