Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for IPv6 functionality #174

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mcipperly
Copy link

I wrote a test for PR #138 which adds IPv6 support ( #137 )

@mcipperly mcipperly force-pushed the ipv6test branch 6 times, most recently from c5cfd18 to 3e2c2e6 Compare April 21, 2021 18:14
@coveralls
Copy link

coveralls commented Apr 21, 2021

Coverage Status

Coverage decreased (-0.8%) to 99.215% when pulling a1017fa on mcipperly:ipv6test into ace80f4 on fluent:master.

@mcipperly
Copy link
Author

Apologies for the spam, my git is rusty and I haven't built on another PR previously!

Travis doesn't seem to support IPv6 (more info here and here ) so I did add a condition to skip in that case. Unfortunately this causes the IPv6 code to still not be covered through CI testing infrastructure - open to thoughts on how to address if this isn't workable.

@kenhys
Copy link

kenhys commented Apr 22, 2021

@mcipperly could you rebase tihis pull request?

valentin benozillo and others added 2 commits April 22, 2021 10:29
Signed-off-by: Matt Cipperly <mcipperly@fb.com>
Signed-off-by: Matt Cipperly <mcipperly@fb.com>
socket.SOCK_STREAM)
else:
sock = socket.socket(socket.AF_INET6,
socket.SOCK_STREAM)
sock.settimeout(self.timeout)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need to call _is_ipv4_host() in every _make_packet?
It may be able to reuse checked status.

Signed-off-by: Matt Cipperly <mcipperly@fb.com>
Signed-off-by: Matt Cipperly <mcipperly@fb.com>
@mcipperly
Copy link
Author

Updated to address the above re: not wanting to determine v4/v6 capability each time. Now:

  • When we connect, save address family
  • If we fail to connect in the future, reset address family and try to figure it out again - this could address issues in long-running applications where the target fluent system loses its IPv4 or IPv6 address during runtime

Also added the prefer_ipv6 option which can be set to True to prefer IPv6 and fall back to IPv4

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.

None yet

3 participants