fluent-logger-python icon indicating copy to clipboard operation
fluent-logger-python copied to clipboard

Add compatibility for Ipv6 address

Open koolok opened this issue 7 years ago • 10 comments

Fixes: #137

Currently the library does not support Ipv6 as host adress. To make it compatible with Ipv6 I added a function that check if host is Ipv6 and if the address is Ipv6 we can connect to Ipv6 socket otherwise we can fallback to Ipv4 socket.

koolok avatar Apr 24 '18 15:04 koolok

This doesn't work which is indicated by the build not passing, obviously. IPv6 support doesn't just include IPv6 address string, but also support for AAAA records of a hostname.

arcivanov avatar Apr 24 '18 22:04 arcivanov

@arcivanov I tried to check if the host use IPv6, even if the host is FQDN by using socket.getaddrinfo. But the tests are still failing so can you please explain your comment https://github.com/fluent/fluent-logger-python/pull/138#pullrequestreview-114983247

koolok avatar Apr 25 '18 09:04 koolok

@arcivanov Can you please have a look on the changes and tell me whats exactly is wrong with the logic. Actualy I need this feature, any help will be appreciated.

koolok avatar May 02 '18 08:05 koolok

Coverage Status

Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.

coveralls avatar May 03 '18 12:05 coveralls

Coverage Status

Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.

coveralls avatar May 03 '18 12:05 coveralls

Coverage Status

Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.

coveralls avatar May 03 '18 12:05 coveralls

Coverage Status

Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.

coveralls avatar May 03 '18 12:05 coveralls

Coverage Status

Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.

coveralls avatar May 03 '18 12:05 coveralls

Please write the unit tests to ensure both paths are covered and I'll merge this.

https://coveralls.io/builds/16815534/source?filename=fluent%2Fsender.py#L129

arcivanov avatar May 03 '18 15:05 arcivanov

Hi Guys, when you are going to merge this fix?

ananalaghbar avatar Apr 04 '22 08:04 ananalaghbar