dex4er / nss-docker

NSS module for finding Docker containers
GNU Lesser General Public License v2.1
42 stars 14 forks source link

Random failures (not exhausting socket input) #2

Closed ctrochalakis closed 7 years ago

ctrochalakis commented 7 years ago

Hello & thank you for nss-docker,

I was getting random resolve failures (~ 1 in 10 requests). After a bit of debugging I traced it down to the read() call on the API socket. The current code performs a single read() instead of exhausting the socket data. So, if the response is split in more than one batch, and the ip address is not in that first batch, the resolution fails.

cristoper commented 6 years ago

I'm using release 0.02 from the Debian repositories and this bug has been giving me a headache. Thank you for tracking it down and fixing it, @ctrochalakis!

@dex4er, any plans to update the Debian package? (Installing from git in the mean time is no problem.)