Browse Source

corosync.conf: publicize nodelist.node.name

It was discovered that pacemaker has been occassionaly relying on
those items configured in corosync.conf (and documenting so), while
backpropagation got stuck somewhere.  As the option is deemed generally
beneficial, rectify this gap now and make it standard,
public part of the configuration space, possibly also for other
client SW to use now.

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Jan Pokorný 8 years ago
parent
commit
4708d1dc29
3 changed files with 18 additions and 2 deletions
  1. 1 0
      conf/lenses/corosync.aug
  2. 5 1
      conf/lenses/tests/test_corosync.aug
  3. 12 1
      man/corosync.conf.5

+ 1 - 0
conf/lenses/corosync.aug

@@ -167,6 +167,7 @@ let node =
   let setting =
   let setting =
    qstr /ring[0-9]_addr/
    qstr /ring[0-9]_addr/
    |kv "nodeid" Rx.integer
    |kv "nodeid" Rx.integer
+   |kv "name" Rx.hostname
    |kv "quorum_votes" Rx.integer in
    |kv "quorum_votes" Rx.integer in
   section "node" setting
   section "node" setting
 
 

+ 5 - 1
conf/lenses/tests/test_corosync.aug

@@ -77,6 +77,7 @@ nodelist {
 	node {
 	node {
 		ring0_addr: 192.168.122.1
 		ring0_addr: 192.168.122.1
 		nodeid: 1
 		nodeid: 1
+		name: balalaika
 		quorum_votes: 2
 		quorum_votes: 2
 	}
 	}
 
 
@@ -84,6 +85,7 @@ nodelist {
 		ring0_addr: 192.168.122.2
 		ring0_addr: 192.168.122.2
 		ring1_addr: 192.168.123.1
 		ring1_addr: 192.168.123.1
 		nodeid: 2
 		nodeid: 2
+		name: cythara
 	}
 	}
 }\n"
 }\n"
 
 
@@ -155,9 +157,11 @@ test Corosync.lns get conf =
     { "node"
     { "node"
       { "ring0_addr" = "192.168.122.1" }
       { "ring0_addr" = "192.168.122.1" }
       { "nodeid" = "1" }
       { "nodeid" = "1" }
+      { "name" = "balalaika" }
       { "quorum_votes" = "2" } }
       { "quorum_votes" = "2" } }
     { }
     { }
     { "node"
     { "node"
       { "ring0_addr" = "192.168.122.2" }
       { "ring0_addr" = "192.168.122.2" }
       { "ring1_addr" = "192.168.123.1" }
       { "ring1_addr" = "192.168.123.1" }
-      { "nodeid" = "2" } } }
+      { "nodeid" = "2" }
+      { "name" = "cythara" } } }

+ 12 - 1
man/corosync.conf.5

@@ -639,7 +639,8 @@ Every node that should be a member of the membership must be specified.
 Possible options are:
 Possible options are:
 .TP
 .TP
 ringX_addr
 ringX_addr
-This specifies IP address of one of the nodes. X is link number. 
+This specifies IP or network hostname address of the particular node.
+X is a link number.
 
 
 .TP
 .TP
 nodeid
 nodeid
@@ -648,6 +649,16 @@ It is a 32 bit value specifying the node identifier delivered to the
 cluster membership service. The node identifier value of zero is
 cluster membership service. The node identifier value of zero is
 reserved and should not be used. If knet is set, this field must be set.
 reserved and should not be used. If knet is set, this field must be set.
 
 
+.TP
+name
+This optional configuration option provides a unified way for the
+client software (e.g. pacemaker) atop, respectively the end users,
+to guide establishing a nominal (self-)identification for each node
+in case neither respective
+.B ringX_addr
+specifies a network hostname nor other means are available/effective
+in this process.
+
 .PP
 .PP
 Within the
 Within the
 .B qb
 .B qb