rng: enforce unfence action to always be "on" convention
PATCH 1/1 rng: enforce unfence action to always be "on" convention
There a silent agreement on this probably "since beginning" already (cf. [1]). Enforce it to move a boundary of what it explicitly wrong a bit futher.
Counterpart changeset for fence-agents (relevant branch) will follow.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=865161#c17
--- config/tools/xml/cluster.rng.in.head | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-)
config/tools/xml/cluster.rng.in.head +28 -2
@@ -828,6 +828,10 @@ To validate your cluster.conf against this schema, run: <attribute name="agent" rha:description="The fence agent to be used. fenced(8)"/> + <optional> + <attribute name="action" rha:description="Fencing (Unfencing) Action"/> + </optional> + <ref name="FENCEDEVICEOPTIONS"/> </element>
@@ -1105,20 +1109,42 @@ To validate your cluster.conf against this schema, run: <element name="unfence" rha:description="Contains devices for unfencing the node. fence_node(8)"> <zeroOrMore> - <ref name="DEVICE"/> + <ref name="UNFENCEDEVICE"/> </zeroOrMore> </element> </define> <define name="DEVICE"> <element name="device" rha:description="Defines the properties of a - device used for fencing or unfencing a node. fenced(8)"> + device used for fencing a node. fenced(8)"> + + <attribute name="name" rha:description="The name of a fencedevice + defined in the fencedevices section. fenced(8)"> + <data type="IDREF"/> + </attribute> + + <optional> + <attribute name="action" rha:description="Fencing Action"/> + </optional> + + <ref name="FENCEDEVICEOPTIONS"/> + + </element> + </define> + + <define name="UNFENCEDEVICE"> + <element name="device" rha:description="Defines the properties of a + device used for unfencing a node. fenced(8)"> <attribute name="name" rha:description="The name of a fencedevice defined in the fencedevices section. fenced(8)"> <data type="IDREF"/> </attribute> + <attribute name="action" rha:description="Unfencing Action"> + <value>on</value> + </attribute> + <ref name="FENCEDEVICEOPTIONS"/> </element>
Signature · 1 line
1.8.1.4
PATCH 1/1 rng: enforce unfence action to always be "on" convention (FA part)
There is a silent agreement on this probably "since beginning" already (cf. [1]). Enforce it to move a boundary of what is explicitly wrong a bit further.
Counterpart change for [2].
[1] https://bugzilla.redhat.com/show_bug.cgi?id=865161#c17
[2] http://www.redhat.com/archives/cluster-devel/2013-November/msg00061.html
--- fence/agents/lib/fence2rng.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fence/agents/lib/fence2rng.xsl +1 -1
@@ -123,7 +123,7 @@ </xsl:call-template> <xsl:value-of select="$NL"/> - <xsl:for-each select="parameters/parameter"> + <xsl:for-each select="parameters/parameter[@name != 'action']"> <!-- optional (start) --> <xsl:call-template name="tag-start"> <xsl:with-param name="name" select="'optional'"/>
Signature · 1 line
1.8.1.4
PATCH v2 1/1 rng: enforce unfence action to always be "on" ("enable") convention
In reply to Jan PokornýThere is a silent agreement on this probably "since beginning" already (cf. [1]). Enforce it to move a boundary of what it explicitly wrong a bit futher. As per Marek, "enable" should be nominally supported as well.
Counterpart changeset for fence-agents (relevant branch) is also proposed [2].
[1] https://bugzilla.redhat.com/show_bug.cgi?id=865161#c17
[2] https://www.redhat.com/archives/cluster-devel/2013-November/msg00062.html
--- config/tools/xml/cluster.rng.in.head | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
config/tools/xml/cluster.rng.in.head +31 -2
@@ -828,6 +828,10 @@ To validate your cluster.conf against this schema, run: <attribute name="agent" rha:description="The fence agent to be used. fenced(8)"/> + <optional> + <attribute name="action" rha:description="Fencing (Unfencing) Action"/> + </optional> + <ref name="FENCEDEVICEOPTIONS"/> </element>
@@ -1105,20 +1109,45 @@ To validate your cluster.conf against this schema, run: <element name="unfence" rha:description="Contains devices for unfencing the node. fence_node(8)"> <zeroOrMore> - <ref name="DEVICE"/> + <ref name="UNFENCEDEVICE"/> </zeroOrMore> </element> </define> <define name="DEVICE"> <element name="device" rha:description="Defines the properties of a - device used for fencing or unfencing a node. fenced(8)"> + device used for fencing a node. fenced(8)"> + + <attribute name="name" rha:description="The name of a fencedevice + defined in the fencedevices section. fenced(8)"> + <data type="IDREF"/> + </attribute> + + <optional> + <attribute name="action" rha:description="Fencing Action"/> + </optional> + + <ref name="FENCEDEVICEOPTIONS"/> + + </element> + </define> + + <define name="UNFENCEDEVICE"> + <element name="device" rha:description="Defines the properties of a + device used for unfencing a node. fenced(8)"> <attribute name="name" rha:description="The name of a fencedevice defined in the fencedevices section. fenced(8)"> <data type="IDREF"/> </attribute> + <attribute name="action" rha:description="Unfencing Action"> + <choice> + <value>enable</value> + <value>on</value> + </choice> + </attribute> + <ref name="FENCEDEVICEOPTIONS"/> </element>
Signature · 1 line
1.8.1.4