mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
Merge PR #34180 into master
* refs/pull/34180/head: cephadm: Fix check_ip_port to work with IPv6 Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
b2aede193e
@ -366,6 +366,8 @@ def check_ip_port(ip, port):
|
||||
logger.info('Verifying IP %s port %d ...' % (ip, port))
|
||||
if ip.startswith('[') or '::' in ip:
|
||||
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
|
||||
if ip.startswith('[') and ip.endswith(']'):
|
||||
ip = ip[1:-1]
|
||||
else:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user