diff options
author | Ian Wienand <iwienand@redhat.com> | 2022-09-07 08:44:40 +1000 |
---|---|---|
committer | Ian Wienand <iwienand@redhat.com> | 2022-09-07 10:48:25 +1000 |
commit | 78050adb51b34ebcae22a9cf5dbf7fcefb71badd (patch) | |
tree | d3144fcba290d399499d38fc900e8e73910865eb /zuul | |
parent | 34543b8ac55348bc7d55f465231d6f9ca7aded3d (diff) | |
download | zuul-78050adb51b34ebcae22a9cf5dbf7fcefb71badd.tar.gz |
zuul_stream : Use !127.0.0.1 for loopback
This is a follow-on to Ia78ad9e3ec51bc47bf68c9ff38c0fcd16ba2e728 to
use a different loopback address for the local connection to the
Python 2.7 container. This way, we don't have to override the
existing localhost/127.0.0.1 matches that avoid the executor trying to
talk to a zuul_console daemon. These bits are removed.
The comment around the port settings is updated while we're here.
Change-Id: I33b2198baba13ea348052e998b1a5a362c165479
Diffstat (limited to 'zuul')
-rw-r--r-- | zuul/ansible/base/callback/zuul_stream.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/zuul/ansible/base/callback/zuul_stream.py b/zuul/ansible/base/callback/zuul_stream.py index 740f48114..0f92449d6 100644 --- a/zuul/ansible/base/callback/zuul_stream.py +++ b/zuul/ansible/base/callback/zuul_stream.py @@ -47,10 +47,12 @@ from zuul.ansible import paths from zuul.ansible import logconfig -LOG_STREAM_PORT = int(os.environ.get("ZUUL_CONSOLE_PORT", 19885)) LOG_STREAM_VERSION = 0 -# -LOG_STREAM_LOCALHOST = int(os.environ.get("ZUUL_CONSOLE_STREAM_LOCALHOST", 0)) + +# This is intended to be only used for testing where we change the +# port so we can run another instance that doesn't conflict with one +# setup by the test environment +LOG_STREAM_PORT = int(os.environ.get("ZUUL_CONSOLE_PORT", 19885)) def zuul_filter_result(result): @@ -321,15 +323,13 @@ class CallbackModule(default.CallbackModule): hosts = self._get_task_hosts(task) for host, inventory_hostname in hosts: port = LOG_STREAM_PORT - if (host in ('localhost', '127.0.0.1') and - not LOG_STREAM_LOCALHOST): + if (host in ('localhost', '127.0.0.1')): # Don't try to stream from localhost continue ip = play_vars[host].get( 'ansible_host', play_vars[host].get( 'ansible_inventory_host')) - if (ip in ('localhost', '127.0.0.1') and - not LOG_STREAM_LOCALHOST): + if (ip in ('localhost', '127.0.0.1')): # Don't try to stream from localhost continue if play_vars[host].get('ansible_connection') in ('winrm',): |