Skip to content

Commit

Permalink
[dhcpcd] Drop fallback to ipv4ll and increase wait time to 180s
Browse files Browse the repository at this point in the history
With the switch to dhcpcd in [1] we are hitting random
issues in our jobs where dhcp server takes some time to
be ready while cirros just use ipv4ll address and don't
retry. With udhcpc it was not the case, also it used
to retry 3 times every 60 seconds before giving up.

Currently it immediately forks to background as it
detects interface do not have carrier acquired, and
continues other operations like metadata fetch to configure
ssh keys but since dhcp ip and routes not configured
for metadata, metadata fetch also fails.

Added -w option with timeout of 180s similar to udhcpc, this
will make it to wait for ip for 180s before forking to background
and continuing with other operations like metadata fetch.

[1] ded54d
Related-Bug: https://bugs.launchpad.net/neutron/+bug/2045549
  • Loading branch information
karelyatin committed Jul 19, 2024
1 parent 46a1162 commit 1e051a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/init.d/S40network
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ case "$1" in
start)
printf "Starting network: "
/sbin/ifup lo
/sbin/dhcpcd
/sbin/dhcpcd --noipv4ll -w -t 180
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
Expand Down

0 comments on commit 1e051a2

Please sign in to comment.