Support IPv6 with zuul_stream
It is possible the IP address passed into zuul_stream is IPv6. Switch to using socket.create_connection as it will resolve both ipv4 / ipv6. Change-Id: I4a4fc5e9d49b66851cc4e5806670b8ee70fa9012 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
2463f3c19e
commit
974fe0ddbc
|
@ -134,10 +134,9 @@ class CallbackModule(default.CallbackModule):
|
|||
def _read_log(self, host, ip, log_id, task_name, hosts):
|
||||
self._log("[%s] Starting to log %s for task %s"
|
||||
% (host, log_id, task_name), job=False, executor=True)
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
while True:
|
||||
try:
|
||||
s.connect((ip, LOG_STREAM_PORT))
|
||||
s = socket.create_connection((ip, LOG_STREAM_PORT))
|
||||
except Exception:
|
||||
self._log("[%s] Waiting on logger" % host,
|
||||
executor=True, debug=True)
|
||||
|
|
Loading…
Reference in New Issue