mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't ip_bracket addresses returned by check_dns.
This ends up in opts['master_ip'] where it can cause problems. I found this while testng a git+pip based minion installation on Ubuntu Bionic. I'm not sure why it doesn't affect other targeted OS versions in the test framework. On Bionic, if 'salt' resolves to an IPv6 address, zmq fails to connect to the master, and complains about the bracketed address.
This commit is contained in:
parent
02b825ec3c
commit
24bb94fb9e
1 changed files with 2 additions and 2 deletions
|
@ -1886,14 +1886,14 @@ def dns_check(addr, port, safe=False, ipv6=None):
|
|||
if h[0] == socket.AF_INET6 and ipv6 is False:
|
||||
continue
|
||||
|
||||
candidate_addr = salt.utils.zeromq.ip_bracket(h[4][0])
|
||||
candidate_addr = h[4][0]
|
||||
|
||||
if h[0] != socket.AF_INET6 or ipv6 is not None:
|
||||
candidates.append(candidate_addr)
|
||||
|
||||
try:
|
||||
s = socket.socket(h[0], socket.SOCK_STREAM)
|
||||
s.connect((candidate_addr.strip('[]'), port))
|
||||
s.connect((candidate_addr), port))
|
||||
s.close()
|
||||
|
||||
resolved = candidate_addr
|
||||
|
|
Loading…
Add table
Reference in a new issue