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.
Bug 1135913 - cibadmin writes the CIB to disk even if the CIB was not changed when using CIB_file
Summary: cibadmin writes the CIB to disk even if the CIB was not changed when using CI...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pacemaker
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew Beekhof
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-01 07:34 UTC by Tomas Jelinek
Modified: 2015-03-05 10:00 UTC (History)
6 users (show)

Fixed In Version: pacemaker-1.1.12-4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:00:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0440 0 normal SHIPPED_LIVE pacemaker bug fix and enhancement update 2015-03-05 14:37:57 UTC

Description Tomas Jelinek 2014-09-01 07:34:57 UTC
Description of problem:
When specifying the cib file location using the environment variable CIB_file, cibadmin writes the cib to disk even if the cib has not been changed e.g. on --query command.

Version-Release number of selected component (if applicable):
pacemaker-1.1.10-29.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. dump cib to a file
# pcs cluster cib /root/mycib.xml

2. check the time
# ls -l /root/mycib.xml
-rw------- 1 root root 9778 Aug 29 14:34 /root/mycib.xml
# head -n 1 /root/mycib.xml
<cib admin_epoch="0" cib-last-written="Fri Aug 29 14:34:23 2014" crm_feature_set="3.0.7" epoch="6439" have-quorum="1" num_updates="3" update-client="cibadmin" update-origin="rh70-node1" validate-with="pacemaker-1.2" dc-uuid="1">

3. get the content of the cib using CIB_file
# CIB_file=/root/mycib.xml cibadmin -Ql
<cib admin_epoch="0" cib-last-written="Fri Aug 29 14:34:23 2014" crm_feature_set="3.0.7" epoch="6439" have-quorum="1" num_updates="3" update-client="cibadmin" update-origin="rh70-node1" validate-with="pacemaker-1.2" dc-uuid="1">
{output truncated}

4. check the time again to see that it has been changed
# ls -l /root/mycib.xml
-rw------- 1 root root 9778 Aug 29 14:35 /root/mycib.xml
# head -n 1 /root/mycib.xml
<cib admin_epoch="0" cib-last-written="Fri Aug 29 14:35:34 2014" crm_feature_set="3.0.7" epoch="6439" have-quorum="1" num_updates="3" update-client="cibadmin" update-origin="rh70-node1" validate-with="pacemaker-1.2" dc-uuid="1"> 

Actual results:
Querying the cib overwrites the cib file.

Expected results:
Cibadmin should not overwrite the cib file nor update it in any way when cib has not been changed / a read-only operation has been requested.

Comment 2 Andrew Beekhof 2014-09-02 07:34:04 UTC
Upstream fix:
   https://github.com/beekhof/pacemaker/commit/31e24ca

    Fix: cib: Do not update on disk backups if we're just querying them
    
    Previously users of CIB_file would see their files' last-written
    attribute updated, thus invalidating the saved digest.

We'll pick it up in the rebase

Comment 4 Andrew Beekhof 2015-01-07 04:00:15 UTC
Hmm, looks like the flags wouldn't allow it to be added

Comment 7 michal novacek 2015-01-08 13:44:09 UTC
I have verified that cibfile is not updated when requiring only read-only
action with pacemaker-1.1.12-15.el7.x86_64

-----

[root@virt-071 ~]# date 
Thu Jan 8 14:33:27 CET 2015

[root@virt-071 ~]# pcs cluster cib /tmp/a.xml && date
Thu Jan 8 14:33:42 CET 2015

[root@virt-071 ~]# head -n 1 /tmp/a.xml 
<cib admin_epoch="0" cib-last-written="Mon Jan  5 16:23:30 2015" crm_feature_set="3.0.9" dc-uuid="2" epoch="43" have-quorum="1" num_updates="26" validate-with="pacemaker-2.2">

[root@virt-071 ~]# CIB_file=/tmp/a.xml cibadmin -Ql | head -n 1
<cib admin_epoch="0" cib-last-written="Mon Jan  5 16:23:30 2015" crm_feature_set="3.0.9" dc-uuid="2" epoch="43" have-quorum="1" num_updates="26" validate-with="pacemaker-2.2">

[root@virt-071 ~]# date 
Thu Jan 8 14:35:01 CET 2015

[root@virt-071 ~]# ls -l /tmp/a.xml 
-rw-r--r--. 1 root root 48904 Jan 8 14:33 /tmp/a.xml

[root@virt-071 ~]# head -n 1 /tmp/a.xml 
<cib admin_epoch="0" cib-last-written="Mon Jan  5 16:23:30 2015" crm_feature_set="3.0.9" dc-uuid="2" epoch="43" have-quorum="1" num_updates="26" validate-with="pacemaker-2.2">

[root@virt-071 ~]# rpm -q pacemaker
pacemaker-1.1.12-15.el7.x86_64

Comment 9 errata-xmlrpc 2015-03-05 10:00:21 UTC
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://rhn.redhat.com/errata/RHBA-2015-0440.html


Note You need to log in before you can comment on or make changes to this bug.