Bug 1590533
Summary: | 'pcs cluster setup' not accepting hostnames with upper case characters | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Tim Quinlan <tquinlan> | ||||
Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
Severity: | low | Docs Contact: | Steven J. Levine <slevine> | ||||
Priority: | medium | ||||||
Version: | 7.5 | CC: | abeekhof, cfeist, cluster-maint, idevat, jpokorny, kgaillot, omular, pzimek, rcyriac, rsteiger, tojeline, troy.engel | ||||
Target Milestone: | rc | Keywords: | Regression | ||||
Target Release: | 7.5 | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | pcs-0.9.165-1.el7 | Doc Type: | Bug Fix | ||||
Doc Text: |
PCS is able to find a token and connect to a node with upper case characters in its node name
Previously, PCS was unable to find a token for any node name with upper case characters, and it would report an error that the node is not authenticated. This occurred because the `pcs cluster auth` command would lowercase all node names before storing them to the PCS token file. With this fix, PCS does not lowercase node names before storing them to the PCS token file.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-10-30 08:06:06 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: | |||||||
Attachments: |
|
Description
Tim Quinlan
2018-06-12 19:23:19 UTC
Reassigning to check whether it's in pcs itself first It's not necessary to file a separate bz for 7.5.z; if one is required, we can set a flag on this one and it will be created automatically once approved I confirm this is a pcs issue. The `pcs cluster auth` command changes node names to lower case when parsing command line arguments. Other pcs commands keep the case untouched. Pcs is then unable to get a token for nodes with upper case letters. The easiest fix might be to lowercase a node name / address when getting its token. I think complaining about hostnames not conforming to DNS scheme
would be in order so as to prevent any future issues (note that
interpreting non-ASCII byte sequences is a subject of how the
environment is configured!).
Per hostname(5):
> The hostname may be a free-form string up to 64 characters in
> length; however, it is recommended that it consists only of 7-bit
> ASCII lower-case characters and no spaces or dots, and limits itself
> to the format allowed for DNS domain name labels, even though this
> is not a strict requirement.
Created attachment 1451933 [details] proposed fix This got broken in upstream commit https://github.com/ClusterLabs/pcs/commit/a0ad8f1eff38ae587adf9be07727998103256c2d Since that commit, node addresses passed to the 'pcs cluster auth' command were parsed to split them to an address and a port. During this process, addresses were lowercased. These lowercased addresses were then stored into pcsd token file. As a result, pcs was not able to get a token for node addresses with upper case characters and therefore was unable to connect to such nodes. This patch restores the previous behavior. After Fix: [ant ~] $ rpm -q pcs pcs-snmp pcs-0.9.165-1.el7.x86_64 pcs-snmp-0.9.165-1.el7.x86_64 [ant ~] $ pcs cluster auth ANT BEE Username: hacluster Password: ANT: Authorized BEE: Authorized [ant ~] $ pcs cluster setup --name=zoo ANT BEE --start Destroying cluster on nodes: ANT, BEE... ANT: Stopping Cluster (pacemaker)... BEE: Stopping Cluster (pacemaker)... ANT: Successfully destroyed cluster BEE: Successfully destroyed cluster Sending 'pacemaker_remote authkey' to 'ANT', 'BEE' ANT: successful distribution of the file 'pacemaker_remote authkey' BEE: successful distribution of the file 'pacemaker_remote authkey' Sending cluster config files to the nodes... ANT: Succeeded BEE: Succeeded Starting cluster on nodes: ANT, BEE... ANT: Starting Cluster (corosync)... BEE: Starting Cluster (corosync)... BEE: Starting Cluster (pacemaker)... ANT: Starting Cluster (pacemaker)... Synchronizing pcsd certificates on nodes ANT, BEE... ANT: Success BEE: Success Restarting pcsd on the nodes in order to reload the certificates... ANT: Success BEE: Success 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://access.redhat.com/errata/RHBA-2018:3066 |