waitip doesn't seem to wait for an IP
Michael Aldridge
Mon Jan 18 11:38:32 2021
I was recently debugging a problem with the metadata provider in
linuxkit and was able to track it down to the machine not having an IPv4
address, but having an IPv6 address. I was quite surprised by this, as
the config file provided to dhcpcd includes 'waitip 4' at the bottom
[1]. I figured perhaps because the --nobackground and -1 options were
also being passed this might interfere with the config file, so I passed
--waitip=4 to the task and rebooted. Again I observed that an IPv6
address was obtained and not an IPv4 one. I have since had success by
completely turning off IPv6 support in the boot-time one-shot service by
passing -4 to the command arguments, but this feels like a hack.
Is waitip not what I should be using here? It seems like what I want
from the man page, but dhcpcd is for sure not waiting on an IP in this
configuration, so I wonder if this isn't right. If this turns out to be
a bug I'm happy to writeup a more detailed inventory of how dhcpcd is
configured.
[1] https://github.com/linuxkit/linuxkit/blob/master/pkg/dhcpcd/dhcpcd.conf
Archive administrator: postmaster@marples.name