Bug 2040420
| Summary: | Enabling sbd before starting the cluster sets an incorrect `validate-with` value in /var/lib/pacemaker/cib/cib.xml | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Tomas Jelinek <tojeline> |
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> |
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 9.0 | CC: | cluster-maint, cluster-qe, cnewsom, idevat, kmalyjur, mlisik, mmazoure, mpospisi, nhostako, omular, svalasti, tojeline, troy.engel |
| Target Milestone: | rc | Keywords: | EasyFix, Regression, Triaged |
| Target Release: | 9.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | pcs-0.11.1-8.el9 | Doc Type: | Bug Fix |
| Doc Text: |
Cause:
User sets up a cluster without starting it, then they set up SBD and then they start the cluster.
Consequence:
Pcs creates a default empty CIB in Pacemaker 1.x format. Various pcs commands or their options do not work, until the CIB is manually upgraded to Pacemaker 2.x format.
Fix:
Make pcs create an empty CIB in Pacemaker 2.x format.
Result:
Pcs works with no need to upgrade CIB manually.
|
Story Points: | --- |
| Clone Of: | 2022463 | Environment: | |
| Last Closed: | 2022-05-17 12:19:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Tomas Jelinek
2022-01-13 16:46:07 UTC
Upstream fix + tests: https://github.com/ClusterLabs/pcs/commit/2b9562296e4f42d31544459d44097c2145005b67 Reproducer / test in comment 0 DevTestResults:
[root@r90-node-01 ~]# rpm -q pcs
pcs-0.11.1-8.el9.x86_64
[root@r90-node-01 ~]# pcs host auth -u hacluster -p password r90-node-0{1..2}
r90-node-01: Authorized
r90-node-02: Authorized
[root@r90-node-01 ~]# pcs cluster setup HACLuster r90-node-0{1..2}
No addresses specified for host 'r90-node-01', using 'r90-node-01'
No addresses specified for host 'r90-node-02', using 'r90-node-02'
Destroying cluster on hosts: 'r90-node-01', 'r90-node-02'...
r90-node-01: Successfully destroyed cluster
r90-node-02: Successfully destroyed cluster
Requesting remove 'pcsd settings' from 'r90-node-01', 'r90-node-02'
r90-node-01: successful removal of the file 'pcsd settings'
r90-node-02: successful removal of the file 'pcsd settings'
Sending 'corosync authkey', 'pacemaker authkey' to 'r90-node-01', 'r90-node-02'
r90-node-01: successful distribution of the file 'corosync authkey'
r90-node-01: successful distribution of the file 'pacemaker authkey'
r90-node-02: successful distribution of the file 'corosync authkey'
r90-node-02: successful distribution of the file 'pacemaker authkey'
Sending 'corosync.conf' to 'r90-node-01', 'r90-node-02'
r90-node-01: successful distribution of the file 'corosync.conf'
r90-node-02: successful distribution of the file 'corosync.conf'
Cluster has been successfully set up.
[root@r90-node-01 ~]# ls -l /var/lib/pacemaker/cib/
total 0
[root@r90-node-01 ~]# pcs stonith sbd enable
Running SBD pre-enabling checks...
r90-node-01: SBD pre-enabling checks done
r90-node-02: SBD pre-enabling checks done
Warning: auto_tie_breaker quorum option will be enabled to make SBD fencing effective. Cluster has to be offline to be able to make this change.
Checking corosync is not running on nodes...
r90-node-02: corosync is not running
r90-node-01: corosync is not running
Sending updated corosync.conf to nodes...
r90-node-01: Succeeded
r90-node-02: Succeeded
Distributing SBD config...
r90-node-01: SBD config saved
r90-node-02: SBD config saved
Enabling sbd...
r90-node-01: sbd enabled
r90-node-02: sbd enabled
Warning: Cluster restart is required in order to apply these changes.
[root@r90-node-01 ~]# ls -l /var/lib/pacemaker/cib/
total 16
-rw-r--r--. 1 hacluster haclient 278 Jan 14 15:51 cib-0.raw
-rw-r-----. 1 hacluster haclient 1 Jan 14 15:51 cib.last
-rw-------. 1 hacluster haclient 307 Jan 14 15:51 cib.xml
-rw-------. 1 hacluster haclient 32 Jan 14 15:51 cib.xml.sig
[root@r90-node-01 ~]# grep validate-with /var/lib/pacemaker/cib/cib.xml
<cib admin_epoch="0" epoch="2" num_updates="0" validate-with="pacemaker-3.1" cib-last-written="Fri Jan 14 15:51:43 2022">
[root@r90-node-01 ~]# pcs cluster start --all
r90-node-01: Starting Cluster...
r90-node-02: Starting Cluster...
[root@r90-node-01 ~]# pcs cluster cib | grep validate-with
<cib admin_epoch="0" epoch="3" num_updates="0" validate-with="pacemaker-3.1" cib-last-written="Fri Jan 14 15:52:18 2022" update-origin="r90-node-01" update-client="crmd" update-user="hacluster">
[root@r90-node-01 ~]# pcs alert create path=/var/lib/pacemaker/alert_file.sh id=test_alert
[root@r90-node-01 ~]# echo $?
0
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 (new packages: pcs), 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-2022:2290 |