Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause:
The user runs the "pcs resource update" command on changing no meta attributes on a resource with no defined meta attributes.
Consequence:
An empty meta_attributes element is created in the CIB for the resource.
Fix:
Do not create an empty meta_attributes element on resource update.
Result:
An empty meta_attributes element is not created during "pcs resource update"
Description of problem:
"pcs resource update" always creates a meta-attributes element in a resource being updated even if no meta-attributes are being added for the resource. This leads to crm_diff reporting a change of adding en empty meta-attributes element. When the output of crm_diff is used to figure out if there have been any changes in the CIB, this may lead to wrong assumption that a change have happened. However, from pacemaker point of view, adding an empty meta-attributes element is a noop. The solution here is not to create an empty meta-attributes element in pcs.
Version-Release number of selected component (if applicable):
pcs-0.9.162-5.el7_5.1
How reproducible:
always, easily
Steps to Reproduce:
1. pcs resource create dummy ocf:pacemaker:Dummy
2. check that no meta-attributes element exists
pcs cluster cib | grep -A 10 -m 1 'id="dummy"'
<primitive class="ocf" id="dummy" provider="pacemaker" type="Dummy">
<operations>
<op id="dummy-migrate_from-interval-0s" interval="0s" name="migrate_from" timeout="20"/>
<op id="dummy-migrate_to-interval-0s" interval="0s" name="migrate_to" timeout="20"/>
<op id="dummy-monitor-interval-10" interval="10" name="monitor" timeout="20"/>
<op id="dummy-reload-interval-0s" interval="0s" name="reload" timeout="20"/>
<op id="dummy-start-interval-0s" interval="0s" name="start" timeout="20"/>
<op id="dummy-stop-interval-0s" interval="0s" name="stop" timeout="20"/>
</operations>
</primitive>
</resources>
3. pcs resource update dummy fake=test
4. check the meta-attributes again
Actual results:
an empty meta-attributes element has been created
pcs cluster cib | grep -A 15 -m 1 'id="dummy"'
<primitive class="ocf" id="dummy" provider="pacemaker" type="Dummy">
<operations>
<op id="dummy-migrate_from-interval-0s" interval="0s" name="migrate_from" timeout="20"/>
<op id="dummy-migrate_to-interval-0s" interval="0s" name="migrate_to" timeout="20"/>
<op id="dummy-monitor-interval-10" interval="10" name="monitor" timeout="20"/>
<op id="dummy-reload-interval-0s" interval="0s" name="reload" timeout="20"/>
<op id="dummy-start-interval-0s" interval="0s" name="start" timeout="20"/>
<op id="dummy-stop-interval-0s" interval="0s" name="stop" timeout="20"/>
</operations>
<instance_attributes id="dummy-instance_attributes">
<nvpair id="dummy-instance_attributes-fake" name="fake" value="test"/>
</instance_attributes>
<meta_attributes id="dummy-meta_attributes"/>
</primitive>
</resources>
<constraints/>
Expected results:
no empty meta-attributes element has been created
Comment 8Jan Pokorný [poki]
2018-07-17 07:08:17 UTC
See also [bug 1598197 comment 6] for why doing the pruning part
(note this bug deals with just a tiny fraction of where it is in
fact applicable) and overall "canonicalization" of the modification
outcomes is important to keep the (possibibly accumulated) bit rot
away. (That's also what CIB 2 -> 3 upgrade process autonomously
triggers for the parts it effectively touches in the course of the
upgrade, per [comment 3]).
Therefore might be worth (eventually) reviewing other similar parts
as well.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:3066
Description of problem: "pcs resource update" always creates a meta-attributes element in a resource being updated even if no meta-attributes are being added for the resource. This leads to crm_diff reporting a change of adding en empty meta-attributes element. When the output of crm_diff is used to figure out if there have been any changes in the CIB, this may lead to wrong assumption that a change have happened. However, from pacemaker point of view, adding an empty meta-attributes element is a noop. The solution here is not to create an empty meta-attributes element in pcs. Version-Release number of selected component (if applicable): pcs-0.9.162-5.el7_5.1 How reproducible: always, easily Steps to Reproduce: 1. pcs resource create dummy ocf:pacemaker:Dummy 2. check that no meta-attributes element exists pcs cluster cib | grep -A 10 -m 1 'id="dummy"' <primitive class="ocf" id="dummy" provider="pacemaker" type="Dummy"> <operations> <op id="dummy-migrate_from-interval-0s" interval="0s" name="migrate_from" timeout="20"/> <op id="dummy-migrate_to-interval-0s" interval="0s" name="migrate_to" timeout="20"/> <op id="dummy-monitor-interval-10" interval="10" name="monitor" timeout="20"/> <op id="dummy-reload-interval-0s" interval="0s" name="reload" timeout="20"/> <op id="dummy-start-interval-0s" interval="0s" name="start" timeout="20"/> <op id="dummy-stop-interval-0s" interval="0s" name="stop" timeout="20"/> </operations> </primitive> </resources> 3. pcs resource update dummy fake=test 4. check the meta-attributes again Actual results: an empty meta-attributes element has been created pcs cluster cib | grep -A 15 -m 1 'id="dummy"' <primitive class="ocf" id="dummy" provider="pacemaker" type="Dummy"> <operations> <op id="dummy-migrate_from-interval-0s" interval="0s" name="migrate_from" timeout="20"/> <op id="dummy-migrate_to-interval-0s" interval="0s" name="migrate_to" timeout="20"/> <op id="dummy-monitor-interval-10" interval="10" name="monitor" timeout="20"/> <op id="dummy-reload-interval-0s" interval="0s" name="reload" timeout="20"/> <op id="dummy-start-interval-0s" interval="0s" name="start" timeout="20"/> <op id="dummy-stop-interval-0s" interval="0s" name="stop" timeout="20"/> </operations> <instance_attributes id="dummy-instance_attributes"> <nvpair id="dummy-instance_attributes-fake" name="fake" value="test"/> </instance_attributes> <meta_attributes id="dummy-meta_attributes"/> </primitive> </resources> <constraints/> Expected results: no empty meta-attributes element has been created