Bug 1722140

Summary: Improve error message for 'pcs cluster node add' in case when adding node which is already part of another cluster configuration
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Lisik <mlisik>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED NOTABUG QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.7CC: cfeist, cluster-maint, idevat, omular, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-27 09:29:57 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 Miroslav Lisik 2019-06-19 14:20:08 UTC
Description of problem:

Error message was improved in bz1474747 for case when cluster setup use node which is already part of another cluster configuration. Same improvement can be used for 'pcs cluster node add' command as it was in bz1596050.

Version-Release number of selected component (if applicable):

pcs-0.9.167-2.el7

How reproducible:

always

Steps to Reproduce:

1. Setup two cluster A an B
2. Try to add node to cluster A from cluster B
3. See the error message

Actual results:

# pcs cluster node add virt-205
Error: Unable to add 'virt-205' to cluster: node is already in a cluster

Expected results:

Inform that you can force operation and that you should remove node from its current cluster e.g.:


Error: Unable to add 'virt-205' to cluster: node is already in a cluster, use --force to override. WARNING: This will destroy existing cluster on the nodes. You should remove the nodes from their clusters instead to keep the clusters working properly.


Additional info:

Error message from cluster setup:

# pcs cluster setup --name NewCluster virt-423 virt-424 virt-205
Error: virt-205: node is already in a cluster
Error: nodes availability check failed, use --force to override. WARNING: This will destroy existing cluster on the nodes. You should remove the nodes from their clusters instead to keep the clusters working properly.

Comment 2 Tomas Jelinek 2019-06-27 09:29:57 UTC
In RHEL 7 it is not possible to enforce adding a node which is already part of another cluster. Considering we are in the late state of RHEL 7, this will not change. Since the "pcs cluster node add" command does not advice to use --force, there is no error message to be fixed in the same respect as error messages for "cluster setup" command in RHEL 7 and RHEL8 and "cluster node add" command in RHEL 8 have been fixed.

If you disagree, feel free to express your concerns and we will consider reopening the bz.