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 1397408 - CIB upgrade does not check what version is possible to upgrade to clusterwise
Summary: CIB upgrade does not check what version is possible to upgrade to clusterwise
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs
Version: 6.8
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1389443
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-22 13:26 UTC by Ivan Devat
Modified: 2017-03-21 11:04 UTC (History)
8 users (show)

Fixed In Version: pcs-0.9.155-2.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1389443
Environment:
Last Closed: 2017-03-21 11:04:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (24.65 KB, patch)
2016-11-22 13:47 UTC, Ivan Devat
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0707 0 normal SHIPPED_LIVE pcs bug fix update 2017-03-21 12:40:33 UTC

Description Ivan Devat 2016-11-22 13:26:17 UTC
+++ This bug was initially created as a clone of Bug #1389443 +++

This is based on the discussion in bz1305130.

How the CIB upgrade process works in pacemaker:
1. Pacemaker keeps track of what pacemaker version is running on each node.
2. Pacemaker elects the DC in such a way that DC is always the node with the oldest pacemaker version in a cluster.
3. When the "cibadmin --upgrade" command is run, the request is sent to the DC.
4. DC bumps the CIB schema version to the newest version supported by that very DC and tells other nodes about the change.
5. As a result, the CIB never gets upgraded to a schema version which is not supported by all nodes.

If the CIB upgrade is requested on a file, then there is no communication in a cluster. CIB schema version simply gets bumped to the newest version supported by that particular node.


When moving to the new pcs architecture, the CIB upgrade process was moved to the pcs library. In order to get rid of the side effect, we switched the live CIB upgrade to file-based CIB upgrade. That way we bypass all the checking done in pacemaker (see steps 1-5 above).

What we need to do is switch back to the live upgrade (unless -f was specified on the command line) to ensure the correct upgrade procedure is used and deal with the resulting side effect.

--- Additional comment from Tomas Jelinek on 2016-11-09 08:42 EST ---

Test:

1) Setup:
- Have a cluster with no pacemaker alerts support (RHEL7.2).
- Upgrade pcs and pacemaker on one node to RHEL7.3 version with alerts support.
[root@rh72-node1:~]# rpm -q pcs
pcs-0.9.152-10.el7.x86_64
[root@rh72-node1:~]# rpm -q pacemaker
pacemaker-1.1.15-11.el7.x86_64
[root@rh72-node2:~]# rpm -q pacemaker
pacemaker-1.1.13-10.el7.x86_64
[root@rh72-node3:~]# rpm -q pacemaker
pacemaker-1.1.13-10.el7.x86_64

[root@rh72-node1:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"
[root@rh72-node2:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"
[root@rh72-node3:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"


2) Before fix:
[root@rh72-node1:~]# pcs alert create path=/some/path
CIB has been upgraded to the latest schema version.
[root@rh72-node1:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.5"
[root@rh72-node2:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"
[root@rh72-node3:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"


3) After fix:
[root@rh72-node1:~]# pcs alert create path=/some/path
Error: Upgrading of CIB to the latest schema failed: Call cib_upgrade failed (-62): Timer expired
[root@rh72-node1:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"
[root@rh72-node2:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"
[root@rh72-node3:~]# pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.3"

Note pacemaker 1.1.13 exits with an error (timer expired) if current CIB schema version matches the latest available version. This is fixed in newer builds of pacemaker. It does not have any effect on pcs bug / behavior other than pcs printing different error message instead of saying the CIB is already at the newest schema available.


Only "pcs alert" and "pcs acl" commands are affected. The bug is in the new pcs library which other commands do not use yet. Acls require schema version 2.0 which is quite old so the bug may not manifest there.

The bug was introduced in pcs-0.9.152-3.el7.

Comment 2 Ivan Devat 2016-11-22 13:47:47 UTC
Created attachment 1222736 [details]
proposed fix

Comment 3 Ivan Devat 2016-11-25 10:54:19 UTC
Setup:

> Have cluster with enough old pacemaker.

[vm-rhel67-1 ~] $ rpm -q pacemaker
pacemaker-1.1.12-8.el6.x86_64
[vm-rhel67-1 ~] $ pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.0"

[vm-rhel67-2 ~] $ rpm -q pacemaker
pacemaker-1.1.12-8.el6.x86_64
[vm-rhel67-2 ~] $ pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.0"

> Upgrade pacemaker on one node.

[vm-rhel67-1 ~] $ rpm -q pacemaker
pacemaker-1.1.15-3.el6.x86_64


Before Fix:

[vm-rhel67-1 ~] $ rpm -q pcs
pcs-0.9.155-1.el6.x86_64

[vm-rhel67-1 ~] $ pcs alert create path=/some/path
CIB has been upgraded to the latest schema version.
[vm-rhel67-1 ~] $ pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.5"

[vm-rhel67-2 ~] $ pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.0"


After Fix:

[vm-rhel67-1 ~] $ rpm -q pcs
pcs-0.9.155-2.el6.x86_64

[vm-rhel67-1 ~] $ pcs alert create path=/some/path
Error: Upgrading of CIB to the latest schema failed: Call cib_upgrade failed (-62): Timer expired
[vm-rhel67-1 ~] $ pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.0"

[vm-rhel67-2 ~] $ pcs cluster cib | tr ' ' '\n' | grep validate-with
validate-with="pacemaker-2.0"

Comment 7 errata-xmlrpc 2017-03-21 11:04:57 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-2017-0707.html


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