Bug 1620043

Summary: unable to change cluster name
Product: Red Hat Enterprise Linux 9 Reporter: Patrik Hagara <phagara>
Component: pcsAssignee: Miroslav Lisik <mlisik>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact: Steven J. Levine <slevine>
Priority: medium    
Version: 9.0CC: cfeist, cluster-maint, idevat, mlisik, mmazoure, mpospisi, omular, slevine, tojeline
Target Milestone: rcKeywords: Reopened, Triaged
Target Release: 9.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.11.4-1.el9 Doc Type: Bug Fix
Doc Text:
.`pcs` no longer allows you to modify cluster properties that should not be changed Previously, the `pcs` command line interface allowed you to modify cluster properties that should not be changed or for which change does not take effect. With this fix, `pcs` no longer allows you to modify these cluster properties: `cluster-infrastructure`, `cluster-name`, `dc-version`, `have-watchdog`, and `last-lrm-refresh`.
Story Points: ---
Clone Of:
: 2112263 (view as bug list) Environment:
Last Closed: 2023-05-09 07:18:23 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 Patrik Hagara 2018-08-22 09:34:59 UTC
Description of problem:
It is not possible to change the name of a cluster via "pcs property".


Version-Release number of selected component (if applicable):
> [root@virt-154 ~]# rpm -q pcs pacemaker
> pcs-0.9.165-4.el7.x86_64
> pacemaker-1.1.19-7.el7.x86_64


How reproducible:
always


Steps to Reproduce:

> [root@virt-154 ~]# pcs property 
> Cluster Properties:
>  cluster-infrastructure: corosync
>  cluster-name: STSRHTS13416
>  dc-version: 1.1.19-7.el7-c3c624ea3d
>  have-watchdog: false


Actual results:

> [root@virt-154 ~]# pcs property set cluster-name=new-name
> Error: unknown cluster property: 'cluster-name', (use --force to override)
> [root@virt-154 ~]# pcs property set --force cluster-name=new-name
> [root@virt-154 ~]# pcs property
> Cluster Properties:
>  cluster-infrastructure: corosync
>  cluster-name: new-name
>  dc-version: 1.1.19-7.el7-c3c624ea3d
>  have-watchdog: false
>  stonith-enabled: false
> [root@virt-154 ~]# pcs status
> Cluster name: STSRHTS13416
> ...

Cluster name does not change, even with --force. Additionally, "pcs property" reports wrong (new) value for cluster-name property after a forceful set, while the actual cluster name remains unchanged.


Expected results:
no error, cluster name changed

Additional info:

Comment 2 Tomas Jelinek 2018-08-22 10:44:46 UTC
Cluster name is defined in corosync.conf so it makes sense to me it is not possible to change it in pacemaker. Details of why pacemaker actually allows the cluster-name CIB property to be changed and what impact that may have would have to be provided by pacemaker team.

Is this an RFE to add possibility to rename clusters?

Comment 3 Patrik Hagara 2018-08-22 11:10:59 UTC
As a user, I would expect this to be possible, since you actually do specify cluster name to pcs when creating the cluster (with "pcs cluster setup") and seeing the cluster-name property in the output of "pcs property" only reinforces this expectation.

Given your comment, I would consider this an UX RFE with four possible solutions (in order of preference):
  1) allowing the cluster name to be properly changed with "pcs property set cluster-name=..." (and also implementing the solution below for other properties)
  2) somehow marking immutable properties in "pcs property" output and showing a better error message when a modification is attempted (this would also apply to other properties, eg. dc-version)
  3) printing a hint to make the change in corosync.conf when user attempts to set it via "pcs property set cluster-name=..." (retaining the error message and exit code > 0)
  4) completely removing cluster-name from "pcs property" output

What do you think?

Comment 4 Jan Pokorný [poki] 2018-08-22 11:49:12 UTC
Note that in otherwise discouraged scenarios, the symmetric
cryptography key at corosync level might be derived from
the cluster name corosync/cman was aware of.  At least in RHEL 6
and with CMAN, changing cluster name deliberately might break
the running cluster, so better to recheck the consequences of
changing that value first.

Related: [bug 1173346]

Comment 7 RHEL Program Management 2021-02-15 07:41:49 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 10 Miroslav Lisik 2022-11-16 15:37:01 UTC
Upstream commit: https://github.com/ClusterLabs/pcs/commit/f51fdd340147b72c6099864f649cfbbe5f4051d4
Updated commands:
  * pcs property set
  * pcs property unset

It is not possible to modify specific pacemaker cluster properties: "cluster-infrastructure", "cluster-name", "dc-version", "have-watchdog","last-lrm-refresh".

Test:

[root@r9-node-01 ~]# pcs property set cluster-name=NewName
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concurrent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout', 'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stonith-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transition-delay'
Error: Errors have occurred, therefore pcs is unable to continue

[root@r9-node-01 ~]# pcs property set cluster-name=NewName --force
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concurrent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout', 'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stonith-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transition-delay'
Error: Errors have occurred, therefore pcs is unable to continue

[root@r9-node-01 ~]# pcs property config cluster-name
Cluster Properties:
 cluster-name: HACluster

[root@r9-node-01 ~]# pcs property unset cluster-name
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concurrent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout', 'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stonith-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transition-delay'
Error: Errors have occurred, therefore pcs is unable to continue

[root@r9-node-01 ~]# pcs property unset cluster-name --force
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concurrent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout', 'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stonith-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transition-delay'
Error: Errors have occurred, therefore pcs is unable to continue

Comment 11 Michal Pospisil 2022-11-24 12:18:35 UTC
DevTestResults:

[root@r09-02-a ~]# rpm -q pcs
pcs-0.11.4-1.el9.x86_64

[root@r09-02-a ~]# pcs property set cluster-name=NewName
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concur
rent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout',
'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-
health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-
after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stoni
th-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transit
ion-delay'
Error: Errors have occurred, therefore pcs is unable to continue

[root@r09-02-a ~]# pcs property set cluster-name=NewName --force
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concur
rent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout',
'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-
health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-
after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stoni
th-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transit
ion-delay'
Error: Errors have occurred, therefore pcs is unable to continue

[root@r09-02-a ~]# pcs property config cluster-name
Cluster Properties:
cluster-name: onenode

[root@r09-02-a ~]# pcs property unset cluster-name
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concur
rent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout',
'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-
health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-
after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stoni
th-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transit
ion-delay'
Error: Errors have occurred, therefore pcs is unable to continue

[root@r09-02-a ~]# pcs property unset cluster-name --force
Error: invalid cluster property option 'cluster-name', allowed options are: 'batch-limit', 'cluster-delay', 'cluster-ipc-limit', 'cluster-recheck-interval', 'concur
rent-fencing', 'dc-deadtime', 'election-timeout', 'enable-acl', 'enable-startup-probes', 'fence-reaction', 'join-finalization-timeout', 'join-integration-timeout',
'load-threshold', 'maintenance-mode', 'migration-limit', 'no-quorum-policy', 'node-action-limit', 'node-health-base', 'node-health-green', 'node-health-red', 'node-
health-strategy', 'node-health-yellow', 'pe-error-series-max', 'pe-input-series-max', 'pe-warn-series-max', 'placement-strategy', 'priority-fencing-delay', 'remove-
after-stop', 'shutdown-escalation', 'shutdown-lock', 'shutdown-lock-limit', 'start-failure-is-fatal', 'startup-fencing', 'stonith-action', 'stonith-enabled', 'stoni
th-max-attempts', 'stonith-timeout', 'stonith-watchdog-timeout', 'stop-all-resources', 'stop-orphan-actions', 'stop-orphan-resources', 'symmetric-cluster', 'transit
ion-delay'
Error: Errors have occurred, therefore pcs is unable to continue

[root@r09-02-a ~]# pcs property config cluster-name
Cluster Properties:
cluster-name: onenode

Comment 15 Michal Mazourek 2022-12-09 15:52:23 UTC
The same test as in bz2112263 comment 6 was used on RHEL9 system with pcs-0.11.4-1.el9 to verify this bz.
Marking as VERIFIED.

Comment 18 errata-xmlrpc 2023-05-09 07:18:23 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 (pcs bug fix and enhancement update), 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-2023:2151