schema validation hardening continued: failover domains
cover schema validation hardening continued: failover domains
Follow up of previous effort:
http://www.redhat.com/archives/cluster-devel/2013-December/msg00135.html
http://www.redhat.com/archives/cluster-devel/2013-December/msg00052.html
http://www.redhat.com/archives/cluster-devel/2013-December/msg00037.html
..
Will also push to the topic branches (STABLE32/RHEL6x;
http://www.redhat.com/archives/cluster-devel/2013-December/msg00136.html).
Jan Pokorn? (2):
rng: more strict validation of failoverdomains wrt. priority attr.
rng: FO validation: no use of nofailback in unordered domain
config/tools/xml/cluster.rng.in.head | 85 ++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 19 deletions(-)
Signature · 1 line
1.8.5.3
PATCH 1/2 rng: more strict validation of failoverdomains wrt. priority attr.
unordered FO: optional priority 0 (no other value makes sense) ordered FO: optional priority [0, 100] (ditto)
--- config/tools/xml/cluster.rng.in.head | 80 +++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 19 deletions(-)
config/tools/xml/cluster.rng.in.head +61 -19
@@ -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@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 @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>
Signature · 1 line
1.8.5.3
PATCH 2/2 rng: FO validation: no use of nofailback in unordered domain
In reply to Jan Pokornýand datatype also the "ordered" counterpart of the schema
--- config/tools/xml/cluster.rng.in.head | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
config/tools/xml/cluster.rng.in.head +12 -7
@@ -910,10 +910,8 @@ To validate your cluster.conf against this schema, run: </optional> <choice> <group> - <!-- unordered group (no or zero priority@failoverdomainnode) --> - <optional> - <attribute name="nofailback" rha:description="Do not move service to a more preferred node if it is currently running." rha:sample=""/> - </optional> + <!-- unordered group (no or zero priority@failoverdomainnode + and no or zero nofailback) --> <optional> <attribute name="ordered" rha:description="Set value to 1 if the failover domain is ordered; set value to 0 if
@@ -921,6 +919,11 @@ To validate your cluster.conf against this schema, run: <value type="int">0</value> </attribute> </optional> + <optional> + <attribute name="nofailback" rha:description="Do not move service to a more preferred node if it is currently running." rha:sample=""> + <value type="int">0</value> + </attribute> + </optional> <zeroOrMore> <element name="failoverdomainnode" rha:description="A node in a failover domain">
@@ -939,9 +942,6 @@ To validate your cluster.conf against this schema, run: </group> <group> <!-- ordered group (no or 0 <= priority <= 100 @failoverdomainnode allowed) --> - <optional> - <attribute name="nofailback" rha:description="Do not move service to a more preferred node if it is currently running." rha:sample=""/> - </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">
@@ -951,6 +951,11 @@ To validate your cluster.conf against this schema, run: </except> </data> </attribute> + <optional> + <attribute name="nofailback" rha:description="Do not move service to a more preferred node if it is currently running." rha:sample=""> + <data type="int"/> + </attribute> + </optional> <zeroOrMore> <element name="failoverdomainnode" rha:description="A node in a failover domain">
Signature · 1 line
1.8.5.3
cover schema validation hardening continued: failover domains
In reply to Jan PokornýQuoted 9 lines · Jan Pokorn?
Follow up of previous effort:
http://www.redhat.com/archives/cluster-devel/2013-December/msg00135.html
http://www.redhat.com/archives/cluster-devel/2013-December/msg00052.html
http://www.redhat.com/archives/cluster-devel/2013-December/msg00037.html
..Will also push to the topic branches (STABLE32/RHEL6x;
http://www.redhat.com/archives/cluster-devel/2013-December/msg00136.html).
Only push to STABLE32 first. Once we have test results and agree to have then in RHEL6, we can push there.
Fabio
Quoted 8 lines
Jan Pokorn? (2):
rng: more strict validation of failoverdomains wrt. priority attr.
rng: FO validation: no use of nofailback in unordered domainconfig/tools/xml/cluster.rng.in.head | 85 ++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 19 deletions(-)