Snappy waits 2 minutes while booting if eth0 is not connected
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Snappy |
High
|
Unassigned | ||
Bug Description
Ubuntu core 5 ships /etc/network/
"auto eth0" should be removed from /etc/network/
Related branches
- John Lenton: Approve on 2015-09-30
-
Diff: 25 lines (+2/-2)2 files modifiedsnappy/firstboot.go (+1/-1)
snappy/firstboot_test.go (+1/-1)
| Simon Eisenmann (longsleep) wrote : | #1 |
| John Lenton (chipaca) wrote : | #2 |
To reproduce with kvm, using the bog standard 15.04.5:
kvm -net none -device pcnet -snapshot -m 2048 15.04.5.img
you can then hit ctrl-alt-3 to watch the serial console for the fun.
Note also it doesn't happen with 15.04.4.
| Changed in snappy: | |
| status: | New → Confirmed |
| importance: | Undecided → High |
| Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1498631] Re: Snappy waits 2 minutes while booting if eth0 is not connected | #3 |
If there is no networking information provided to snappy on boot (think
cloud-init or another mechanism) then we should look at the physical
interfaces to see which have link, and only try to DHCP on those.
Mark
| Oliver Grawert (ogra) wrote : | #4 |
isnt that what the "allow-hotplug eth0" line usually does ?
"auto eth0" should only be used for static interfaces (if at all) i think and allow-hotplug for everything else instead (afaik the kernel will only emit the hotplug uevent if there is a link)
| Mark Shuttleworth (sabdfl) wrote : | #5 |
On 23/09/15 11:35, Oliver Grawert wrote:
> isnt that what the "allow-hotplug eth0" line usually does ?
>
> "auto eth0" should only be used for static interfaces (if at all) i
> think and allow-hotplug for everything else instead (afaik the kernel
> will only emit the hotplug uevent if there is a link)
If there's a mechanism that does what we need, perfect :) But let's
generate the ENI based on the hardware we actually see, not guess that
there's an eth0.
Mark
| Simon Eisenmann (longsleep) wrote : | #6 |
Yes the "allow-hotplug eth0" line should be sufficient. Note that if eth0 is not there then it also does not wait. It only waits if there is eth0 but not connected.
| Michael Vogt (mvo) wrote : | #7 |
@Mark: the name of the network hardware is looked up as part of the firstboot job, we do not hardcode "eth0" anymore.
As for the content of the file:
"""
allow-hotplug eth0
iface eth0 inet dhcp
"""
but now its:
"""
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
"""
This will need fixing.
| Michael Vogt (mvo) wrote : | #8 |
We should also consider how we transition existing systems that are affected by the bug.
| Changed in snappy: | |
| milestone: | none → 15.04.4 |
| status: | Confirmed → In Progress |
| Mark Shuttleworth (sabdfl) wrote : | #9 |
You guys rock. Thank you!
| Simon Eisenmann (longsleep) wrote : | #10 |
I just tested a fresh image with ubuntu-core 6 and it no longer blocks on boot when eth0 is not connected. Though it still constantly tries DHCP on eth0 even if it is not connected.
Like Mark mentioned, DHCP should only be tried if there is a physical link.
| Simon Eisenmann (longsleep) wrote : | #11 |
After discussion on IRC i added the DHCP issue separate: https:/
| Changed in snappy: | |
| status: | In Progress → Fix Released |


As per request on IRC this happens with my armhf image for ODROID-C.
Image was built with
sudo ubuntu-device-flash core \ 0.3_all. snap \ odroidc_ 0.5.tar. xz \ 15.04-stable. img \
--channel stable \
--oem odroidc_
--device-part device-
--developer-mode \
-o odroidc-
15.04
Resulting in ubuntu@ odroid: ~$ snappy list
(ODROIDC)
Name Date Version Developer
ubuntu-core 2015-09-17 5 ubuntu
odroidc 2015-09-19 0.3 sideload
If you want to reproduce you find all the gear and information on https:/ /github. com/longsleep/ snappy- odroidc or can download the image, oem snap or device tarball from https:/ /www.stdin. xyz/downloads/ snappy/ odroidc/ 20150919/