Jelajahi Sumber

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.

Patch is backport of 4708d1dc29468d2c702929101c24f1768db459d9 and
61c2117195bc36a6a5fe4c22be0390a39804025d.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse 8 tahun lalu
induk
melakukan
c9f7b5a5ff
3 mengubah file dengan 16 tambahan dan 1 penghapusan
  1. 1 0
      conf/lenses/corosync.aug
  2. 5 1
      conf/lenses/tests/test_corosync.aug
  3. 10 0
      man/corosync.conf.5

+ 1 - 0
conf/lenses/corosync.aug

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

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

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

+ 10 - 0
man/corosync.conf.5

@@ -670,6 +670,16 @@ will be determined from the 32 bit IP address the system to which the system
 is bound with ring identifier of 0.  The node identifier value of zero is
 reserved and should not be used.
 
+.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. Option is not used by Corosync itself.
+
 .PP
 Within the
 .B qb