Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1451933 Details for
Bug 1590533
'pcs cluster setup' not accepting hostnames with upper case characters
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed fix
do-not-lowercase-addresses-in-pcs-cluster-auth.patch (text/plain), 3.08 KB, created by
Tomas Jelinek
on 2018-06-15 13:52:17 UTC
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Tomas Jelinek
Created:
2018-06-15 13:52:17 UTC
Size:
3.08 KB
patch
obsolete
>From 30b59f3b4b7f9ed3af9010163c2715aaffb0a1de Mon Sep 17 00:00:00 2001 >From: Tomas Jelinek <tojeline@redhat.com> >Date: Fri, 15 Jun 2018 15:22:29 +0200 >Subject: [PATCH] do not lowercase addresses in 'pcs cluster auth' > >--- > CHANGELOG.md | 3 +++ > pcs/cluster.py | 38 ++++++++++++++++++++++++-------------- > 2 files changed, 27 insertions(+), 14 deletions(-) > >diff --git a/CHANGELOG.md b/CHANGELOG.md >index 485f48c0..3edb7e29 100644 >--- a/CHANGELOG.md >+++ b/CHANGELOG.md >@@ -25,6 +25,8 @@ > - Improve `pcs quorum device add` usage and man page ([rhbz#1476862]) > - `pcs resource failcount show` works correctly with pacemaker-1.1.18 and newer > ([rhbz#1588667]) >+- Do not lowercase node addresses in the `pcs cluster auth` command >+ ([rhbz#1590533]) > > ### Changed > - Watchdog devices are validated against a list provided by sbd >@@ -42,6 +44,7 @@ > [rhbz#1579911]: https://bugzilla.redhat.com/show_bug.cgi?id=1579911 > [rhbz#1581150]: https://bugzilla.redhat.com/show_bug.cgi?id=1581150 > [rhbz#1588667]: https://bugzilla.redhat.com/show_bug.cgi?id=1588667 >+[rhbz#1590533]: https://bugzilla.redhat.com/show_bug.cgi?id=1590533 > > > ## [0.9.164] - 2018-04-09 >diff --git a/pcs/cluster.py b/pcs/cluster.py >index ec891784..af7b4630 100644 >--- a/pcs/cluster.py >+++ b/pcs/cluster.py >@@ -22,13 +22,6 @@ except ImportError: > # python3 > from subprocess import getstatusoutput > >-try: >- # python2 >- from urlparse import urlparse >-except ImportError: >- # python3 >- from urllib.parse import urlparse >- > from pcs import ( > constraint, > node, >@@ -321,17 +314,34 @@ def parse_nodes_with_ports(node_list): > if node.count(":") > 1 and not node.startswith("["): > # if IPv6 without port put it in parentheses > node = "[{0}]".format(node) >- # adding protocol so urlparse will parse hostname/ip and port correctly >- url = urlparse("http://{0}".format(node)) >- if url.hostname in result and result[url.hostname] != url.port: >+ hostname, port =_split_addr_port(node) >+ if hostname in result and result[hostname] != port: > raise CmdLineInputError( >- "Node '{0}' defined twice with different ports".format( >- url.hostname >- ) >+ "Node '{0}' defined twice with different ports".format(hostname) > ) >- result[url.hostname] = url.port >+ result[hostname] = port > return result > >+def _split_addr_port(host_port): >+ # urrlib code without .lower() >+ host_port = host_port.strip() >+ if ( >+ ("[" in host_port and "]" not in host_port) >+ or >+ ("]" in host_port and "[" not in host_port) >+ ): >+ raise CmdLineInputError("Invalid IPv6 address '{}'".format(host_port)) >+ >+ _, have_open_br, bracketed = host_port.partition('[') >+ if have_open_br: >+ hostname, _, port = bracketed.partition(']') >+ _, _, port = port.partition(':') >+ else: >+ hostname, _, port = host_port.partition(':') >+ if not port: >+ port = None >+ return hostname, port >+ > > def cluster_certkey(argv): > return pcsd.pcsd_certkey(argv) >-- >2.11.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1590533
: 1451933