Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F4512084
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
200 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/cts/schemas/test-3/ref.err/acl-drop.ref.err-99 b/cts/schemas/test-3/ref.err/acl-drop.ref.err-99
index e69de29bb2..c95d1d0c67 100644
--- a/cts/schemas/test-3/ref.err/acl-drop.ref.err-99
+++ b/cts/schemas/test-3/ref.err/acl-drop.ref.err-99
@@ -0,0 +1 @@
+WARNING: CIB syntax changes may invalidate ACLs that use "xpath". It is strongly recommended to run "cibadmin --upgrade" and then examine the updated CIB carefully to ensure ACLs still match the desired intent.
diff --git a/cts/schemas/test-3/ref/acl-drop.ref-1 b/cts/schemas/test-3/ref/acl-drop.ref-1
index 26431a2011..dae7057ccf 100644
--- a/cts/schemas/test-3/ref/acl-drop.ref-1
+++ b/cts/schemas/test-3/ref/acl-drop.ref-1
@@ -1,61 +1,63 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a remove-after-stop property that will be dropped.
* There is a location constraint that will be replaced by two new
location constraints, such that the original constraint ID no longer
exists.
* There is a nagios resource that will be dropped, and it contains a
meta_attributes block.
* There is an OCF resource that will be kept.
* There are ACL permissions that refer directly to the
remove-after-stop element and original location constraint mentioned
listed above.
* There is an ACL permissions that refers directly to the
meta_attributes block nested within the nagios resource.
* There is an ACL permission that refers directly to the OCF resource.
* There is an ACL permission that refers directly to the ACL permission
for the remove-after-stop property.
In this situation:
* The ACL permissions that refer to the dropped remove-after-stop
element and the meta_attributes block within the dropped nagios
resource should have their reference attributes replaced with
"xpath='/*[false()]'", which doesn't match anything.
* The ACL permission that refers to the location constraint should have
its reference attribute replaced with an xpath attribute that matches
the IDs of the replacement constraints.
* The other ACL permissions should remain unchanged.
-->
<crm_config original="1">
- <cluster_property_set id="cib-bootstrap-options" original="1"/>
+ <cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
+ </cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive id="rsc1" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
<primitive id="rsc2" class="nagios" type="fake" original="1">
<meta_attributes id="rsc2-meta_attributes" original="1"/>
</primitive>
</resources>
<constraints original="1">
<rsc_location id="rsc1-loc" rsc="rsc1" original="1">
<rule id="rsc1-loc-rule-1" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-1-expr" operation="gt" start="2021-01-01" original="1"/>
</rule>
<rule id="rsc1-loc-rule-2" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-2-expr" operation="gt" start="2022-01-01" original="1"/>
</rule>
</rsc_location>
</constraints>
<acls original="1">
<acl_role id="role1" original="1">
<acl_permission id="role1-deny-property-drop" kind="deny" reference="cib-bootstrap-options-remove-after-stop" original="1"/>
<acl_permission id="role1-deny-rsc1-loc-drop" kind="deny" reference="rsc1-loc" original="1"/>
<acl_permission id="role1-deny-rsc2-meta_attributes-drop" kind="deny" reference="rsc2-meta_attributes" original="1"/>
<acl_permission id="role1-deny-rsc1-keep" kind="deny" reference="rsc1" original="1"/>
<acl_permission id="role1-deny-role1-deny-property-drop-keep" kind="deny" reference="role1-deny-property-drop" original="1"/>
</acl_role>
</acls>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/acl-drop.ref-2 b/cts/schemas/test-3/ref/acl-drop.ref-2
index d76cc57df6..24a060fb17 100644
--- a/cts/schemas/test-3/ref/acl-drop.ref-2
+++ b/cts/schemas/test-3/ref/acl-drop.ref-2
@@ -1,63 +1,65 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a remove-after-stop property that will be dropped.
* There is a location constraint that will be replaced by two new
location constraints, such that the original constraint ID no longer
exists.
* There is a nagios resource that will be dropped, and it contains a
meta_attributes block.
* There is an OCF resource that will be kept.
* There are ACL permissions that refer directly to the
remove-after-stop element and original location constraint mentioned
listed above.
* There is an ACL permissions that refers directly to the
meta_attributes block nested within the nagios resource.
* There is an ACL permission that refers directly to the OCF resource.
* There is an ACL permission that refers directly to the ACL permission
for the remove-after-stop property.
In this situation:
* The ACL permissions that refer to the dropped remove-after-stop
element and the meta_attributes block within the dropped nagios
resource should have their reference attributes replaced with
"xpath='/*[false()]'", which doesn't match anything.
* The ACL permission that refers to the location constraint should have
its reference attribute replaced with an xpath attribute that matches
the IDs of the replacement constraints.
* The other ACL permissions should remain unchanged.
-->
<crm_config original="1">
- <cluster_property_set id="cib-bootstrap-options" original="1"/>
+ <cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
+ </cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive id="rsc1" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
<primitive id="rsc2" class="nagios" type="fake" original="1">
<meta_attributes id="rsc2-meta_attributes" original="1"/>
</primitive>
</resources>
<constraints original="1">
<rsc_location id="pcmk__3_10_upgrade-rsc1-loc-1" rsc="rsc1" original="0">
<rule id="rsc1-loc-rule-1" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-1-expr" operation="gt" start="2021-01-01" original="1"/>
</rule>
</rsc_location>
<rsc_location id="pcmk__3_10_upgrade-rsc1-loc-2" rsc="rsc1" original="0">
<rule id="rsc1-loc-rule-2" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-2-expr" operation="gt" start="2022-01-01" original="1"/>
</rule>
</rsc_location>
</constraints>
<acls original="1">
<acl_role id="role1" original="1">
<acl_permission id="role1-deny-property-drop" kind="deny" reference="cib-bootstrap-options-remove-after-stop" original="1"/>
- <acl_permission id="role1-deny-rsc1-loc-drop" kind="deny" xpath="//*[@id = 'pcmk__3_10_upgrade-rsc1-loc-1' or @id = 'pcmk__3_10_upgrade-rsc1-loc-2']" original="1"/>
+ <acl_permission id="role1-deny-rsc1-loc-drop" kind="deny" xpath="//*[@id = 'pcmk__3_10_upgrade-rsc1-loc-1' or @id = 'pcmk__3_10_upgrade-rsc1-loc-2']" changed="1" original="1"/>
<acl_permission id="role1-deny-rsc2-meta_attributes-drop" kind="deny" reference="rsc2-meta_attributes" original="1"/>
<acl_permission id="role1-deny-rsc1-keep" kind="deny" reference="rsc1" original="1"/>
<acl_permission id="role1-deny-role1-deny-property-drop-keep" kind="deny" reference="role1-deny-property-drop" original="1"/>
</acl_role>
</acls>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/acl-drop.ref-3 b/cts/schemas/test-3/ref/acl-drop.ref-3
index d76cc57df6..24a060fb17 100644
--- a/cts/schemas/test-3/ref/acl-drop.ref-3
+++ b/cts/schemas/test-3/ref/acl-drop.ref-3
@@ -1,63 +1,65 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a remove-after-stop property that will be dropped.
* There is a location constraint that will be replaced by two new
location constraints, such that the original constraint ID no longer
exists.
* There is a nagios resource that will be dropped, and it contains a
meta_attributes block.
* There is an OCF resource that will be kept.
* There are ACL permissions that refer directly to the
remove-after-stop element and original location constraint mentioned
listed above.
* There is an ACL permissions that refers directly to the
meta_attributes block nested within the nagios resource.
* There is an ACL permission that refers directly to the OCF resource.
* There is an ACL permission that refers directly to the ACL permission
for the remove-after-stop property.
In this situation:
* The ACL permissions that refer to the dropped remove-after-stop
element and the meta_attributes block within the dropped nagios
resource should have their reference attributes replaced with
"xpath='/*[false()]'", which doesn't match anything.
* The ACL permission that refers to the location constraint should have
its reference attribute replaced with an xpath attribute that matches
the IDs of the replacement constraints.
* The other ACL permissions should remain unchanged.
-->
<crm_config original="1">
- <cluster_property_set id="cib-bootstrap-options" original="1"/>
+ <cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
+ </cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive id="rsc1" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
<primitive id="rsc2" class="nagios" type="fake" original="1">
<meta_attributes id="rsc2-meta_attributes" original="1"/>
</primitive>
</resources>
<constraints original="1">
<rsc_location id="pcmk__3_10_upgrade-rsc1-loc-1" rsc="rsc1" original="0">
<rule id="rsc1-loc-rule-1" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-1-expr" operation="gt" start="2021-01-01" original="1"/>
</rule>
</rsc_location>
<rsc_location id="pcmk__3_10_upgrade-rsc1-loc-2" rsc="rsc1" original="0">
<rule id="rsc1-loc-rule-2" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-2-expr" operation="gt" start="2022-01-01" original="1"/>
</rule>
</rsc_location>
</constraints>
<acls original="1">
<acl_role id="role1" original="1">
<acl_permission id="role1-deny-property-drop" kind="deny" reference="cib-bootstrap-options-remove-after-stop" original="1"/>
- <acl_permission id="role1-deny-rsc1-loc-drop" kind="deny" xpath="//*[@id = 'pcmk__3_10_upgrade-rsc1-loc-1' or @id = 'pcmk__3_10_upgrade-rsc1-loc-2']" original="1"/>
+ <acl_permission id="role1-deny-rsc1-loc-drop" kind="deny" xpath="//*[@id = 'pcmk__3_10_upgrade-rsc1-loc-1' or @id = 'pcmk__3_10_upgrade-rsc1-loc-2']" changed="1" original="1"/>
<acl_permission id="role1-deny-rsc2-meta_attributes-drop" kind="deny" reference="rsc2-meta_attributes" original="1"/>
<acl_permission id="role1-deny-rsc1-keep" kind="deny" reference="rsc1" original="1"/>
<acl_permission id="role1-deny-role1-deny-property-drop-keep" kind="deny" reference="role1-deny-property-drop" original="1"/>
</acl_role>
</acls>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/acl-drop.ref-4 b/cts/schemas/test-3/ref/acl-drop.ref-4
index d6993cbafe..f7fc50a5db 100644
--- a/cts/schemas/test-3/ref/acl-drop.ref-4
+++ b/cts/schemas/test-3/ref/acl-drop.ref-4
@@ -1,60 +1,63 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a remove-after-stop property that will be dropped.
* There is a location constraint that will be replaced by two new
location constraints, such that the original constraint ID no longer
exists.
* There is a nagios resource that will be dropped, and it contains a
meta_attributes block.
* There is an OCF resource that will be kept.
* There are ACL permissions that refer directly to the
remove-after-stop element and original location constraint mentioned
listed above.
* There is an ACL permissions that refers directly to the
meta_attributes block nested within the nagios resource.
* There is an ACL permission that refers directly to the OCF resource.
* There is an ACL permission that refers directly to the ACL permission
for the remove-after-stop property.
In this situation:
* The ACL permissions that refer to the dropped remove-after-stop
element and the meta_attributes block within the dropped nagios
resource should have their reference attributes replaced with
"xpath='/*[false()]'", which doesn't match anything.
* The ACL permission that refers to the location constraint should have
its reference attribute replaced with an xpath attribute that matches
the IDs of the replacement constraints.
* The other ACL permissions should remain unchanged.
-->
<crm_config original="1">
- <cluster_property_set id="cib-bootstrap-options" original="1"/>
+ <cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
+ </cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive id="rsc1" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
</resources>
<constraints original="1">
<rsc_location id="pcmk__3_10_upgrade-rsc1-loc-1" rsc="rsc1" original="0">
<rule id="rsc1-loc-rule-1" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-1-expr" operation="gt" start="2021-01-01" original="1"/>
</rule>
</rsc_location>
<rsc_location id="pcmk__3_10_upgrade-rsc1-loc-2" rsc="rsc1" original="0">
<rule id="rsc1-loc-rule-2" score="INFINITY" original="1">
<date_expression id="rsc1-loc-rule-2-expr" operation="gt" start="2022-01-01" original="1"/>
</rule>
</rsc_location>
</constraints>
<acls original="1">
<acl_role id="role1" original="1">
<acl_permission id="role1-deny-property-drop" kind="deny" reference="cib-bootstrap-options-remove-after-stop" original="1"/>
- <acl_permission id="role1-deny-rsc1-loc-drop" kind="deny" xpath="//*[@id = 'pcmk__3_10_upgrade-rsc1-loc-1' or @id = 'pcmk__3_10_upgrade-rsc1-loc-2']" original="1"/>
+ <acl_permission id="role1-deny-rsc1-loc-drop" kind="deny" xpath="//*[@id = 'pcmk__3_10_upgrade-rsc1-loc-1' or @id = 'pcmk__3_10_upgrade-rsc1-loc-2']" changed="1" original="1"/>
<acl_permission id="role1-deny-rsc2-meta_attributes-drop" kind="deny" reference="rsc2-meta_attributes" original="1"/>
<acl_permission id="role1-deny-rsc1-keep" kind="deny" reference="rsc1" original="1"/>
<acl_permission id="role1-deny-role1-deny-property-drop-keep" kind="deny" reference="role1-deny-property-drop" original="1"/>
</acl_role>
</acls>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-2 b/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-2
index 0b92bb5e1c..d780281f79 100644
--- a/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-2
+++ b/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-2
@@ -1,26 +1,26 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are three bundle resource with masters attributes (one with
each type of container).
In this situation, the masters attribute should be replaced with a
promoted-max attribute with the same value.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
<bundle id="bundle1" original="1">
- <docker image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <docker image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
<bundle id="bundle2" original="1">
- <podman image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <podman image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
<bundle id="bundle3" original="1">
- <rkt image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <rkt image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-3 b/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-3
index 0b92bb5e1c..d780281f79 100644
--- a/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-3
+++ b/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-3
@@ -1,26 +1,26 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are three bundle resource with masters attributes (one with
each type of container).
In this situation, the masters attribute should be replaced with a
promoted-max attribute with the same value.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
<bundle id="bundle1" original="1">
- <docker image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <docker image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
<bundle id="bundle2" original="1">
- <podman image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <podman image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
<bundle id="bundle3" original="1">
- <rkt image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <rkt image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-4 b/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-4
index 4bceee3db1..1843d51a4b 100644
--- a/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-4
+++ b/cts/schemas/test-3/ref/bundle-promoted-max-legacy.ref-4
@@ -1,23 +1,24 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are three bundle resource with masters attributes (one with
each type of container).
In this situation, the masters attribute should be replaced with a
promoted-max attribute with the same value.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
<bundle id="bundle1" original="1">
- <docker image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <docker image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
<bundle id="bundle2" original="1">
- <podman image="alpine:latest" promoted-max="2" run-command="sleep 60" original="1"/>
+ <podman image="alpine:latest" promoted-max="2" changed="1" run-command="sleep 60" original="1"/>
</bundle>
+ <dropped/>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/can-fail.ref-4 b/cts/schemas/test-3/ref/can-fail.ref-4
index 8bcb6b6fd0..f2309a31d8 100644
--- a/cts/schemas/test-3/ref/can-fail.ref-4
+++ b/cts/schemas/test-3/ref/can-fail.ref-4
@@ -1,112 +1,119 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are the following resources:
* A template
* A primitive outside of any collective resource
* A group containing a single member
* A cloned primitive
* A cloned group containing a single member
* A bundle containing a primitive
* There is an op_defaults element.
* Each primitive has an op element.
* Each op and the op_defaults element have a meta_attributes element
containing an nvpair with name="can_fail" and another with
name="other".
* There are other nvsets containing nvpairs with name="can_fail".
In this situation, all can_fail meta-attributes within op and
op_defaults elements should be dropped. Other meta-attributes should be
unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-can_fail" name="can_fail" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<template class="ocf" id="template1" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="template1_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="template1_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="template_monitor_20000-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op>
</operations>
</template>
<primitive class="ocf" id="rsc1" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc1_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc1_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1_monitor_20000-meta_attributes-other" name="other" value="false" original="1"/>
</meta_attributes>
</op>
</operations>
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-can_fail" name="can_fail" value="true" original="1"/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-can_fail" name="can_fail" value="true" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
<nvpair id="rsc1-utilization-can_fail" name="can_fail" value="true" original="1"/>
</utilization>
</primitive>
<group id="grp1" original="1">
<primitive class="ocf" id="rsc2" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc2_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc2_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc2_monitor_20000-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</group>
<clone id="clone1" original="1">
<primitive class="ocf" id="rsc3" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc3_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc3_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc3_monitor_20000-meta_attributes-other" name="other" value="false" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</clone>
<clone id="clone2" original="1">
<group id="grp2" original="1">
<primitive class="ocf" id="rsc4" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc4_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc4_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc4_monitor_20000-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</group>
</clone>
<bundle id="bundle1" original="1">
<podman image="localhost/pcmktest:http" replicas="3" original="1"/>
<primitive class="ocf" id="rsc5" provider="heartbeat" type="apache" original="1">
<operations original="1">
<op id="rsc5_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc5_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc5_monitor_20000-meta_attributes-other" name="other" value="false" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</bundle>
</resources>
<constraints original="1"/>
<op_defaults original="1">
<meta_attributes id="op_defaults-meta_attributes" original="1">
+ <dropped/>
<nvpair id="op_defaults-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op_defaults>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-1 b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-1
index 6c61030035..a4b9135dc1 100644
--- a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-1
+++ b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-1
@@ -1,21 +1,21 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-finalization-timeout cluster property is set to any value.
In this situation, the crmd-finalization-timeout cluster property
should be renamed to join-finalization-timeout. The value should be
unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-2 b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-2
index 6c61030035..a4b9135dc1 100644
--- a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-2
+++ b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-2
@@ -1,21 +1,21 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-finalization-timeout cluster property is set to any value.
In this situation, the crmd-finalization-timeout cluster property
should be renamed to join-finalization-timeout. The value should be
unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-3 b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-3
index 6c61030035..a4b9135dc1 100644
--- a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-3
+++ b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-3
@@ -1,21 +1,21 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-finalization-timeout cluster property is set to any value.
In this situation, the crmd-finalization-timeout cluster property
should be renamed to join-finalization-timeout. The value should be
unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-4 b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-4
index 6c61030035..a4b9135dc1 100644
--- a/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-4
+++ b/cts/schemas/test-3/ref/crmd-finalization-timeout.ref-4
@@ -1,21 +1,21 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-finalization-timeout cluster property is set to any value.
In this situation, the crmd-finalization-timeout cluster property
should be renamed to join-finalization-timeout. The value should be
unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-finalization-timeout" name="join-finalization-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-1 b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-1
index 2a73a066c7..9485173a37 100644
--- a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-1
+++ b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-1
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-integration-timeout cluster property is set to any value.
In this situation, the crmd-integration-timeout cluster property should
be renamed to join-integration-timeout. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-2 b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-2
index 2a73a066c7..9485173a37 100644
--- a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-2
+++ b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-2
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-integration-timeout cluster property is set to any value.
In this situation, the crmd-integration-timeout cluster property should
be renamed to join-integration-timeout. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-3 b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-3
index 2a73a066c7..9485173a37 100644
--- a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-3
+++ b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-3
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-integration-timeout cluster property is set to any value.
In this situation, the crmd-integration-timeout cluster property should
be renamed to join-integration-timeout. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-4 b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-4
index 2a73a066c7..9485173a37 100644
--- a/cts/schemas/test-3/ref/crmd-integration-timeout.ref-4
+++ b/cts/schemas/test-3/ref/crmd-integration-timeout.ref-4
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-integration-timeout cluster property is set to any value.
In this situation, the crmd-integration-timeout cluster property should
be renamed to join-integration-timeout. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-integration-timeout" name="join-integration-timeout" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-transition-delay.ref-1 b/cts/schemas/test-3/ref/crmd-transition-delay.ref-1
index 68323eb023..6b719988e5 100644
--- a/cts/schemas/test-3/ref/crmd-transition-delay.ref-1
+++ b/cts/schemas/test-3/ref/crmd-transition-delay.ref-1
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-transition-delay cluster property is set to any value.
In this situation, the crmd-transition-delay cluster property should
be renamed to transition-delay. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-transition-delay.ref-2 b/cts/schemas/test-3/ref/crmd-transition-delay.ref-2
index 68323eb023..6b719988e5 100644
--- a/cts/schemas/test-3/ref/crmd-transition-delay.ref-2
+++ b/cts/schemas/test-3/ref/crmd-transition-delay.ref-2
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-transition-delay cluster property is set to any value.
In this situation, the crmd-transition-delay cluster property should
be renamed to transition-delay. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-transition-delay.ref-3 b/cts/schemas/test-3/ref/crmd-transition-delay.ref-3
index 68323eb023..6b719988e5 100644
--- a/cts/schemas/test-3/ref/crmd-transition-delay.ref-3
+++ b/cts/schemas/test-3/ref/crmd-transition-delay.ref-3
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-transition-delay cluster property is set to any value.
In this situation, the crmd-transition-delay cluster property should
be renamed to transition-delay. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/crmd-transition-delay.ref-4 b/cts/schemas/test-3/ref/crmd-transition-delay.ref-4
index 68323eb023..6b719988e5 100644
--- a/cts/schemas/test-3/ref/crmd-transition-delay.ref-4
+++ b/cts/schemas/test-3/ref/crmd-transition-delay.ref-4
@@ -1,20 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The crmd-transition-delay cluster property is set to any value.
In this situation, the crmd-transition-delay cluster property should
be renamed to transition-delay. The value should be unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
- <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" value="30" original="1"/>
+ <nvpair id="cib-bootstrap-options-crmd-transition-delay" name="transition-delay" changed="1" value="30" original="1"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-2 b/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-2
index 9f0abd6d13..0acdbf526e 100644
--- a/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-2
+++ b/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-2
@@ -1,41 +1,49 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one of each kind of several nvset element
(cluster_property_set, instance_attributes, meta_attributes,
utilization).
* Each nvset contains multiple nvpairs with the same name, as well as
one nvpair with a different name.
* There are no nvpairs with value="#default".
* One nvset uses id-refs.
In this situation, only the first nvpair with a given name in a given
nvset should be kept. Any subsequent ones should be dropped.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-option1" name="option" value="value1" original="1"/>
+ <dropped/>
+ <dropped/>
<nvpair id="cib-bootstrap-options-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="heartbeat" type="apache" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-option1" name="option" value="value1" original="1"/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-option1" name="option" value="value1" original="1"/>
<nvpair id="rsc1-meta_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
+ <dropped/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
<nvpair id="rsc1-utilization-other-option" name="other-option" value="valueX" original="1"/>
<nvpair id="rsc1-meta_attributes-option1" name="option" value="value1" original="0"/>
+ <dropped/>
+ <dropped/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-3 b/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-3
index 9f0abd6d13..0acdbf526e 100644
--- a/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-3
+++ b/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-3
@@ -1,41 +1,49 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one of each kind of several nvset element
(cluster_property_set, instance_attributes, meta_attributes,
utilization).
* Each nvset contains multiple nvpairs with the same name, as well as
one nvpair with a different name.
* There are no nvpairs with value="#default".
* One nvset uses id-refs.
In this situation, only the first nvpair with a given name in a given
nvset should be kept. Any subsequent ones should be dropped.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-option1" name="option" value="value1" original="1"/>
+ <dropped/>
+ <dropped/>
<nvpair id="cib-bootstrap-options-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="heartbeat" type="apache" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-option1" name="option" value="value1" original="1"/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-option1" name="option" value="value1" original="1"/>
<nvpair id="rsc1-meta_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
+ <dropped/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
<nvpair id="rsc1-utilization-other-option" name="other-option" value="valueX" original="1"/>
<nvpair id="rsc1-meta_attributes-option1" name="option" value="value1" original="0"/>
+ <dropped/>
+ <dropped/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-4 b/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-4
index 9f0abd6d13..0acdbf526e 100644
--- a/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-4
+++ b/cts/schemas/test-3/ref/duplicate-nvpairs-no-default.ref-4
@@ -1,41 +1,49 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one of each kind of several nvset element
(cluster_property_set, instance_attributes, meta_attributes,
utilization).
* Each nvset contains multiple nvpairs with the same name, as well as
one nvpair with a different name.
* There are no nvpairs with value="#default".
* One nvset uses id-refs.
In this situation, only the first nvpair with a given name in a given
nvset should be kept. Any subsequent ones should be dropped.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-option1" name="option" value="value1" original="1"/>
+ <dropped/>
+ <dropped/>
<nvpair id="cib-bootstrap-options-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="heartbeat" type="apache" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-option1" name="option" value="value1" original="1"/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-option1" name="option" value="value1" original="1"/>
<nvpair id="rsc1-meta_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
+ <dropped/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
<nvpair id="rsc1-utilization-other-option" name="other-option" value="valueX" original="1"/>
<nvpair id="rsc1-meta_attributes-option1" name="option" value="value1" original="0"/>
+ <dropped/>
+ <dropped/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-2 b/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-2
index b2e24f4e22..ff10b33753 100644
--- a/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-2
+++ b/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-2
@@ -1,51 +1,75 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one of each kind of several nvset element
(cluster_property_set, instance_attributes, meta_attributes,
utilization).
* Each nvset contains multiple nvpairs with the same name (two of which
have value "#default"), as well as one nvpair with a different name.
* Two nvsets use id-refs.
In this situation:
* If the last nvpair with a given name in a given nvset has value
"#default", keep only that one.
* Otherwise, keep only the first nvpair with a given name in a given
nvset after the last one with that name and value "#default".
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="1">
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties1-option3" name="option" value="value3" original="1"/>
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties1-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties2" original="1">
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties2-option4" name="option" value="value4" original="1"/>
+ <dropped/>
<nvpair id="cluster-properties2-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="heartbeat" type="apache" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-option4" name="option" value="value4" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-meta_attributes-option5" name="option" value="value5" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization1" original="1">
<nvpair id="rsc1-utilization1-other-option" name="other-option" value="valueX" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-utilization1-option5" name="option" value="#default" original="1"/>
</utilization>
<utilization id="rsc1-utilization2" original="1">
<nvpair id="rsc1-utilization1-other-option" name="other-option" value="valueX" original="0"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-utilization1-option5" name="option" value="#default" original="0"/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-3 b/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-3
index b2e24f4e22..ff10b33753 100644
--- a/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-3
+++ b/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-3
@@ -1,51 +1,75 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one of each kind of several nvset element
(cluster_property_set, instance_attributes, meta_attributes,
utilization).
* Each nvset contains multiple nvpairs with the same name (two of which
have value "#default"), as well as one nvpair with a different name.
* Two nvsets use id-refs.
In this situation:
* If the last nvpair with a given name in a given nvset has value
"#default", keep only that one.
* Otherwise, keep only the first nvpair with a given name in a given
nvset after the last one with that name and value "#default".
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="1">
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties1-option3" name="option" value="value3" original="1"/>
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties1-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties2" original="1">
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties2-option4" name="option" value="value4" original="1"/>
+ <dropped/>
<nvpair id="cluster-properties2-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="heartbeat" type="apache" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-option4" name="option" value="value4" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-meta_attributes-option5" name="option" value="value5" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization1" original="1">
<nvpair id="rsc1-utilization1-other-option" name="other-option" value="valueX" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-utilization1-option5" name="option" value="#default" original="1"/>
</utilization>
<utilization id="rsc1-utilization2" original="1">
<nvpair id="rsc1-utilization1-other-option" name="other-option" value="valueX" original="0"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-utilization1-option5" name="option" value="#default" original="0"/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-4 b/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-4
index b2e24f4e22..ff10b33753 100644
--- a/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-4
+++ b/cts/schemas/test-3/ref/duplicate-nvpairs-with-default.ref-4
@@ -1,51 +1,75 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one of each kind of several nvset element
(cluster_property_set, instance_attributes, meta_attributes,
utilization).
* Each nvset contains multiple nvpairs with the same name (two of which
have value "#default"), as well as one nvpair with a different name.
* Two nvsets use id-refs.
In this situation:
* If the last nvpair with a given name in a given nvset has value
"#default", keep only that one.
* Otherwise, keep only the first nvpair with a given name in a given
nvset after the last one with that name and value "#default".
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="1">
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties1-option3" name="option" value="value3" original="1"/>
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties1-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties2" original="1">
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="cluster-properties2-option4" name="option" value="value4" original="1"/>
+ <dropped/>
<nvpair id="cluster-properties2-other-option" name="other-option" value="value0" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="heartbeat" type="apache" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
<nvpair id="rsc1-instance_attributes-option4" name="option" value="value4" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-other-option" name="other-option" value="value0" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-meta_attributes-option5" name="option" value="value5" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization1" original="1">
<nvpair id="rsc1-utilization1-other-option" name="other-option" value="valueX" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-utilization1-option5" name="option" value="#default" original="1"/>
</utilization>
<utilization id="rsc1-utilization2" original="1">
<nvpair id="rsc1-utilization1-other-option" name="other-option" value="valueX" original="0"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<nvpair id="rsc1-utilization1-option5" name="option" value="#default" original="0"/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/fencing-level.ref-1 b/cts/schemas/test-3/ref/fencing-level.ref-1
index 0bb3e4572e..0be1a67eb7 100644
--- a/cts/schemas/test-3/ref/fencing-level.ref-1
+++ b/cts/schemas/test-3/ref/fencing-level.ref-1
@@ -1,29 +1,30 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are fencing levels with the following index values:
* 1
* 5
* 9
* 10
In this situation, the fencing level with index="10" should be dropped.
All others should remain.
A fencing level's index must be a positive integer between 1 and 9,
inclusive. Prior to schema version 4.0, the schema already required an
index value to be a positive integer, so there is no need to test or
transform values that are not positive integers.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
<fencing-topology original="1">
<fencing-level id="node1-level-1" target="node1" index="1" devices="dev-1" original="1"/>
<fencing-level id="node1-level-5" target="node1" index="5" devices="dev-5" original="1"/>
<fencing-level id="node1-level-9" target="node1" index="9" devices="dev-9" original="1"/>
+ <dropped/>
</fencing-topology>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/fencing-level.ref-2 b/cts/schemas/test-3/ref/fencing-level.ref-2
index 0bb3e4572e..0be1a67eb7 100644
--- a/cts/schemas/test-3/ref/fencing-level.ref-2
+++ b/cts/schemas/test-3/ref/fencing-level.ref-2
@@ -1,29 +1,30 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are fencing levels with the following index values:
* 1
* 5
* 9
* 10
In this situation, the fencing level with index="10" should be dropped.
All others should remain.
A fencing level's index must be a positive integer between 1 and 9,
inclusive. Prior to schema version 4.0, the schema already required an
index value to be a positive integer, so there is no need to test or
transform values that are not positive integers.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
<fencing-topology original="1">
<fencing-level id="node1-level-1" target="node1" index="1" devices="dev-1" original="1"/>
<fencing-level id="node1-level-5" target="node1" index="5" devices="dev-5" original="1"/>
<fencing-level id="node1-level-9" target="node1" index="9" devices="dev-9" original="1"/>
+ <dropped/>
</fencing-topology>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/fencing-level.ref-3 b/cts/schemas/test-3/ref/fencing-level.ref-3
index 0bb3e4572e..0be1a67eb7 100644
--- a/cts/schemas/test-3/ref/fencing-level.ref-3
+++ b/cts/schemas/test-3/ref/fencing-level.ref-3
@@ -1,29 +1,30 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are fencing levels with the following index values:
* 1
* 5
* 9
* 10
In this situation, the fencing level with index="10" should be dropped.
All others should remain.
A fencing level's index must be a positive integer between 1 and 9,
inclusive. Prior to schema version 4.0, the schema already required an
index value to be a positive integer, so there is no need to test or
transform values that are not positive integers.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
<fencing-topology original="1">
<fencing-level id="node1-level-1" target="node1" index="1" devices="dev-1" original="1"/>
<fencing-level id="node1-level-5" target="node1" index="5" devices="dev-5" original="1"/>
<fencing-level id="node1-level-9" target="node1" index="9" devices="dev-9" original="1"/>
+ <dropped/>
</fencing-topology>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/fencing-level.ref-4 b/cts/schemas/test-3/ref/fencing-level.ref-4
index 0bb3e4572e..0be1a67eb7 100644
--- a/cts/schemas/test-3/ref/fencing-level.ref-4
+++ b/cts/schemas/test-3/ref/fencing-level.ref-4
@@ -1,29 +1,30 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are fencing levels with the following index values:
* 1
* 5
* 9
* 10
In this situation, the fencing level with index="10" should be dropped.
All others should remain.
A fencing level's index must be a positive integer between 1 and 9,
inclusive. Prior to schema version 4.0, the schema already required an
index value to be a positive integer, so there is no need to test or
transform values that are not positive integers.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
<fencing-topology original="1">
<fencing-level id="node1-level-1" target="node1" index="1" devices="dev-1" original="1"/>
<fencing-level id="node1-level-5" target="node1" index="5" devices="dev-5" original="1"/>
<fencing-level id="node1-level-9" target="node1" index="9" devices="dev-9" original="1"/>
+ <dropped/>
</fencing-topology>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/id-ref.ref-2 b/cts/schemas/test-3/ref/id-ref.ref-2
index d33ffb253e..b64bbdc47a 100644
--- a/cts/schemas/test-3/ref/id-ref.ref-2
+++ b/cts/schemas/test-3/ref/id-ref.ref-2
@@ -1,71 +1,72 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="16" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a cluster_properties_set element with an id attribute (set
to cluster-properties1) and a set of nvpair children.
* There are two cluster_properties_set elements with an id-ref
attribute (set to cluster-properties1): one before and one after the
original.
* There is a primitive resource (rsc1) with a meta_attributes element
containing nvpair children.
* The first nvpair is a definition (has an id attribute).
* The second has an id-ref attribute with no name attribute.
* The third has id-ref="cluster-properties1-option1" and
name="option3". Setting both id-ref and name is an undocumented
feature that allows the same nvpair value to be used with multiple
names (see commit 3912538 and associated pull request).
In this situation:
* In the first step of the upgrade transformation pipeline:
* Each element with an id-ref attribute without a name attribute
should be replaced by a copy of the element whose id attribute is
set to the same value, but with the "original" attribute set to 1.
* Each element with an id-ref attribute and a name attribute should
be replaced by a copy of the element whose id attribute is set to
the original id-ref value, except that in the copy:
* The id attribute begins with $upgrade_prefix and ends with the
value of @name.
* The name attribute is overridden by the reference's @name value.
* In the final step:
* Resolved references that did not have name attributes should be
converted back to references.
* For resolved references that did have name attributes, such that
the id of the resolved element differs from the original id-ref
value:
* The first element with the new id value remains expanded as a
definition.
* Any subsequent elements with the new id value are converted to
references to the first one.
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="0">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="0"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="0"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties1" original="1">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="1"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="1"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties1" original="0">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="0"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="0"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive id="rsc1" class="ocf" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-option1" name="option1" value="valueX" original="1"/>
+ <dropped/>
<nvpair id="pcmk__3_10_upgrade-cluster-properties1-option1-option3" name="option3" value="value1" original="0"/>
</meta_attributes>
</primitive>
<primitive id="rsc2" class="ocf" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc2-meta_attributes" original="1">
<nvpair id="pcmk__3_10_upgrade-cluster-properties1-option1-option3" name="option3" value="value1" original="0"/>
</meta_attributes>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/id-ref.ref-3 b/cts/schemas/test-3/ref/id-ref.ref-3
index d33ffb253e..b64bbdc47a 100644
--- a/cts/schemas/test-3/ref/id-ref.ref-3
+++ b/cts/schemas/test-3/ref/id-ref.ref-3
@@ -1,71 +1,72 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="16" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a cluster_properties_set element with an id attribute (set
to cluster-properties1) and a set of nvpair children.
* There are two cluster_properties_set elements with an id-ref
attribute (set to cluster-properties1): one before and one after the
original.
* There is a primitive resource (rsc1) with a meta_attributes element
containing nvpair children.
* The first nvpair is a definition (has an id attribute).
* The second has an id-ref attribute with no name attribute.
* The third has id-ref="cluster-properties1-option1" and
name="option3". Setting both id-ref and name is an undocumented
feature that allows the same nvpair value to be used with multiple
names (see commit 3912538 and associated pull request).
In this situation:
* In the first step of the upgrade transformation pipeline:
* Each element with an id-ref attribute without a name attribute
should be replaced by a copy of the element whose id attribute is
set to the same value, but with the "original" attribute set to 1.
* Each element with an id-ref attribute and a name attribute should
be replaced by a copy of the element whose id attribute is set to
the original id-ref value, except that in the copy:
* The id attribute begins with $upgrade_prefix and ends with the
value of @name.
* The name attribute is overridden by the reference's @name value.
* In the final step:
* Resolved references that did not have name attributes should be
converted back to references.
* For resolved references that did have name attributes, such that
the id of the resolved element differs from the original id-ref
value:
* The first element with the new id value remains expanded as a
definition.
* Any subsequent elements with the new id value are converted to
references to the first one.
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="0">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="0"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="0"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties1" original="1">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="1"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="1"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties1" original="0">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="0"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="0"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive id="rsc1" class="ocf" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-option1" name="option1" value="valueX" original="1"/>
+ <dropped/>
<nvpair id="pcmk__3_10_upgrade-cluster-properties1-option1-option3" name="option3" value="value1" original="0"/>
</meta_attributes>
</primitive>
<primitive id="rsc2" class="ocf" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc2-meta_attributes" original="1">
<nvpair id="pcmk__3_10_upgrade-cluster-properties1-option1-option3" name="option3" value="value1" original="0"/>
</meta_attributes>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/id-ref.ref-4 b/cts/schemas/test-3/ref/id-ref.ref-4
index d33ffb253e..b64bbdc47a 100644
--- a/cts/schemas/test-3/ref/id-ref.ref-4
+++ b/cts/schemas/test-3/ref/id-ref.ref-4
@@ -1,71 +1,72 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="16" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a cluster_properties_set element with an id attribute (set
to cluster-properties1) and a set of nvpair children.
* There are two cluster_properties_set elements with an id-ref
attribute (set to cluster-properties1): one before and one after the
original.
* There is a primitive resource (rsc1) with a meta_attributes element
containing nvpair children.
* The first nvpair is a definition (has an id attribute).
* The second has an id-ref attribute with no name attribute.
* The third has id-ref="cluster-properties1-option1" and
name="option3". Setting both id-ref and name is an undocumented
feature that allows the same nvpair value to be used with multiple
names (see commit 3912538 and associated pull request).
In this situation:
* In the first step of the upgrade transformation pipeline:
* Each element with an id-ref attribute without a name attribute
should be replaced by a copy of the element whose id attribute is
set to the same value, but with the "original" attribute set to 1.
* Each element with an id-ref attribute and a name attribute should
be replaced by a copy of the element whose id attribute is set to
the original id-ref value, except that in the copy:
* The id attribute begins with $upgrade_prefix and ends with the
value of @name.
* The name attribute is overridden by the reference's @name value.
* In the final step:
* Resolved references that did not have name attributes should be
converted back to references.
* For resolved references that did have name attributes, such that
the id of the resolved element differs from the original id-ref
value:
* The first element with the new id value remains expanded as a
definition.
* Any subsequent elements with the new id value are converted to
references to the first one.
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="0">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="0"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="0"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties1" original="1">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="1"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="1"/>
</cluster_property_set>
<cluster_property_set id="cluster-properties1" original="0">
<nvpair id="cluster-properties1-option1" name="option1" value="value1" original="0"/>
<nvpair id="cluster-properties1-option2" name="option2" value="value2" original="0"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive id="rsc1" class="ocf" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-option1" name="option1" value="valueX" original="1"/>
+ <dropped/>
<nvpair id="pcmk__3_10_upgrade-cluster-properties1-option1-option3" name="option3" value="value1" original="0"/>
</meta_attributes>
</primitive>
<primitive id="rsc2" class="ocf" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc2-meta_attributes" original="1">
<nvpair id="pcmk__3_10_upgrade-cluster-properties1-option1-option3" name="option3" value="value1" original="0"/>
</meta_attributes>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/moon.ref-1 b/cts/schemas/test-3/ref/moon.ref-1
index 981e14f3bd..1eb2e3279d 100644
--- a/cts/schemas/test-3/ref/moon.ref-1
+++ b/cts/schemas/test-3/ref/moon.ref-1
@@ -1,33 +1,33 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="16" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a rule containing a date_spec with every possible attribute
specified, including phase of the moon.
* There is a rule containing a date_spec with only phase of the moon
specified.
In this situation, the moon attribute should be deleted from the
date_spec of each rule. No other attributes should change.
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="1">
<rule id="cluster-properties1-rule" original="1">
<date_expression id="cluster-properties1-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" original="1"/>
+ <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
<cluster_property_set id="cluster-properties2" original="1">
<rule id="cluster-properties2-rule" original="1">
<date_expression id="cluster-properties2-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties2-rule-expr-date_spec" original="1"/>
+ <date_spec id="cluster-properties2-rule-expr-date_spec" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/moon.ref-2 b/cts/schemas/test-3/ref/moon.ref-2
index 981e14f3bd..1eb2e3279d 100644
--- a/cts/schemas/test-3/ref/moon.ref-2
+++ b/cts/schemas/test-3/ref/moon.ref-2
@@ -1,33 +1,33 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="16" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a rule containing a date_spec with every possible attribute
specified, including phase of the moon.
* There is a rule containing a date_spec with only phase of the moon
specified.
In this situation, the moon attribute should be deleted from the
date_spec of each rule. No other attributes should change.
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="1">
<rule id="cluster-properties1-rule" original="1">
<date_expression id="cluster-properties1-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" original="1"/>
+ <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
<cluster_property_set id="cluster-properties2" original="1">
<rule id="cluster-properties2-rule" original="1">
<date_expression id="cluster-properties2-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties2-rule-expr-date_spec" original="1"/>
+ <date_spec id="cluster-properties2-rule-expr-date_spec" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/moon.ref-3 b/cts/schemas/test-3/ref/moon.ref-3
index 981e14f3bd..1eb2e3279d 100644
--- a/cts/schemas/test-3/ref/moon.ref-3
+++ b/cts/schemas/test-3/ref/moon.ref-3
@@ -1,33 +1,33 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="16" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a rule containing a date_spec with every possible attribute
specified, including phase of the moon.
* There is a rule containing a date_spec with only phase of the moon
specified.
In this situation, the moon attribute should be deleted from the
date_spec of each rule. No other attributes should change.
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="1">
<rule id="cluster-properties1-rule" original="1">
<date_expression id="cluster-properties1-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" original="1"/>
+ <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
<cluster_property_set id="cluster-properties2" original="1">
<rule id="cluster-properties2-rule" original="1">
<date_expression id="cluster-properties2-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties2-rule-expr-date_spec" original="1"/>
+ <date_spec id="cluster-properties2-rule-expr-date_spec" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/moon.ref-4 b/cts/schemas/test-3/ref/moon.ref-4
index 981e14f3bd..1eb2e3279d 100644
--- a/cts/schemas/test-3/ref/moon.ref-4
+++ b/cts/schemas/test-3/ref/moon.ref-4
@@ -1,33 +1,33 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="16" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is a rule containing a date_spec with every possible attribute
specified, including phase of the moon.
* There is a rule containing a date_spec with only phase of the moon
specified.
In this situation, the moon attribute should be deleted from the
date_spec of each rule. No other attributes should change.
-->
<crm_config original="1">
<cluster_property_set id="cluster-properties1" original="1">
<rule id="cluster-properties1-rule" original="1">
<date_expression id="cluster-properties1-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" original="1"/>
+ <date_spec id="cluster-properties1-rule-expr-date_spec" seconds="0-59" minutes="0-59" hours="0-23" monthdays="1-31" weekdays="1-7" yeardays="1-366" months="1-12" weeks="1-53" years="2024" weekyears="2024" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
<cluster_property_set id="cluster-properties2" original="1">
<rule id="cluster-properties2-rule" original="1">
<date_expression id="cluster-properties2-rule-expr" operation="date_spec" original="1">
- <date_spec id="cluster-properties2-rule-expr-date_spec" original="1"/>
+ <date_spec id="cluster-properties2-rule-expr-date_spec" changed="1" original="1"/>
</date_expression>
</rule>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/nagios.ref-4 b/cts/schemas/test-3/ref/nagios.ref-4
index 4719168f78..6a94bd750b 100644
--- a/cts/schemas/test-3/ref/nagios.ref-4
+++ b/cts/schemas/test-3/ref/nagios.ref-4
@@ -1,111 +1,146 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is an nagios template and an ocf template.
* There are nagios and ocf primitives, defined either inline or by
reference to the corresponding template.
* There is a group with only nagios primitives and a group with both
nagios and ocf primitives.
* There is a cloned nagios resource and a cloned ocf resource.
* There is a cloned group containing only nagios primitives and a
cloned group containing both nagios and ocf primitives.
* There is a bundle containing an nagios primitive.
* There are various constraints, many of which reference nagios
resources.
In this situation:
* The nagios templates and primitives should be dropped, while the ocf
ones should be kept.
* Groups and clones that would become empty should be dropped.
* Groups containing ocf primitives should be kept; only their nagios
members should be dropped.
* The bundle should be kept so that its container remains managed; its
primitive should be dropped.
* Constraints with attributes referencing nagios resources should be
dropped.
* Resource sets containing only references to nagios resources should
be dropped.
* Constraints with resource sets should be dropped if all of their
resource sets should be dropped.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
+ <dropped/>
<template id="template_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="primitive2_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="primitive4_keep" template="template_keep" original="1"/>
+ <dropped/>
<group id="grp2_keep" original="1">
+ <dropped/>
<primitive id="grp2_rsc2_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="grp2_rsc4_keep" template="template_keep" original="1"/>
</group>
+ <dropped/>
<clone id="clone2_keep" original="1">
<primitive id="clone2_rsc_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
</clone>
+ <dropped/>
<clone id="clone4_keep" original="1">
<group id="clone4_grp_keep" original="1">
+ <dropped/>
<primitive id="clone4_grp_rsc2_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="clone4_grp_rsc4_keep" template="template_keep" original="1"/>
</group>
</clone>
<bundle id="bundle_keep" original="1">
<podman image="image" original="1"/>
+ <dropped/>
</bundle>
</resources>
<constraints original="1">
+ <dropped/>
<rsc_location id="location2_keep" rsc="primitive2_keep" node="node1" score="INFINITY" original="1"/>
+ <dropped/>
<rsc_location id="location4_keep" node="node1" score="INFINITY" original="1">
<resource_set id="location4_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_location>
<rsc_location id="location5_keep" node="node1" score="INFINITY" original="1">
+ <dropped/>
<resource_set id="location5_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_location>
<rsc_location id="location6_keep" rsc-pattern="primitive1_drop" node="node1" score="INFINITY" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<rsc_colocation id="colocation4_keep" rsc="primitive4_keep" with-rsc="primitive2_keep" original="1"/>
+ <dropped/>
<rsc_colocation id="colocation6_keep" original="1">
<resource_set id="colocation6_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_colocation>
<rsc_colocation id="colocation7_keep" original="1">
+ <dropped/>
<resource_set id="colocation7_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_colocation>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<rsc_order id="order4_keep" first="primitive4_keep" then="primitive2_keep" original="1"/>
+ <dropped/>
<rsc_order id="order6_keep" original="1">
<resource_set id="order6_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_order>
<rsc_order id="order7_keep" original="1">
+ <dropped/>
<resource_set id="order7_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_order>
+ <dropped/>
<rsc_ticket id="ticket2_keep" rsc="primitive2_keep" ticket="ticket1" original="1"/>
+ <dropped/>
<rsc_ticket id="ticket4_keep" ticket="ticket1" original="1">
<resource_set id="ticket4_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_ticket>
<rsc_ticket id="ticket5_keep" ticket="ticket1" original="1">
+ <dropped/>
<resource_set id="ticket5_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_ticket>
</constraints>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/nvpair-no-value.ref-1 b/cts/schemas/test-3/ref/nvpair-no-value.ref-1
index 5820a8429d..6c859d6261 100644
--- a/cts/schemas/test-3/ref/nvpair-no-value.ref-1
+++ b/cts/schemas/test-3/ref/nvpair-no-value.ref-1
@@ -1,33 +1,37 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one nvset element of each type: cluster_property_set,
instance_attributes, meta_attributes, utilization.
* Each nvset contains one nvpair with a value and one nvpair with no
value.
In this situation, all nvpair elements with no value should be dropped.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-option2" name="option2" value="value2" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="pacemaker" type="Dummy" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-option2" name="option2" value="value2" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-option2" name="option2" value="value2" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
+ <dropped/>
<nvpair id="rsc1-utilization-option2" name="option2" value="value2" original="1"/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/nvpair-no-value.ref-2 b/cts/schemas/test-3/ref/nvpair-no-value.ref-2
index 5820a8429d..6c859d6261 100644
--- a/cts/schemas/test-3/ref/nvpair-no-value.ref-2
+++ b/cts/schemas/test-3/ref/nvpair-no-value.ref-2
@@ -1,33 +1,37 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one nvset element of each type: cluster_property_set,
instance_attributes, meta_attributes, utilization.
* Each nvset contains one nvpair with a value and one nvpair with no
value.
In this situation, all nvpair elements with no value should be dropped.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-option2" name="option2" value="value2" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="pacemaker" type="Dummy" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-option2" name="option2" value="value2" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-option2" name="option2" value="value2" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
+ <dropped/>
<nvpair id="rsc1-utilization-option2" name="option2" value="value2" original="1"/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/nvpair-no-value.ref-3 b/cts/schemas/test-3/ref/nvpair-no-value.ref-3
index 5820a8429d..6c859d6261 100644
--- a/cts/schemas/test-3/ref/nvpair-no-value.ref-3
+++ b/cts/schemas/test-3/ref/nvpair-no-value.ref-3
@@ -1,33 +1,37 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one nvset element of each type: cluster_property_set,
instance_attributes, meta_attributes, utilization.
* Each nvset contains one nvpair with a value and one nvpair with no
value.
In this situation, all nvpair elements with no value should be dropped.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-option2" name="option2" value="value2" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="pacemaker" type="Dummy" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-option2" name="option2" value="value2" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-option2" name="option2" value="value2" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
+ <dropped/>
<nvpair id="rsc1-utilization-option2" name="option2" value="value2" original="1"/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/nvpair-no-value.ref-4 b/cts/schemas/test-3/ref/nvpair-no-value.ref-4
index 5820a8429d..6c859d6261 100644
--- a/cts/schemas/test-3/ref/nvpair-no-value.ref-4
+++ b/cts/schemas/test-3/ref/nvpair-no-value.ref-4
@@ -1,33 +1,37 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one nvset element of each type: cluster_property_set,
instance_attributes, meta_attributes, utilization.
* Each nvset contains one nvpair with a value and one nvpair with no
value.
In this situation, all nvpair elements with no value should be dropped.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-option2" name="option2" value="value2" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<primitive class="ocf" id="rsc1" provider="pacemaker" type="Dummy" original="1">
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-option2" name="option2" value="value2" original="1"/>
+ <dropped/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-option2" name="option2" value="value2" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
+ <dropped/>
<nvpair id="rsc1-utilization-option2" name="option2" value="value2" original="1"/>
</utilization>
</primitive>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/ping-node.ref-2 b/cts/schemas/test-3/ref/ping-node.ref-2
index cb23cc0d56..ea2d29bdf7 100644
--- a/cts/schemas/test-3/ref/ping-node.ref-2
+++ b/cts/schemas/test-3/ref/ping-node.ref-2
@@ -1,26 +1,26 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are three nodes:
* node1: member
* node2: ping
* node3: remote
In this situation, the ping node should be changed to a member node
with all resources banned from it and probes disabled. Resources should
be banned via a location constraint with rsc-pattern=".*",
node="node2", score="-INFINITY", and resource-discovery="never".
-->
<crm_config original="1"/>
<nodes original="1">
<node id="node1-id" uname="node1" type="member" original="1"/>
- <node id="node2-id" uname="node2" type="member" original="1"/>
+ <node id="node2-id" uname="node2" type="member" original="1" changed="1"/>
<node id="node3-id" uname="node3" type="remote" original="1"/>
</nodes>
<resources original="1"/>
<constraints original="1">
<rsc_location id="pcmk__3_10_upgrade-ping-node-ban-node2" rsc-pattern=".*" node="node2" score="-INFINITY" resource-discovery="never"/>
</constraints>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/ping-node.ref-3 b/cts/schemas/test-3/ref/ping-node.ref-3
index cb23cc0d56..ea2d29bdf7 100644
--- a/cts/schemas/test-3/ref/ping-node.ref-3
+++ b/cts/schemas/test-3/ref/ping-node.ref-3
@@ -1,26 +1,26 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are three nodes:
* node1: member
* node2: ping
* node3: remote
In this situation, the ping node should be changed to a member node
with all resources banned from it and probes disabled. Resources should
be banned via a location constraint with rsc-pattern=".*",
node="node2", score="-INFINITY", and resource-discovery="never".
-->
<crm_config original="1"/>
<nodes original="1">
<node id="node1-id" uname="node1" type="member" original="1"/>
- <node id="node2-id" uname="node2" type="member" original="1"/>
+ <node id="node2-id" uname="node2" type="member" original="1" changed="1"/>
<node id="node3-id" uname="node3" type="remote" original="1"/>
</nodes>
<resources original="1"/>
<constraints original="1">
<rsc_location id="pcmk__3_10_upgrade-ping-node-ban-node2" rsc-pattern=".*" node="node2" score="-INFINITY" resource-discovery="never"/>
</constraints>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/ping-node.ref-4 b/cts/schemas/test-3/ref/ping-node.ref-4
index cb23cc0d56..ea2d29bdf7 100644
--- a/cts/schemas/test-3/ref/ping-node.ref-4
+++ b/cts/schemas/test-3/ref/ping-node.ref-4
@@ -1,26 +1,26 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are three nodes:
* node1: member
* node2: ping
* node3: remote
In this situation, the ping node should be changed to a member node
with all resources banned from it and probes disabled. Resources should
be banned via a location constraint with rsc-pattern=".*",
node="node2", score="-INFINITY", and resource-discovery="never".
-->
<crm_config original="1"/>
<nodes original="1">
<node id="node1-id" uname="node1" type="member" original="1"/>
- <node id="node2-id" uname="node2" type="member" original="1"/>
+ <node id="node2-id" uname="node2" type="member" original="1" changed="1"/>
<node id="node3-id" uname="node3" type="remote" original="1"/>
</nodes>
<resources original="1"/>
<constraints original="1">
<rsc_location id="pcmk__3_10_upgrade-ping-node-ban-node2" rsc-pattern=".*" node="node2" score="-INFINITY" resource-discovery="never"/>
</constraints>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/promotable-legacy.ref-2 b/cts/schemas/test-3/ref/promotable-legacy.ref-2
index f90e1e602d..962feb058a 100644
--- a/cts/schemas/test-3/ref/promotable-legacy.ref-2
+++ b/cts/schemas/test-3/ref/promotable-legacy.ref-2
@@ -1,64 +1,64 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one legacy promotable clone resources (rsc1-master) whose
instances are primitives.
* There is another legacy promotable clone resource (grp1-master) whose
instances are groups.
* Both legacy promotable clones have an existing meta_attributes
element. (This is to test that we prepend, rather than append, a new
one.)
In this situation:
* Each master element should be converted to a clone element.
* Each newly converted clone element should get a new meta_attributes
element prepended with score="INFINITY", containing an nvpair with
promotable="true".
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
- <clone id="rsc1-master" original="1">
+ <clone id="rsc1-master" original="1" changed="1">
<meta_attributes id="pcmk__3_10_upgrade-promotable-legacy-rsc1-master-meta_attributes" score="INFINITY">
<nvpair id="pcmk__3_10_upgrade-promotable-legacy-rsc1-master-meta_attributes-promotable" name="promotable" value="true"/>
</meta_attributes>
<primitive id="rsc1" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc1-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc1-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc1-stop-interval-0s" original="1"/>
</operations>
</primitive>
<meta_attributes id="rsc1-master-meta_attributes" original="1">
<nvpair id="rsc1-master-meta_attributes-some-attr" name="some-attr" value="some_value" original="1"/>
</meta_attributes>
</clone>
- <clone id="grp1-master" original="1">
+ <clone id="grp1-master" original="1" changed="1">
<meta_attributes id="pcmk__3_10_upgrade-promotable-legacy-grp1-master-meta_attributes" score="INFINITY">
<nvpair id="pcmk__3_10_upgrade-promotable-legacy-grp1-master-meta_attributes-promotable" name="promotable" value="true"/>
</meta_attributes>
<group id="grp1" original="1">
<primitive id="rsc3" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc3-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc3-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc3-stop-interval-0s" original="1"/>
</operations>
</primitive>
<primitive id="rsc4" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc4-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc4-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc4-stop-interval-0s" original="1"/>
</operations>
</primitive>
</group>
<meta_attributes id="grp1-master-meta_attributes" original="1">
<nvpair id="grp1-master-meta_attributes-some-attr" name="some-attr" value="some_value" original="1"/>
</meta_attributes>
</clone>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/promotable-legacy.ref-3 b/cts/schemas/test-3/ref/promotable-legacy.ref-3
index f90e1e602d..962feb058a 100644
--- a/cts/schemas/test-3/ref/promotable-legacy.ref-3
+++ b/cts/schemas/test-3/ref/promotable-legacy.ref-3
@@ -1,64 +1,64 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one legacy promotable clone resources (rsc1-master) whose
instances are primitives.
* There is another legacy promotable clone resource (grp1-master) whose
instances are groups.
* Both legacy promotable clones have an existing meta_attributes
element. (This is to test that we prepend, rather than append, a new
one.)
In this situation:
* Each master element should be converted to a clone element.
* Each newly converted clone element should get a new meta_attributes
element prepended with score="INFINITY", containing an nvpair with
promotable="true".
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
- <clone id="rsc1-master" original="1">
+ <clone id="rsc1-master" original="1" changed="1">
<meta_attributes id="pcmk__3_10_upgrade-promotable-legacy-rsc1-master-meta_attributes" score="INFINITY">
<nvpair id="pcmk__3_10_upgrade-promotable-legacy-rsc1-master-meta_attributes-promotable" name="promotable" value="true"/>
</meta_attributes>
<primitive id="rsc1" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc1-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc1-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc1-stop-interval-0s" original="1"/>
</operations>
</primitive>
<meta_attributes id="rsc1-master-meta_attributes" original="1">
<nvpair id="rsc1-master-meta_attributes-some-attr" name="some-attr" value="some_value" original="1"/>
</meta_attributes>
</clone>
- <clone id="grp1-master" original="1">
+ <clone id="grp1-master" original="1" changed="1">
<meta_attributes id="pcmk__3_10_upgrade-promotable-legacy-grp1-master-meta_attributes" score="INFINITY">
<nvpair id="pcmk__3_10_upgrade-promotable-legacy-grp1-master-meta_attributes-promotable" name="promotable" value="true"/>
</meta_attributes>
<group id="grp1" original="1">
<primitive id="rsc3" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc3-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc3-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc3-stop-interval-0s" original="1"/>
</operations>
</primitive>
<primitive id="rsc4" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc4-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc4-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc4-stop-interval-0s" original="1"/>
</operations>
</primitive>
</group>
<meta_attributes id="grp1-master-meta_attributes" original="1">
<nvpair id="grp1-master-meta_attributes-some-attr" name="some-attr" value="some_value" original="1"/>
</meta_attributes>
</clone>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/promotable-legacy.ref-4 b/cts/schemas/test-3/ref/promotable-legacy.ref-4
index f90e1e602d..962feb058a 100644
--- a/cts/schemas/test-3/ref/promotable-legacy.ref-4
+++ b/cts/schemas/test-3/ref/promotable-legacy.ref-4
@@ -1,64 +1,64 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is one legacy promotable clone resources (rsc1-master) whose
instances are primitives.
* There is another legacy promotable clone resource (grp1-master) whose
instances are groups.
* Both legacy promotable clones have an existing meta_attributes
element. (This is to test that we prepend, rather than append, a new
one.)
In this situation:
* Each master element should be converted to a clone element.
* Each newly converted clone element should get a new meta_attributes
element prepended with score="INFINITY", containing an nvpair with
promotable="true".
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
- <clone id="rsc1-master" original="1">
+ <clone id="rsc1-master" original="1" changed="1">
<meta_attributes id="pcmk__3_10_upgrade-promotable-legacy-rsc1-master-meta_attributes" score="INFINITY">
<nvpair id="pcmk__3_10_upgrade-promotable-legacy-rsc1-master-meta_attributes-promotable" name="promotable" value="true"/>
</meta_attributes>
<primitive id="rsc1" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc1-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc1-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc1-stop-interval-0s" original="1"/>
</operations>
</primitive>
<meta_attributes id="rsc1-master-meta_attributes" original="1">
<nvpair id="rsc1-master-meta_attributes-some-attr" name="some-attr" value="some_value" original="1"/>
</meta_attributes>
</clone>
- <clone id="grp1-master" original="1">
+ <clone id="grp1-master" original="1" changed="1">
<meta_attributes id="pcmk__3_10_upgrade-promotable-legacy-grp1-master-meta_attributes" score="INFINITY">
<nvpair id="pcmk__3_10_upgrade-promotable-legacy-grp1-master-meta_attributes-promotable" name="promotable" value="true"/>
</meta_attributes>
<group id="grp1" original="1">
<primitive id="rsc3" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc3-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc3-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc3-stop-interval-0s" original="1"/>
</operations>
</primitive>
<primitive id="rsc4" class="ocf" type="Dummy" provider="pacemaker" original="1">
<operations original="1">
<op name="monitor" interval="10s" timeout="20s" id="rsc4-monitor-interval-10s" original="1"/>
<op name="start" interval="0s" timeout="20s" id="rsc4-start-interval-0s" original="1"/>
<op name="stop" interval="0s" timeout="20s" id="rsc4-stop-interval-0s" original="1"/>
</operations>
</primitive>
</group>
<meta_attributes id="grp1-master-meta_attributes" original="1">
<nvpair id="grp1-master-meta_attributes-some-attr" name="some-attr" value="some_value" original="1"/>
</meta_attributes>
</clone>
</resources>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/remove-after-stop.ref-1 b/cts/schemas/test-3/ref/remove-after-stop.ref-1
index 163391ab9c..bddd826b52 100644
--- a/cts/schemas/test-3/ref/remove-after-stop.ref-1
+++ b/cts/schemas/test-3/ref/remove-after-stop.ref-1
@@ -1,19 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The remove-after-stop cluster property is set to any value.
In this situation, the remove-after-stop cluster property should be
removed.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/remove-after-stop.ref-2 b/cts/schemas/test-3/ref/remove-after-stop.ref-2
index 163391ab9c..bddd826b52 100644
--- a/cts/schemas/test-3/ref/remove-after-stop.ref-2
+++ b/cts/schemas/test-3/ref/remove-after-stop.ref-2
@@ -1,19 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The remove-after-stop cluster property is set to any value.
In this situation, the remove-after-stop cluster property should be
removed.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/remove-after-stop.ref-3 b/cts/schemas/test-3/ref/remove-after-stop.ref-3
index 163391ab9c..bddd826b52 100644
--- a/cts/schemas/test-3/ref/remove-after-stop.ref-3
+++ b/cts/schemas/test-3/ref/remove-after-stop.ref-3
@@ -1,19 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The remove-after-stop cluster property is set to any value.
In this situation, the remove-after-stop cluster property should be
removed.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/remove-after-stop.ref-4 b/cts/schemas/test-3/ref/remove-after-stop.ref-4
index 163391ab9c..bddd826b52 100644
--- a/cts/schemas/test-3/ref/remove-after-stop.ref-4
+++ b/cts/schemas/test-3/ref/remove-after-stop.ref-4
@@ -1,19 +1,20 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The remove-after-stop cluster property is set to any value.
In this situation, the remove-after-stop cluster property should be
removed.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
+ <dropped/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/restart-type.ref-4 b/cts/schemas/test-3/ref/restart-type.ref-4
index a126b04395..6b0224881f 100644
--- a/cts/schemas/test-3/ref/restart-type.ref-4
+++ b/cts/schemas/test-3/ref/restart-type.ref-4
@@ -1,86 +1,98 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are the following resources:
* A template
* A primitive outside of any collective resource
* A group containing a single member
* A cloned primitive
* A cloned group containing a single member
* A bundle containing a primitive
* There is a rsc_defaults element.
* Each resource (including nested resources) and the rsc_defaults
element have a "restart-type" meta-attribute and one "some-option"
meta-attribute.
In this situation, all restart-type meta-attributes should be removed.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
<template class="ocf" id="template1" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="template1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="template1-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</template>
<primitive class="ocf" id="rsc1" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</primitive>
<group id="grp1" original="1">
<primitive class="ocf" id="rsc2" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc2-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc2-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</primitive>
<meta_attributes id="grp1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="grp1-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</group>
<clone id="clone1" original="1">
<primitive class="ocf" id="rsc3" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc3-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc3-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</primitive>
<meta_attributes id="clone1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="clone1-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</clone>
<clone id="clone2" original="1">
<group id="grp2" original="1">
<primitive class="ocf" id="rsc4" provider="pacemaker" type="Dummy" original="1">
<meta_attributes id="rsc4-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc4-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</primitive>
<meta_attributes id="grp2-meta_attributes" original="1">
+ <dropped/>
<nvpair id="grp2-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</group>
<meta_attributes id="clone2-meta_attributes" original="1">
+ <dropped/>
<nvpair id="clone2-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</clone>
<bundle id="bundle1" original="1">
<podman image="localhost/pcmktest:http" replicas="3" original="1"/>
<primitive class="ocf" id="rsc5" provider="heartbeat" type="apache" original="1">
<meta_attributes id="rsc5-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc5-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</primitive>
<meta_attributes id="bundle1-meta_attributes" original="1">
+ <dropped/>
<nvpair id="bundle1-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</bundle>
</resources>
<constraints original="1"/>
<rsc_defaults original="1">
<meta_attributes id="rsc_defaults-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc_defaults-meta_attributes-some-option" name="some-option" value="some-value" original="1"/>
</meta_attributes>
</rsc_defaults>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/rkt.ref-4 b/cts/schemas/test-3/ref/rkt.ref-4
index b20daa5141..2b6dd69f78 100644
--- a/cts/schemas/test-3/ref/rkt.ref-4
+++ b/cts/schemas/test-3/ref/rkt.ref-4
@@ -1,85 +1,111 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are three bundles: one rkt, one podman, and one docker.
* There are various constraints, many of which reference the rkt
bundle.
In this situation:
* The rkt bundle should be dropped.
* Constraints with attributes referencing the rkt bundles should be
dropped.
* Resource sets containing only references to rkt bundles should be
* Constraints with resource sets should be dropped if all of their
resource sets should be dropped.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
+ <dropped/>
<bundle id="bundle2_keep" original="1">
<podman image="image" original="1"/>
<primitive id="bundle2_rsc" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
</bundle>
<bundle id="bundle3_keep" original="1">
<docker image="image" original="1"/>
<primitive id="bundle3_rsc" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
</bundle>
+ <dropped/>
</resources>
<constraints original="1">
+ <dropped/>
<rsc_location id="location2_keep" rsc="bundle2_keep" node="node1" score="INFINITY" original="1"/>
+ <dropped/>
<rsc_location id="location4_keep" node="node1" score="INFINITY" original="1">
<resource_set id="location4_keep-set" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_location>
<rsc_location id="location5_keep" node="node1" score="INFINITY" original="1">
+ <dropped/>
<resource_set id="location5_keep-set_keep" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_location>
<rsc_location id="location6_keep" rsc-pattern="bundle1_drop" node="node1" score="INFINITY" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<rsc_colocation id="colocation4_keep" rsc="bundle3_keep" with-rsc="bundle2_keep" original="1"/>
+ <dropped/>
<rsc_colocation id="colocation6_keep" original="1">
<resource_set id="colocation6_keep-set" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_colocation>
<rsc_colocation id="colocation7_keep" original="1">
+ <dropped/>
<resource_set id="colocation7_keep-set_keep" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_colocation>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<rsc_order id="order4_keep" first="bundle3_keep" then="bundle2_keep" original="1"/>
+ <dropped/>
<rsc_order id="order6_keep" original="1">
<resource_set id="order6_keep-set" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_order>
<rsc_order id="order7_keep" original="1">
+ <dropped/>
<resource_set id="order7_keep-set_keep" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_order>
+ <dropped/>
<rsc_ticket id="ticket2_keep" rsc="bundle2_keep" ticket="ticket1" original="1"/>
+ <dropped/>
<rsc_ticket id="ticket4_keep" ticket="ticket1" original="1">
<resource_set id="ticket4_keep-set" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_ticket>
<rsc_ticket id="ticket5_keep" ticket="ticket1" original="1">
+ <dropped/>
<resource_set id="ticket5_keep-set_keep" original="1">
<resource_ref id="bundle2_keep" original="1"/>
+ <dropped/>
<resource_ref id="bundle3_keep" original="1"/>
</resource_set>
</rsc_ticket>
</constraints>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/role-after-failure.ref-4 b/cts/schemas/test-3/ref/role-after-failure.ref-4
index 20d2bd7c57..d8104025e3 100644
--- a/cts/schemas/test-3/ref/role-after-failure.ref-4
+++ b/cts/schemas/test-3/ref/role-after-failure.ref-4
@@ -1,113 +1,120 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There are the following resources:
* A template
* A primitive outside of any collective resource
* A group containing a single member
* A cloned primitive
* A cloned group containing a single member
* A bundle containing a primitive
* There is an op_defaults element.
* Each primitive has an op element.
* Each op and the op_defaults element have a meta_attributes element
containing an nvpair with name="role_after_failure" and another with
name="other".
* There are other nvsets containing nvpairs with
name="role_after_failure".
In this situation, all role_after_failure meta-attributes within op and
op_defaults elements should be dropped. Other meta-attributes should be
unchanged.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-role_after_failure" name="role_after_failure" value="true" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1">
<template class="ocf" id="template1" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="template1_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="template1_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="template_monitor_20000-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op>
</operations>
</template>
<primitive class="ocf" id="rsc1" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc1_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc1_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc1_monitor_20000-meta_attributes-other" name="other" value="false" original="1"/>
</meta_attributes>
</op>
</operations>
<instance_attributes id="rsc1-instance_attributes" original="1">
<nvpair id="rsc1-instance_attributes-role_after_failure" name="role_after_failure" value="true" original="1"/>
</instance_attributes>
<meta_attributes id="rsc1-meta_attributes" original="1">
<nvpair id="rsc1-meta_attributes-role_after_failure" name="role_after_failure" value="true" original="1"/>
</meta_attributes>
<utilization id="rsc1-utilization" original="1">
<nvpair id="rsc1-utilization-role_after_failure" name="role_after_failure" value="true" original="1"/>
</utilization>
</primitive>
<group id="grp1" original="1">
<primitive class="ocf" id="rsc2" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc2_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc2_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc2_monitor_20000-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</group>
<clone id="clone1" original="1">
<primitive class="ocf" id="rsc3" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc3_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc3_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc3_monitor_20000-meta_attributes-other" name="other" value="false" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</clone>
<clone id="clone2" original="1">
<group id="grp2" original="1">
<primitive class="ocf" id="rsc4" provider="pacemaker" type="Dummy" original="1">
<operations original="1">
<op id="rsc4_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc4_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc4_monitor_20000-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</group>
</clone>
<bundle id="bundle1" original="1">
<podman image="localhost/pcmktest:http" replicas="3" original="1"/>
<primitive class="ocf" id="rsc5" provider="heartbeat" type="apache" original="1">
<operations original="1">
<op id="rsc5_monitor_20000" interval="20s" name="monitor" original="1">
<meta_attributes id="rsc5_monitor_20000-meta_attributes" original="1">
+ <dropped/>
<nvpair id="rsc5_monitor_20000-meta_attributes-other" name="other" value="false" original="1"/>
</meta_attributes>
</op>
</operations>
</primitive>
</bundle>
</resources>
<constraints original="1"/>
<op_defaults original="1">
<meta_attributes id="op_defaults-meta_attributes" original="1">
+ <dropped/>
<nvpair id="op_defaults-meta_attributes-other" name="other" value="true" original="1"/>
</meta_attributes>
</op_defaults>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-1 b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-1
index bacd918366..6c261f047f 100644
--- a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-1
+++ b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-1
@@ -1,32 +1,32 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The stonith-action cluster property is set to "reboot" in one
cluster_property_set.
* The stonith-action cluster property is set to "poweroff" in another
cluster_property_set.
* A different cluster property ("other-prop") is set to "poweroff".
In this situation, the stonith-action value "poweroff" should be
replaced by "off". The stonith-action value "reboot" and the
other-prop value "poweroff" should be unchanged.
In practice it doesn't make sense to have stonith-action configured
twice unless rules decide which one to apply. This is contrived for
testing purposes.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot" original="1"/>
<nvpair id="cib-bootstrap-options-other-prop" name="other-prop" value="poweroff" original="1"/>
</cluster_property_set>
<cluster_property_set id="other-options" original="1">
- <nvpair id="other-options-stonith-action" name="stonith-action" value="off" original="1"/>
+ <nvpair id="other-options-stonith-action" name="stonith-action" value="off" changed="1" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-2 b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-2
index bacd918366..6c261f047f 100644
--- a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-2
+++ b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-2
@@ -1,32 +1,32 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The stonith-action cluster property is set to "reboot" in one
cluster_property_set.
* The stonith-action cluster property is set to "poweroff" in another
cluster_property_set.
* A different cluster property ("other-prop") is set to "poweroff".
In this situation, the stonith-action value "poweroff" should be
replaced by "off". The stonith-action value "reboot" and the
other-prop value "poweroff" should be unchanged.
In practice it doesn't make sense to have stonith-action configured
twice unless rules decide which one to apply. This is contrived for
testing purposes.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot" original="1"/>
<nvpair id="cib-bootstrap-options-other-prop" name="other-prop" value="poweroff" original="1"/>
</cluster_property_set>
<cluster_property_set id="other-options" original="1">
- <nvpair id="other-options-stonith-action" name="stonith-action" value="off" original="1"/>
+ <nvpair id="other-options-stonith-action" name="stonith-action" value="off" changed="1" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-3 b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-3
index bacd918366..6c261f047f 100644
--- a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-3
+++ b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-3
@@ -1,32 +1,32 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The stonith-action cluster property is set to "reboot" in one
cluster_property_set.
* The stonith-action cluster property is set to "poweroff" in another
cluster_property_set.
* A different cluster property ("other-prop") is set to "poweroff".
In this situation, the stonith-action value "poweroff" should be
replaced by "off". The stonith-action value "reboot" and the
other-prop value "poweroff" should be unchanged.
In practice it doesn't make sense to have stonith-action configured
twice unless rules decide which one to apply. This is contrived for
testing purposes.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot" original="1"/>
<nvpair id="cib-bootstrap-options-other-prop" name="other-prop" value="poweroff" original="1"/>
</cluster_property_set>
<cluster_property_set id="other-options" original="1">
- <nvpair id="other-options-stonith-action" name="stonith-action" value="off" original="1"/>
+ <nvpair id="other-options-stonith-action" name="stonith-action" value="off" changed="1" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-4 b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-4
index bacd918366..6c261f047f 100644
--- a/cts/schemas/test-3/ref/stonith-action-poweroff.ref-4
+++ b/cts/schemas/test-3/ref/stonith-action-poweroff.ref-4
@@ -1,32 +1,32 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="2" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* The stonith-action cluster property is set to "reboot" in one
cluster_property_set.
* The stonith-action cluster property is set to "poweroff" in another
cluster_property_set.
* A different cluster property ("other-prop") is set to "poweroff".
In this situation, the stonith-action value "poweroff" should be
replaced by "off". The stonith-action value "reboot" and the
other-prop value "poweroff" should be unchanged.
In practice it doesn't make sense to have stonith-action configured
twice unless rules decide which one to apply. This is contrived for
testing purposes.
-->
<crm_config original="1">
<cluster_property_set id="cib-bootstrap-options" original="1">
<nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot" original="1"/>
<nvpair id="cib-bootstrap-options-other-prop" name="other-prop" value="poweroff" original="1"/>
</cluster_property_set>
<cluster_property_set id="other-options" original="1">
- <nvpair id="other-options-stonith-action" name="stonith-action" value="off" original="1"/>
+ <nvpair id="other-options-stonith-action" name="stonith-action" value="off" changed="1" original="1"/>
</cluster_property_set>
</crm_config>
<nodes original="1"/>
<resources original="1"/>
<constraints original="1"/>
</configuration>
<status original="1"/>
</cib>
diff --git a/cts/schemas/test-3/ref/upstart.ref-4 b/cts/schemas/test-3/ref/upstart.ref-4
index f395f98aaa..37bcaa4f64 100644
--- a/cts/schemas/test-3/ref/upstart.ref-4
+++ b/cts/schemas/test-3/ref/upstart.ref-4
@@ -1,111 +1,146 @@
<cib crm_feature_set="3.19.7" validate-with="pacemaker-4.0" epoch="8" num_updates="0" admin_epoch="0" original="1">
<configuration original="1">
<!-- The essential elements of this test are:
* There is an upstart template and an ocf template.
* There are upstart and ocf primitives, defined either inline or by
reference to the corresponding template.
* There is a group with only upstart primitives and a group with both
upstart and ocf primitives.
* There is a cloned upstart resource and a cloned ocf resource.
* There is a cloned group containing only upstart primitives and a
cloned group containing both upstart and ocf primitives.
* There is a bundle containing an upstart primitive.
* There are various constraints, many of which reference upstart
resources.
In this situation:
* The upstart templates and primitives should be dropped, while the ocf
ones should be kept.
* Groups and clones that would become empty should be dropped.
* Groups containing ocf primitives should be kept; only their upstart
members should be dropped.
* The bundle should be kept so that its container remains managed; its
primitive should be dropped.
* Constraints with attributes referencing upstart resources should be
dropped.
* Resource sets containing only references to upstart resources should
be dropped.
* Constraints with resource sets should be dropped if all of their
resource sets should be dropped.
-->
<crm_config original="1"/>
<nodes original="1"/>
<resources original="1">
+ <dropped/>
<template id="template_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="primitive2_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="primitive4_keep" template="template_keep" original="1"/>
+ <dropped/>
<group id="grp2_keep" original="1">
+ <dropped/>
<primitive id="grp2_rsc2_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="grp2_rsc4_keep" template="template_keep" original="1"/>
</group>
+ <dropped/>
<clone id="clone2_keep" original="1">
<primitive id="clone2_rsc_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
</clone>
+ <dropped/>
<clone id="clone4_keep" original="1">
<group id="clone4_grp_keep" original="1">
+ <dropped/>
<primitive id="clone4_grp_rsc2_keep" class="ocf" provider="pacemaker" type="Dummy" original="1"/>
+ <dropped/>
<primitive id="clone4_grp_rsc4_keep" template="template_keep" original="1"/>
</group>
</clone>
<bundle id="bundle_keep" original="1">
<podman image="image" original="1"/>
+ <dropped/>
</bundle>
</resources>
<constraints original="1">
+ <dropped/>
<rsc_location id="location2_keep" rsc="primitive2_keep" node="node1" score="INFINITY" original="1"/>
+ <dropped/>
<rsc_location id="location4_keep" node="node1" score="INFINITY" original="1">
<resource_set id="location4_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_location>
<rsc_location id="location5_keep" node="node1" score="INFINITY" original="1">
+ <dropped/>
<resource_set id="location5_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_location>
<rsc_location id="location6_keep" rsc-pattern="primitive1_drop" node="node1" score="INFINITY" original="1"/>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<rsc_colocation id="colocation4_keep" rsc="primitive4_keep" with-rsc="primitive2_keep" original="1"/>
+ <dropped/>
<rsc_colocation id="colocation6_keep" original="1">
<resource_set id="colocation6_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_colocation>
<rsc_colocation id="colocation7_keep" original="1">
+ <dropped/>
<resource_set id="colocation7_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_colocation>
+ <dropped/>
+ <dropped/>
+ <dropped/>
<rsc_order id="order4_keep" first="primitive4_keep" then="primitive2_keep" original="1"/>
+ <dropped/>
<rsc_order id="order6_keep" original="1">
<resource_set id="order6_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_order>
<rsc_order id="order7_keep" original="1">
+ <dropped/>
<resource_set id="order7_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_order>
+ <dropped/>
<rsc_ticket id="ticket2_keep" rsc="primitive2_keep" ticket="ticket1" original="1"/>
+ <dropped/>
<rsc_ticket id="ticket4_keep" ticket="ticket1" original="1">
<resource_set id="ticket4_keep-set" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_ticket>
<rsc_ticket id="ticket5_keep" ticket="ticket1" original="1">
+ <dropped/>
<resource_set id="ticket5_keep-set_keep" original="1">
<resource_ref id="clone2_keep" original="1"/>
+ <dropped/>
<resource_ref id="clone4_keep" original="1"/>
</resource_set>
</rsc_ticket>
</constraints>
</configuration>
<status original="1"/>
</cib>
diff --git a/xml/upgrade-3.10-1.xsl b/xml/upgrade-3.10-1.xsl
index ebf6ca6e86..a86d5e0e1f 100644
--- a/xml/upgrade-3.10-1.xsl
+++ b/xml/upgrade-3.10-1.xsl
@@ -1,188 +1,200 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Use comments liberally as future maintainers may be unfamiliar with XSLT.
-->
<!--
upgrade-3.10-1.xsl
Guarantees after this transformation:
* The validate-with attribute of the cib element is set to "pacemaker-4.0".
* All nvset elements are sorted by score within their respective parent
elements (remaining in document order in the case of a tie) and placed below
all non-nvset siblings. Exception: a cluster_property_set with id
"cib-bootstrap-options" always sorts first relative to its siblings.
* Each nvpair has a value attribute. If an nvpair did not have a value
attribute prior to this transformation, it is dropped.
* There are no "moon" attributes in date_spec elements of rules. If there were
any prior to this transformation, the attributes are now removed and the rest
of the date_spec is unchanged.
* The crmd-finalization-timeout cluster property has been renamed to
"join-finalization-timeout".
* The crmd-integration-timeout cluster property has been renamed to
"join-integration-timeout".
* The crmd-transition-delay cluster property has been renamed to
"transition-delay".
* The remove-after-stop cluster property is not present.
* The stonith-action cluster property is set to "off" if it was previously set
to "poweroff".
* There are no fencing levels with index greater than 9. If there were any
prior to this transformation, they are dropped.
nvset elements include the following:
* cluster_property_set
* instance_attributes
* meta_attributes
* utilization
Any template that matches an element (for example, "primitive") that may
contain an nvset should be placed in a later stylesheet. If such a template is
placed in this stylesheet, its nvsets will not be sorted. We could avoid this
with some refactoring, but it's cleaner this way.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="upgrade-3.10-common.xsl"/>
<!--
Copy everything unaltered by default, except sort nvset elements by score.
This doesn't affect behavior. nvset elements of a given type within a given
parent element are processed in order of their score attributes, with a
nonexistent score treated as 0. In the event of a tie, elements are processed
in document order. The sort here preserves document order in the event of a
tie.
The order of nvset elements relative to non-nvset elements does not matter. So
this template puts existing nvset elements after existing non-nvset elements.
This facilitates later transformations, allowing us to more easily drop nvpairs
with unsupported values without changing behavior.
-->
<xsl:template match="/|@*|node()">
<xsl:copy>
<xsl:variable name="nvsets"
select="cluster_property_set
|instance_attributes
|meta_attributes
|utilization"/>
<!-- XPath 1.0 set difference idiom -->
<xsl:variable name="non_nvsets"
select="@*|node()[count(.|$nvsets) != count($nvsets)]"/>
<xsl:apply-templates select="$non_nvsets"/>
<xsl:apply-templates select="$nvsets">
<!--
Order cluster_property_set with id "cib-bootstrap-options" before
siblings
-->
<xsl:sort select="self::cluster_property_set
and (@id = 'cib-bootstrap-options')"
order="descending"/>
<!--
Sort remaining elements by score.
First, score="INFINITY" (including "+INFINITY").
-->
<xsl:sort select="@score[. = 'INFINITY'] or @score[. = '+INFINITY']"
order="descending"/>
<!-- Then finite positive scores -->
<xsl:sort select="@score[. > 0]" data-type="number"
order="descending"/>
<!-- Then score 0 (including implicit) -->
<xsl:sort select="number(not(@score) or @score[. = 0])"
data-type="number" order="descending"/>
<!-- Then finite negative scores -->
<xsl:sort select="@score[. < 0]" data-type="number"
order="descending"/>
<!-- Then score="-INFINITY" -->
<xsl:sort select="@score[. = '-INFINITY']" order="descending"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<!--
Bump cib/@validate-with, or set it if not already set. Pacemaker does this, but
doing it in the transformation is helpful for testing.
-->
<xsl:template match="cib">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="validate-with">pacemaker-4.0</xsl:attribute>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<!-- Name/value pairs -->
<!-- Drop any nvpair that does not have a value attribute -->
-<xsl:template match="nvpair[not(@value)]"/>
+<xsl:template match="nvpair[not(@value)]">
+ <xsl:element name="dropped"/>
+</xsl:template>
<!-- Rules -->
<!-- Drop the moon attribute from date_spec elements -->
<xsl:template match="date_spec/@moon">
<xsl:call-template name="warning">
<xsl:with-param name="msg"
select="concat('Dropping moon attribute from',
' date spec ', ../@id,
' because moon phase is no longer',
' supported')"/>
</xsl:call-template>
+
+ <xsl:attribute name="changed">1</xsl:attribute>
</xsl:template>
<!-- Cluster properties -->
<!-- Rename crmd-finalization-timeout property to join-finalization-timeout -->
<xsl:template match="cluster_property_set
/nvpair[@name = 'crmd-finalization-timeout']/@name">
<xsl:attribute name="name">join-finalization-timeout</xsl:attribute>
+ <xsl:attribute name="changed">1</xsl:attribute>
</xsl:template>
<!-- Rename crmd-integration-timeout property to join-integration-timeout -->
<xsl:template match="cluster_property_set
/nvpair[@name = 'crmd-integration-timeout']/@name">
<xsl:attribute name="name">join-integration-timeout</xsl:attribute>
+ <xsl:attribute name="changed">1</xsl:attribute>
</xsl:template>
<!-- Rename crmd-transition-delay property to transition-delay -->
<xsl:template match="cluster_property_set
/nvpair[@name = 'crmd-transition-delay']/@name">
<xsl:attribute name="name">transition-delay</xsl:attribute>
+ <xsl:attribute name="changed">1</xsl:attribute>
</xsl:template>
<!-- Drop remove-after-stop property -->
<xsl:template match="cluster_property_set/nvpair[@name = 'remove-after-stop']">
<xsl:call-template name="warning">
<xsl:with-param name="msg"
select="concat('Dropping nvpair ', @id,
' because the remove-after-stop',
' property is unsupported')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:template>
<!-- Replace stonith-action="poweroff" with stonith-action="off" -->
<xsl:template match="cluster_property_set/nvpair[@name = 'stonith-action']
/@value[. = 'poweroff']">
<xsl:attribute name="value">off</xsl:attribute>
+ <xsl:attribute name="changed">1</xsl:attribute>
</xsl:template>
<!-- Fencing topology -->
<!-- Drop fencing levels with index greater than 9 -->
-<xsl:template match="fencing-level[number(@index) > 9]"/>
+<xsl:template match="fencing-level[number(@index) > 9]">
+ <xsl:element name="dropped"/>
+</xsl:template>
</xsl:stylesheet>
diff --git a/xml/upgrade-3.10-2.xsl b/xml/upgrade-3.10-2.xsl
index fe8203ad60..3d9a21a96f 100644
--- a/xml/upgrade-3.10-2.xsl
+++ b/xml/upgrade-3.10-2.xsl
@@ -1,322 +1,333 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Use comments liberally as future maintainers may be unfamiliar with XSLT.
-->
<!--
upgrade-3.10-2.xsl
Guarantees after this transformation:
* Within a given nvset, there is at most one nvpair with a given name. If there
were duplicates prior to this transformation, only the first one is kept.
* There are no ping nodes. If a node was a ping node prior to this
transformation, it is now a member (cluster) node with all resources banned
and probes disabled.
* There are no legacy promotable clone resources. If a resource was a legacy
promotable clone prior to this transformation, it is now a standard
promotable clone (that is, a clone with the meta-attribute "promotable" set
to "true").
* There is at most one top-level rule within a location constraint. If a
location constraint had N top-level rules (N > 1) prior to this
transformation, it is now converted to N location constraints, each with a
single top-level rule.
Anything that matches all resource types should be placed in a later
transformation, so that it can ignore the possibility of legacy promotable
clone resources.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="upgrade-3.10-common.xsl"/>
<!-- Index all location constraints by ID -->
<xsl:key name="location_id" match="//rsc_location" use="@id"/>
<!--
Copy everything unaltered by default, except optionally set "original"
Params:
* original: See identity template
-->
<xsl:template match="/|@*|node()">
<xsl:param name="original"/>
<xsl:call-template name="identity">
<xsl:with-param name="original" select="$original"/>
</xsl:call-template>
</xsl:template>
<!-- Name/value pairs -->
<!--
Ensure there is at most one nvpair with a given name in a given nvset.
By dropping the ignored duplicates now, we facilitate later transformations in
which we drop nvpairs with certain values. The later steps will involve
comparisons among multiple nvsets. These are easier to reason about and to
regression-test if, prior to that, we drop all but one nvpair with a given name
in a given nvset.
-->
<!--
Drop nvpairs with value="#default" if there is a later nvpair with the same
name. Value "#default" unsets the option, so any later nvpair takes precedence.
-->
<xsl:template match="nvpair[(@value = '#default')
- and (@name = following-sibling::*/@name)]"/>
+ and (@name = following-sibling::*/@name)]">
+ <xsl:element name="dropped"/>
+</xsl:template>
<!--
Drop nvpairs with a value other than "#default" if certain conditions (detailed
below) are satisfied.
-->
<xsl:template match="nvpair[@value != '#default']">
<!-- All preceding sibling nvpairs with the same name -->
<xsl:variable name="before"
select="preceding-sibling::nvpair[@name = current()/@name]"/>
<!-- All following sibling nvpairs with the same name -->
<xsl:variable name="after"
select="following-sibling::nvpair[@name = current()/@name]"/>
<!--
Last preceding sibling nvpair with the same name and value "#default"
-->
<xsl:variable name="last_default_before"
select="$before[@value = '#default'][last()]"/>
<xsl:choose>
<!--
Drop if there's a following sibling with the same name and value
"#default". The later "#default" value would unset the current nvpair's
value.
-->
- <xsl:when test="$after[@value = '#default']"/>
+ <xsl:when test="$after[@value = '#default']">
+ <xsl:element name="dropped"/>
+ </xsl:when>
<!--
Drop if both:
* There's a preceding sibling nvpair with the same name
* Either of the following:
* There's no preceding sibling nvpair with the same name and value
"#default"
* There's a preceding sibling nvpair with the same name between the
most recent "#default" and the current node.
The preceding sibling nvpair would take effect, and there is no
"#default" value to unset it before we reach the current nvpair.
This uses an XPath 1.0 set intersection idiom.
-->
<xsl:when test="$before
and (not($last_default_before)
or $last_default_before/following-sibling::nvpair
- [count(.|$before) = count($before)])"/>
+ [count(.|$before) = count($before)])">
+ <xsl:element name="dropped"/>
+ </xsl:when>
<!-- Otherwise, keep the nvpair -->
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Nodes -->
<!--
Transform ping nodes to cluster (member) nodes. The constraints template bans
all resources from the newly transformed nodes.
-->
<xsl:template match="node[@type = 'ping']">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="type">member</xsl:attribute>
+ <xsl:attribute name="changed">1</xsl:attribute>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<!-- Resources -->
<!--
Convert master resources to clones with promotable meta-attribute set to "true"
-->
<xsl:template match="master">
<xsl:element name="clone">
<xsl:apply-templates select="@*"/>
+ <xsl:attribute name="changed">1</xsl:attribute>
<!--
Prepend new meta_attributes element that takes precedence over all
others, with promotable="true"
-->
<xsl:element name="meta_attributes">
<xsl:variable name="meta_id"
select="concat($upgrade_prefix, 'promotable-legacy-',
@id, '-meta_attributes')"/>
<xsl:attribute name="id">
<xsl:value-of select="$meta_id"/>
</xsl:attribute>
<!-- Override any manually configured meta-attributes -->
<xsl:attribute name="score">INFINITY</xsl:attribute>
<xsl:element name="nvpair">
<xsl:attribute name="id">
<xsl:value-of select="concat($meta_id, '-promotable')"/>
</xsl:attribute>
<xsl:attribute name="name">promotable</xsl:attribute>
<xsl:attribute name="value">true</xsl:attribute>
</xsl:element>
</xsl:element>
<!-- Keep all existing children -->
<xsl:apply-templates select="node()"/>
</xsl:element>
</xsl:template>
<!--
Rename a bundle container's masters attribute to promoted-max. (This is the
only place the schema allows a masters attribute.)
-->
<xsl:template match="@masters">
<xsl:attribute name="promoted-max">
<xsl:value-of select="."/>
</xsl:attribute>
+ <xsl:attribute name="changed">1</xsl:attribute>
</xsl:template>
<!-- Constraints -->
<xsl:template match="constraints">
<xsl:copy>
<!-- Existing contents -->
<xsl:apply-templates select="@*|node()"/>
<!--
Ban all resources from each ping node (converted to a cluster node via
another template)
-->
<xsl:for-each select="//node[@type = 'ping']">
<xsl:element name="rsc_location">
<xsl:attribute name="id">
<xsl:value-of select="concat($upgrade_prefix,
'ping-node-ban-', @uname)"/>
</xsl:attribute>
<xsl:attribute name="rsc-pattern">.*</xsl:attribute>
<xsl:attribute name="node">
<xsl:value-of select="@uname"/>
</xsl:attribute>
<xsl:attribute name="score">-INFINITY</xsl:attribute>
<xsl:attribute name="resource-discovery">never</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:copy>
</xsl:template>
<!--
If a location constraint contains multiple top-level rules, replace it with
a set of new location constraints, one for each top-level rule.
-->
<xsl:template match="rsc_location[count(rule) > 1]">
<xsl:for-each select="rule">
<xsl:element name="rsc_location">
<!-- Copy attributes from the original rsc_location -->
<xsl:apply-templates select="../@*"/>
<xsl:attribute name="original">0</xsl:attribute>
<!--
Set a probably-unique ID for the new rsc_location, based on the
existing rsc_location's ID and the rule's position
-->
<xsl:attribute name="id">
<xsl:value-of select="concat($upgrade_prefix, ../@id, '-',
position())"/>
</xsl:attribute>
<!-- Add resource sets, rule, and lifetime (in order) -->
<xsl:choose>
<!--
The descendants of the first rsc_location created should keep
their "original" values from the old rsc_location, if any
-->
<xsl:when test="position() = 1">
<xsl:apply-templates select="../resource_set"/>
<xsl:apply-templates select="."/>
<xsl:apply-templates select="../lifetime"/>
</xsl:when>
<!--
The descendants of later rsc_location elements should all have
original="0" for resource_set and lifetime elements. The rule
element should keep its existing "original" value, since it
will occur in exactly one of the newly created constraints.
-->
<xsl:otherwise>
<xsl:apply-templates select="../resource_set">
<xsl:with-param name="original" select="'0'"/>
</xsl:apply-templates>
<xsl:apply-templates select=".">
<xsl:with-param name="original"/>
</xsl:apply-templates>
<xsl:apply-templates select="../lifetime">
<xsl:with-param name="original" select="'0'"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:for-each>
</xsl:template>
<!-- ACLs -->
<!--
If an ACL permission refers to a location constraint with multiple top-level
rules, replace the reference attribute with an xpath attribute. The xpath
attribute should match the IDs of all the new location constraints that replace
the original one.
Mirror the logic from the "rsc_location[count(rule) > 1]" template.
-->
<xsl:template match="acl_permission/@reference">
<xsl:variable name="location" select="key('location_id', .)"/>
<xsl:choose>
<xsl:when test="$location and $location[count(rule) > 1]">
<!--
This ACL refers to a constraint that is replaced by multiple new
ones. Update accordingly.
-->
<!-- Use variable as a hack to avoid parsing difficulties -->
<xsl:variable name="apos">'</xsl:variable>
<xsl:attribute name="xpath">
<xsl:value-of select="'//*['"/>
<xsl:for-each select="$location/rule">
<xsl:variable name="cons_id"
select="concat($upgrade_prefix, ../@id, '-',
position())"/>
<xsl:if test="position() > 1">
<xsl:value-of select="' or '"/>
</xsl:if>
<xsl:value-of select="concat('@id = ', $apos, $cons_id,
$apos)"/>
</xsl:for-each>
<xsl:value-of select="']'"/>
</xsl:attribute>
+
+ <xsl:attribute name="changed">1</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
diff --git a/xml/upgrade-3.10-4.xsl b/xml/upgrade-3.10-4.xsl
index 6fede8122f..a8003751aa 100644
--- a/xml/upgrade-3.10-4.xsl
+++ b/xml/upgrade-3.10-4.xsl
@@ -1,267 +1,315 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Use comments liberally as future maintainers may be unfamiliar with XSLT.
-->
<!--
upgrade-3.10-4.xsl
Guarantees after this transformation:
* There are no nagios-class or upstart-class resources. If there were any prior
to this transformation, they have been dropped.
* There are no bundle resources based on rkt containers. If there were any
prior to this transformation, they have been dropped.
* The restart-type resource meta-attribute is not present.
* The can_fail operation meta-attribute is not present.
* The role_after_failure operation meta-attribute is not present.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="upgrade-3.10-common.xsl"/>
<!-- XSLT 1.0 lacks upper-case() and lower-case() functions -->
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
<!-- Index all resource templates by ID -->
<xsl:key name="template_id" match="template" use="@id"/>
<!-- Copy everything unaltered by default -->
<xsl:template match="/|@*|node()">
<xsl:call-template name="identity"/>
</xsl:template>
<!-- Resources -->
<!-- The following XSL templates use XPath 1.0 set intersection idioms -->
<!-- Upstart-class templates -->
<xsl:variable name="dropped_templates"
select="//template
[(translate(@class, $upper, $lower) = 'nagios')
or (translate(@class, $upper, $lower) = 'upstart')]"/>
<!-- Upstart-class primitives -->
<xsl:variable name="dropped_primitives"
select="//primitive
[(translate(@class, $upper, $lower) = 'nagios')
or (translate(@class, $upper, $lower) = 'upstart')
or (@template
and (count(key('template_id', @template)
|$dropped_templates)
= count($dropped_templates)))]"/>
<!-- Groups containing only nagios- and upstart-class primitives -->
<xsl:variable name="dropped_groups"
select="//group[count(primitive|$dropped_primitives)
= count($dropped_primitives)]"/>
<!-- Clones containing only nagios- and upstart-class primitives -->
<xsl:variable name="dropped_clones"
select="//clone[count(.//primitive|$dropped_primitives)
= count($dropped_primitives)]"/>
<!-- All dropped resources -->
<xsl:variable name="dropped_resources"
select="$dropped_primitives
|$dropped_groups
|$dropped_clones
|//bundle[rkt]"/>
<!-- Drop nagios- and upstart-class resource templates -->
<xsl:template match="template">
<xsl:choose>
<xsl:when test="count(.|$dropped_templates)
= count($dropped_templates)">
<xsl:call-template name="warning">
<xsl:with-param name="msg"
select="concat('Dropping template ', @id,
' because ', @class,
' resources are no longer',
' supported')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Drop nagios- and upstart-class primitives -->
<xsl:template match="primitive">
<xsl:choose>
<xsl:when test="count(.|$dropped_primitives)
= count($dropped_primitives)">
<xsl:variable name="class"
select="@class|key('template_id', @template)/@class"/>
<xsl:call-template name="warning">
<xsl:with-param name="msg"
select="concat('Dropping resource ', @id,
' because ', $class,
' resources are no longer',
' supported')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Drop groups that would become empty -->
<xsl:template match="group">
<xsl:choose>
<xsl:when test="count(.|$dropped_groups) = count($dropped_groups)">
<xsl:call-template name="info">
<xsl:with-param name="msg"
select="concat('Dropping group ', @id,
' because it would become',
' empty')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Drop clones that would become empty -->
<xsl:template match="clone">
<xsl:choose>
<xsl:when test="count(.|$dropped_clones) = count($dropped_clones)">
<xsl:call-template name="info">
<xsl:with-param name="msg"
select="concat('Dropping clone ', @id,
' because it would become',
' empty')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Drop rkt bundles -->
<xsl:template match="bundle[rkt]">
<xsl:call-template name="warning">
<xsl:with-param name="msg"
select="concat('Dropping bundle resource ', @id,
' because rkt containers are no longer',
' supported')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:template>
<!-- Drop restart-type resource meta-attribute -->
<xsl:template match="template/meta_attributes/nvpair[@name = 'restart-type']
|primitive/meta_attributes/nvpair[@name = 'restart-type']
|group/meta_attributes/nvpair[@name = 'restart-type']
|clone/meta_attributes/nvpair[@name = 'restart-type']
|bundle/meta_attributes/nvpair[@name = 'restart-type']
|rsc_defaults/meta_attributes/nvpair
[@name = 'restart-type']">
<xsl:call-template name="warning">
<xsl:with-param name="msg"
select="concat('Dropping ', @name,
' meta-attribute from ', ../@id,
' because it is no longer supported.',
' Consider setting the "kind"',
' attribute for relevant constraints')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:template>
<!-- Drop can_fail and role_after_failure operation meta-attributes -->
<xsl:template match="op/meta_attributes/nvpair[@name = 'can_fail']
|op/meta_attributes/nvpair[@name = 'role_after_failure']
|op_defaults/meta_attributes/nvpair[@name = 'can_fail']
|op_defaults/meta_attributes/nvpair
[@name = 'role_after_failure']">
<xsl:call-template name="warning">
<xsl:with-param name="msg"
select="concat('Dropping ', @name,
' meta-attribute from ', ../@id,
' because it is no longer supported.',
' Consider setting the',
' "on-fail" operation',
' attribute instead')"/>
</xsl:call-template>
+
+ <xsl:element name="dropped"/>
</xsl:template>
<!-- Constraints -->
<!-- Drop resource refs that refer to dropped resources -->
<xsl:variable name="dropped_resource_refs"
select="//resource_ref[@id = $dropped_resources/@id]"/>
<xsl:template match="resource_ref">
- <xsl:if test="count(.|$dropped_resource_refs)
- != count($dropped_resource_refs)">
- <xsl:call-template name="identity"/>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="count(.|$dropped_resource_refs)
+ = count($dropped_resource_refs)">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="identity"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Drop resource sets that would become empty -->
<xsl:variable name="dropped_resource_sets"
select="//resource_set
[count(resource_ref|$dropped_resource_refs)
= count($dropped_resource_refs)]"/>
<xsl:template match="resource_set">
- <xsl:if test="count(.|$dropped_resource_sets)
- != count($dropped_resource_sets)">
- <xsl:call-template name="identity"/>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="count(.|$dropped_resource_sets)
+ = count($dropped_resource_sets)">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="identity"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Drop constraints that would contain no valid resource references -->
<xsl:template match="rsc_location|rsc_ticket">
<xsl:choose>
- <xsl:when test="@rsc = $dropped_resources/@id"/>
+ <xsl:when test="@rsc = $dropped_resources/@id">
+ <xsl:element name="dropped"/>
+ </xsl:when>
<!-- The constraint contained resource sets, and they're all dropped -->
<xsl:when test="resource_set
and (count(resource_set|$dropped_resource_sets)
- = count($dropped_resource_sets))"/>
+ = count($dropped_resource_sets))">
+ <xsl:element name="dropped"/>
+ </xsl:when>
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="rsc_colocation">
<xsl:choose>
- <xsl:when test="@rsc = $dropped_resources/@id"/>
- <xsl:when test="@with-rsc = $dropped_resources/@id"/>
+ <xsl:when test="@rsc = $dropped_resources/@id">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
+ <xsl:when test="@with-rsc = $dropped_resources/@id">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
<xsl:when test="resource_set
and (count(resource_set|$dropped_resource_sets)
- = count($dropped_resource_sets))"/>
+ = count($dropped_resource_sets))">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="rsc_order">
<xsl:choose>
- <xsl:when test="@first = $dropped_resources/@id"/>
- <xsl:when test="@then = $dropped_resources/@id"/>
+ <xsl:when test="@first = $dropped_resources/@id">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
+ <xsl:when test="@then = $dropped_resources/@id">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
<xsl:when test="resource_set
and (count(resource_set|$dropped_resource_sets)
- = count($dropped_resource_sets))"/>
+ = count($dropped_resource_sets))">
+ <xsl:element name="dropped"/>
+ </xsl:when>
+
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
diff --git a/xml/upgrade-3.10-99.xsl b/xml/upgrade-3.10-99.xsl
index da58a83f9d..3b8e4328c4 100644
--- a/xml/upgrade-3.10-99.xsl
+++ b/xml/upgrade-3.10-99.xsl
@@ -1,96 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Use comments liberally as future maintainers may be unfamiliar with XSLT.
-->
<!--
upgrade-3.10-99.xsl
Guarantees after this transformation:
* All attributes of type ID are unique (assuming that was the case for the
original input XML). Any elements with id-refs that were resolved in the
first step of the transformation pipeline have been converted back to
id-refs. See upgrade-3.10-common.xsl for details.
* If an acl_permission has a reference attribute, it's a valid IDREF. This was
the case before the transformation pipeline began, but element removals in
earlier stages may have invalidated some ACL permissions.
This file is numbered 99 because it must be the last stylesheet in the
pipeline. This numbering allows us to add more stylesheets without needing to
continually rename this one. When all transformation development work is
finished, we can re-number it.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="upgrade-3.10-common.xsl"/>
<!-- Index all elements by ID -->
<xsl:key name="element_id" match="*" use="@id"/>
<!-- Copy everything unaltered by default -->
<xsl:template match="/|@*|node()">
<xsl:call-template name="identity"/>
</xsl:template>
+<!--
+ Warn once per document if there exists an ACL permission with xpath and an
+ element has been dropped, changed, or created.
+ -->
+<xsl:template match="/cib
+ [//acl_permission[@xpath]
+ and (//drop|//@changed|*[not(@original = 1)])]">
+ <xsl:call-template name="warning">
+ <!--
+ Technically the ACLs are still valid but may no longer match what they
+ were intended to match.
+ -->
+ <xsl:with-param name="msg"
+ select="concat('CIB syntax changes may invalidate ACLs',
+ ' that use "xpath".',
+ ' It is strongly recommended to run',
+ ' "cibadmin --upgrade"',
+ ' and then examine the updated CIB',
+ ' carefully to ensure ACLs still match',
+ ' the desired intent.')"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="identity"/>
+</xsl:template>
+
<!--
If an element was converted from id-ref to the referenced element earlier in
the upgrade transformation pipeline, convert it back to an id-ref as described
in upgrade-3.10-common.xsl
-->
<xsl:template match="*[@id]">
<!--
Convert to an id-ref if @original is 0 or unset and
* there is any element with the same id value and original="1", or
* there is any preceding element with the same id value
The preceding axis doesn't include ancestors. While it would likely be
nonsense to reference an ancestor, it is allowed by the schema.
The idea for the second point is that if all elements with a given id value
have original set to "0" or unset, the first one should remain a definition
while the rest become references.
-->
<xsl:choose>
<xsl:when test="not(number(@original))
and (//*[(@id = current()/@id) and number(@original)]
or preceding::*[@id = current()/@id]
or ancestor::*[@id = current()/@id])">
<xsl:copy>
<xsl:attribute name="id-ref">
<xsl:value-of select="@id"/>
</xsl:attribute>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="identity"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+<!-- Drop "dropped" elements and "changed" attributes -->
+<xsl:template match="//dropped|//@changed"/>
+
<!-- Drop "original" attribute -->
<xsl:template match="@original"/>
<!-- ACLs -->
<!--
"Drop" ACL permissions that refer to a nonexistent element ID.
Rather than truly dropping the permission, we replace its reference attribute
with an xpath attribute whose value ("/*[false()]") doesn't match anything.
This avoids dependency chains in which one ACL permission refers to the ID of
another ACL permission that is also removed at this stage.
-->
<xsl:template match="acl_permission
[@reference and not(key('element_id', @reference))]
/@reference">
<xsl:attribute name="xpath">
<xsl:value-of select="'/*[false()]'"/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
diff --git a/xml/upgrade-3.10-common.xsl b/xml/upgrade-3.10-common.xsl
index 7eb2f19f5c..ae298c51b1 100644
--- a/xml/upgrade-3.10-common.xsl
+++ b/xml/upgrade-3.10-common.xsl
@@ -1,141 +1,147 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Use comments liberally as future maintainers may be unfamiliar with XSLT.
-->
<!--
upgrade-3.10-common.xsl
This stylesheet is intended to be imported by all other stylesheets in the
upgrade-3.10-* pipeline. It provides variables and templates that are used by
multiple stylesheets.
This file should not contain any templates with a match attribute.
Assumptions:
* The input XML validates against the pacemaker-3.10.rng schema.
* No element of the input XML contains an id attribute whose value begins with
"pcmk__3_10_upgrade-". This allows us to generate new IDs without fear of
conflict. However, the schema does not enforce this assumption.
* For attributes of type IDREF, the referenced element is of the correct type.
For example, the rsc attribute in a constraint refers to a resource element
(primitive, group, clone, bundle). The schema cannot enforce this assumption;
it requires only that each IDREF refer to a valid ID. As a result, the result
of our transformation pipeline may fail to validate if IDREFs refer to
unexpected element types.
+ Notes:
+ * A "dropped" element should always be inserted as a replacement when dropping
+ an element. A "changed" attribute should always be set to 1 when changing any
+ of an element's attributes. These are used at the end of the transformation
+ pipeline to output a conditional warning, and they are then stripped.
+
@TODO Try to clean up IDREFs to unexpected element types when the referenced
elements are removed.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Strip whitespace-only text nodes but indent output -->
<xsl:strip-space elements="*"/>
<xsl:output encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
<!-- Prefix for auto-generated IDs -->
<xsl:variable name="upgrade_prefix" select="'pcmk__3_10_upgrade-'"/>
<!--
Modified identity transformation. Copy everything unaltered by default, but set
the "original" attribute based on the "original" template param.
"original" is a temporary attribute to indicate that an element existed in the
input XML. It's not allowed by the schema for any element, so we don't have to
worry about conflicts.
The first step in the upgrade pipeline is to resolve id-ref attributes (type
IDREF) to id attributes (type ID). We do this as follows. For each element with
an id-ref attribute, replace that element with a deep copy of the referenced
element. Set the "original" attribute to 0 in the copy.
At the end of the upgrade pipeline, we convert back to references as follows.
For each element with an id attribute and with the "original" attribute either
unset or set to 0:
* If there is another element with the same id value that either occurs before
the current element or has original="1", convert the current element back to
a reference with only the id-ref attribute.
* Otherwise, drop the "original" attribute and leave the rest of the current
element's attributes and descendants unchanged (except for converting
descendants back to references if needed).
Notes:
* We resolve all attributes named id-ref (which are of type IDREF). We do not
resolve all attributes of type IDREF. We resolve only in the places where
either a definition (with id) or a reference (with id-ref) would validate
against the pacemaker-3.10 schema (ignoring ID uniqueness requirements after
resolution).
* If the "original" attribute is unset for an element, the end of the
transformation pipeline treats the element as if it had original="0".
* By default, if the "original" param is set, then it's passed down with the
same value for all descendants.
-->
<!--
Identity transformation, optionally setting the "original" attribute
Params:
* original: Boolean (1/0) indicating whether an element was part of the
original input XML. If set and this is an element node, the param
is used as the value for the "original" attribute for this element
and its descendants.
-->
<xsl:template name="identity">
<xsl:param name="original"/>
<xsl:copy>
<!-- All existing attributes -->
<xsl:apply-templates select="@*"/>
<xsl:if test="self::* and $original">
<!-- Set "original" attribute for element nodes -->
<xsl:attribute name="original">
<xsl:value-of select="$original"/>
</xsl:attribute>
</xsl:if>
<!-- All nodes, passing down $original value recursively -->
<xsl:apply-templates select="node()">
<xsl:with-param name="original" select="$original"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<!--
Outputs a warning message
Output a message with the prefix "WARNING: ". This directs Pacemaker's XSLT
error handler to strip the prefix and log the message at warning level.
Params:
* msg: Message to output
-->
<xsl:template name="warning">
<xsl:param name="msg"/>
<xsl:message>
<xsl:value-of select="concat('WARNING: ', $msg)"/>
</xsl:message>
</xsl:template>
<!--
Outputs an info message
Output a message with the prefix "INFO: ". This directs Pacemaker's XSLT error
handler to strip the prefix and log the message at info level.
Params:
* msg: Message to output
-->
<xsl:template name="info">
<xsl:param name="msg"/>
<xsl:message>
<xsl:value-of select="concat('INFO: ', $msg)"/>
</xsl:message>
</xsl:template>
</xsl:stylesheet>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Jun 25, 4:03 AM (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1952085
Default Alt Text
(200 KB)
Attached To
Mode
rP Pacemaker
Attached
Detach File
Event Timeline
Log In to Comment