Skip to content

[5.0] fix IPv4 vs IPv6 mismatch in gelf_test#2288

Merged
spoonincode merged 1 commit intorelease/5.0from
gelf_localhost_50
Mar 12, 2024
Merged

[5.0] fix IPv4 vs IPv6 mismatch in gelf_test#2288
spoonincode merged 1 commit intorelease/5.0from
gelf_localhost_50

Conversation

@spoonincode
Copy link
Contributor

gelf_test.py listens on 127.0.0.1,

leap/tests/gelf_test.py

Lines 71 to 74 in aef4329

def gelfServer(stop):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(1)
s.bind((TestHelper.LOCAL_HOST, GELF_PORT))

but then configured its logging.json to use localhost. In 5.0, gelf will use IPv6 and on by box localhost will resolve to ::1 thus this test would fail locally for me since the gelf messages wouldn't arrive on the expected address.

Explicitly configure 127.0.0.1 in logging.json so it's always IPv4->IPv4

@ericpassmore
Copy link
Contributor

Note:start
group: STABILITY
category: TEST
summary: Fix tests to use IPv4 for loopback.
Note:end

@spoonincode spoonincode merged commit c301152 into release/5.0 Mar 12, 2024
@spoonincode spoonincode deleted the gelf_localhost_50 branch March 12, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants