lxc / distrobuilder

System container image builder for LXC and Incus
https://linuxcontainers.org
Apache License 2.0
575 stars 166 forks source link

centos/7/cloud startup taking a long time due to Unable to obtain IPv6 DHCP address #407

Closed kimfaint closed 3 years ago

kimfaint commented 3 years ago

I launch a centos/7/cloud image each morning at 05:00 UTC. Starting today it was taking over 1 minute for the systemd startup to complete. The delay seemed to be errors obtaining IPv6 DHCP address. I have reproduced this on the lxd tryit server:

root@tryit-generous:~# lxc launch images:centos/7/cloud fluffy                                                         
Creating fluffy                                                                                                        
Starting fluffy
root@tryit-generous:~# lxc exec fluffy -- journalctl -f
-- Logs begin at Wed 2021-03-17 06:39:09 UTC, end at Wed 2021-03-17 06:40:17 UTC. --                                   
Mar 17 06:39:09 fluffy systemd-journal[63]: Runtime journal is using 8.0M (max allowed 196.5M, trying to leave 294.8M free of 1.9G available → current limit 196.5M).                                                                         
Mar 17 06:39:09 fluffy systemd-journal[63]: Journal started
...
Mar 17 06:39:43 fluffy dhclient[317]: RCV: Advertise message on eth0 from fe80::216:3eff:fee7:7fc0.                    
Mar 17 06:39:43 fluffy dhclient[317]: message status code NoAddrsAvail: "no addresses available"                       
Mar 17 06:40:14 fluffy dhclient[317]: Max retransmission duration exceeded.                                            
Mar 17 06:40:14 fluffy network[118]: Determining IPv6 information for eth0... failed.                                  
Mar 17 06:40:14 fluffy network[118]: WARN      : [/etc/sysconfig/network-scripts/ifup-eth] Unable to obtain IPv6 DHCP address eth0.                                                                                                           
Mar 17 06:40:14 fluffy /etc/sysconfig/network-scripts/ifup-eth[339]: Unable to obtain IPv6 DHCP address eth0.          
Mar 17 06:40:14 fluffy network[118]: [  OK  ]
...
Mar 17 06:40:17 fluffy systemd[1]: Reached target Cloud-init target.                                                   
Mar 17 06:40:17 fluffy systemd[1]: Startup finished in 1min 8.735s. 

Full journal: journal.txt

I've switched my project to using the centos/7 (non cloud-init) image, which doesn't have this issue:

root@tryit-generous:~# lxc launch images:centos/7 nofluff
Creating nofluff                                                                                                       
Starting nofluff       
root@tryit-generous:~# lxc launch images:centos/7 nofluff
...
Mar 17 06:54:06 nofluff systemd[1]: Startup finished in 3.311s.
root@tryit-generous:~# lxc ls -c ns46                                                                                  
+---------+---------+---------------------+-----------------------------------------+                                  
|  NAME   |  STATE  |        IPV4         |                  IPV6                   |                                  
+---------+---------+---------------------+-----------------------------------------+                                  
| fluffy  | RUNNING | 10.255.25.18 (eth0) |                                         |                                  
+---------+---------+---------------------+-----------------------------------------+                                  
| nofluff | RUNNING | 10.15.93.196 (eth0) | 2602:fd23:8:f:216:3eff:fe9e:4b1c (eth0) |                                  
+---------+---------+---------------------+-----------------------------------------+   
monstermunchkin commented 3 years ago

Thanks for reporting this issue. This was likely caused by an update we did yesterday. This fixes it: https://github.com/lxc/lxc-ci/pull/259.

monstermunchkin commented 3 years ago

I'm closing this as it's been fixed.

kimfaint commented 3 years ago

Awesome. Thanks so much!