Skip to contentSkip to conversation

config: make altname validation position indipendent

PATCH New Fabio M. Di Nitto 2 participants 2 messages Nov 28, 2011 – Feb 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: make altname validation position indipendent

From: "Fabio M. Di Nitto" <[email protected]>

Resolves: rhbz#740552

---
 config/tools/xml/cluster.rng.in.head |   55 +++++++++++++++++++---------------
 1 files changed, 31 insertions(+), 24 deletions(-)
config/tools/xml/cluster.rng.in.head +31 -24
index e6e4633..11d5052 100644
@@ -785,32 +785,11 @@ To validate your cluster.conf against this schema, run:
         dlm_controld(8)"/>
    </optional>
 
-   <optional>
-    <element name="altname" rha:description="Defines a second network
-        interface to use for corosync redundant ring mode. cman(5)">
-
-     <attribute name="name" rha:description="A second hostname or IP
-        address of the node. cman(5)"/>
-
-     <optional>
-      <attribute name="port" rha:description="The network port to use
-          on the second interface. cman(5)"/>
-     </optional>
-
-     <optional>
-      <attribute name="mcast" rha:description="The multicast address
-          to use on the second interface. cman(5)"/>
-     </optional>
-
-     <optional>
-      <attribute name="ttl" rha:description="The multicast TTL 
-          to use on the second interface. cman(5)"/>
-     </optional>
-    </element>
-   </optional>
-
    <interleave>
     <optional>
+     <ref name="ALTNAME"/>
+    </optional>
+    <optional>
      <ref name="FENCE"/>
     </optional>
     <optional>
@@ -1034,6 +1013,34 @@ To validate your cluster.conf against this schema, run:
 </element> <!-- cluster end -->
 </start>
 
+<!-- begin node altname definitions -->
+
+ <define name="ALTNAME">
+    <element name="altname" rha:description="Defines a second network
+        interface to use for corosync redundant ring mode. cman(5)">
+
+     <attribute name="name" rha:description="A second hostname or IP
+        address of the node. cman(5)"/>
+
+     <optional>
+      <attribute name="port" rha:description="The network port to use
+          on the second interface. cman(5)"/>
+     </optional>
+
+     <optional>
+      <attribute name="mcast" rha:description="The multicast address
+          to use on the second interface. cman(5)"/>
+     </optional>
+
+     <optional>
+      <attribute name="ttl" rha:description="The multicast TTL 
+          to use on the second interface. cman(5)"/>
+     </optional>
+    </element>
+ </define>
+
+<!-- end node altname definitions -->
+
 <!-- begin node fence definitions -->
 
  <define name="FENCE">
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 1/1 config: make altname validation position indipendent

Quoted 5 lines · Fabio M. Di Nitto

From: "Fabio M. Di Nitto"<[email protected]>

Resolves: rhbz#740552

You didn't strictly have to make an ALTNAME ref block if you didn't want to. The FENCE block is used in two places, IIRC (which is why it's passed by ref.

It certainly doesn't hurt things, though, so ACK

-- Lon

Quoted 79 lines
---
  config/tools/xml/cluster.rng.in.head |   55 +++++++++++++++++++---------------
  1 files changed, 31 insertions(+), 24 deletions(-)
config/tools/xml/cluster.rng.in.head +31 -24
index e6e4633..11d5052 100644
@@ -785,32 +785,11 @@ To validate your cluster.conf against this schema, run:
          dlm_controld(8)"/>
     </optional>
 
-<optional>
-<element name="altname" rha:description="Defines a second network
-        interface to use for corosync redundant ring mode. cman(5)">
-
-<attribute name="name" rha:description="A second hostname or IP
-        address of the node. cman(5)"/>
-
-<optional>
-<attribute name="port" rha:description="The network port to use
-          on the second interface. cman(5)"/>
-</optional>
-
-<optional>
-<attribute name="mcast" rha:description="The multicast address
-          to use on the second interface. cman(5)"/>
-</optional>
-
-<optional>
-<attribute name="ttl" rha:description="The multicast TTL
-          to use on the second interface. cman(5)"/>
-</optional>
-</element>
-</optional>
-
     <interleave>
      <optional>
+<ref name="ALTNAME"/>
+</optional>
+<optional>
       <ref name="FENCE"/>
      </optional>
      <optional>
@@ -1034,6 +1013,34 @@ To validate your cluster.conf against this schema, run:
  </element>  <!-- cluster end -->
  </start>
 
+<!-- begin node altname definitions -->
+
+<define name="ALTNAME">
+<element name="altname" rha:description="Defines a second network
+        interface to use for corosync redundant ring mode. cman(5)">
+
+<attribute name="name" rha:description="A second hostname or IP
+        address of the node. cman(5)"/>
+
+<optional>
+<attribute name="port" rha:description="The network port to use
+          on the second interface. cman(5)"/>
+</optional>
+
+<optional>
+<attribute name="mcast" rha:description="The multicast address
+          to use on the second interface. cman(5)"/>
+</optional>
+
+<optional>
+<attribute name="ttl" rha:description="The multicast TTL
+          to use on the second interface. cman(5)"/>
+</optional>
+</element>
+</define>
+
+<!-- end node altname definitions -->
+
  <!-- begin node fence definitions -->
 
   <define name="FENCE">