[Cluster-devel] [PATCH 1/2] rng: more strict validation of failoverdomains wrt. priority attr.
Jan Pokorný
jpokorny at redhat.com
Sat Mar 15 00:01:21 UTC 2014
unordered FO: optional priority 0 (no other value makes sense)
ordered FO: optional priority [0, 100] (ditto)
Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
---
config/tools/xml/cluster.rng.in.head | 80 +++++++++++++++++++++++++++---------
1 file changed, 61 insertions(+), 19 deletions(-)
diff --git a/config/tools/xml/cluster.rng.in.head b/config/tools/xml/cluster.rng.in.head
index 86f384f..919ff5e 100644
--- a/config/tools/xml/cluster.rng.in.head
+++ b/config/tools/xml/cluster.rng.in.head
@@ -904,31 +904,73 @@ To validate your cluster.conf against this schema, run:
<attribute name="name" rha:description="The name of the failover
domain." rha:sample="foo"/>
<optional>
- <attribute name="ordered" rha:description="Set value to 1 if
- the failover domain is ordered; set value to 0 if
- unordered." rha:default="0" rha:sample="1"/>
- </optional>
- <optional>
<attribute name="restricted" rha:description="Set value to 1 if
the failover domain is restricted; set value to 0 if
unrestricted." rha:default="0" rha:sample="1"/>
</optional>
- <optional>
- <attribute name="nofailback" rha:description="Do not move service to a more preferred node if it is currently running." rha:sample=""/>
- </optional>
- <zeroOrMore>
- <element name="failoverdomainnode" rha:description="A node in
- a failover domain">
+ <choice>
+ <group>
+ <!-- unordered group (no or zero priority at failoverdomainnode) -->
+ <optional>
+ <attribute name="nofailback" rha:description="Do not move service to a more preferred node if it is currently running." rha:sample=""/>
+ </optional>
+ <optional>
+ <attribute name="ordered" rha:description="Set value to 1 if
+ the failover domain is ordered; set value to 0 if
+ unordered." rha:default="0" rha:sample="1">
+ <value type="int">0</value>
+ </attribute>
+ </optional>
+ <zeroOrMore>
+ <element name="failoverdomainnode" rha:description="A node in
+ a failover domain">
+ <optional>
+ <attribute name="priority" rha:description="A number
+ specifying the priority; lower numbers having higher
+ priority"
+ rha:sample="1">
+ <value type="int">0</value>
+ </attribute>
+ </optional>
+ <attribute name="name" rha:description="Name of the node."
+ rha:sample="member2"/>
+ </element>
+ </zeroOrMore>
+ </group>
+ <group>
+ <!-- ordered group (no or 0 <= priority <= 100 at failoverdomainnode allowed) -->
<optional>
- <attribute name="priority" rha:description="A number
- specifying the priority; lower numbers having higher
- priority"
- rha:sample="1"/>
+ <attribute name="nofailback" rha:description="Do not move service to a more preferred node if it is currently running." rha:sample=""/>
</optional>
- <attribute name="name" rha:description="Name of the node."
- rha:sample="member2"/>
- </element>
- </zeroOrMore>
+ <attribute name="ordered" rha:description="Set value to 1 if
+ the failover domain is ordered; set value to 0 if
+ unordered." rha:default="0" rha:sample="1">
+ <data type="int">
+ <except>
+ <value type="int">0</value>
+ </except>
+ </data>
+ </attribute>
+ <zeroOrMore>
+ <element name="failoverdomainnode" rha:description="A node in
+ a failover domain">
+ <optional>
+ <attribute name="priority" rha:description="A number
+ specifying the priority; lower numbers having higher
+ priority"
+ rha:sample="1">
+ <data type="int">
+ <param name="minInclusive">0</param>
+ <param name="maxInclusive">100</param>
+ </data>
+ </attribute>
+ </optional>
+ <attribute name="name" rha:description="Name of the node."
+ rha:sample="member2"/>
+ </element>
+ </zeroOrMore>
+ </group>
+ </choice>
</element>
</zeroOrMore>
</element>
--
1.8.5.3
More information about the Cluster-devel
mailing list