20735: Workaround nginx/glibc/docker issue.
authorTom Clegg <tom@curii.com>
Wed, 16 Aug 2023 13:04:18 +0000 (09:04 -0400)
committerTom Clegg <tom@curii.com>
Wed, 16 Aug 2023 13:04:18 +0000 (09:04 -0400)
commit1a2caf782dfd63a963094cd4b2bce5f5e7bfb7ef
treed4e7795126ed6551e46e84e3e7cbd7a0eaf8aa9d
parent997887766267651908396c7906c7a0cd6e38f796
20735: Workaround nginx/glibc/docker issue.

Docker writes both "::1 localhost" and "127.0.0.1 localhost" in
/etc/hosts even when not enabling IPv6 [1], causing glibc to resolve
"localhost" to two identical IP addresses 127.0.0.1 and 127.0.0.1 [2],
causing nginx to error out on "listen localhost:45123;" [3]:

[emerg] a duplicate listen 127.0.0.1:45123 in /tmp/nginx.conf:29

[1] https://github.com/moby/moby/issues/35954#issuecomment-498406618
("you should be testing with IPv6 enabled")

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=14969 (open since
2012-12-17)

[2] https://trac.nginx.org/nginx/ticket/2400 (workaround added
2022-11-23)

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
lib/boot/cmd.go