cloud-init-nonet does not wait for dhcp

Bug #861866 reported by James E. Blair
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Scott Moser
cloud-init (Ubuntu)
Fix Released
Medium
Scott Moser

Bug Description

cloud-init-nonet only waites for an interface to be listed in the state file. But it could take a while to get an address. 60 seconds is not uncommon when waiting for DHCP (especially on a network with spanning tree).

Tags: server-o-rs

Related branches

Revision history for this message
Scott Moser (smoser) wrote :

At the moment, cloud-init waits 60 seconds and gives up and goes on.

This is probably lower than it could be. We picked the reasonably low number for the case where someone installed cloud-init on their server to avoid it blocking their boot.

At this point, after bug 838968 and bug 847782, if they're misconfigured they're waiting at least 2 minutes for boot.
So I think it makes sense to double cloud-init's timeout to be 120 seconds also.

Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
importance: Undecided → Medium
status: New → Triaged
Changed in cloud-init (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Scott Moser (smoser)
milestone: none → ubuntu-11.10
tags: added: server-o-rs
Revision history for this message
Scott Moser (smoser) wrote :

I am curious, though, you actually have "cloud" instances that take 60 seconds for a dhcp to come up? That is a *huge* portion of general "time to use".

Revision history for this message
James E. Blair (corvus) wrote :

It waits 60 seconds for something other than "lo" to appear in /var/run/network/ifstate. That doesn't actually correlate with an interface having a working address. ifup brings the interface up, and writes out that file, then runs dhclient3. On a network with STP, you could be looking at 60 seconds before the switch starts forwarding traffic, and however long the DHCP server takes to respond after that before you have a working network.

But because cloud-init-nonet only checks to see if the ifstate file is updated, it exits immediately.

No, I don't have "cloud" instance that takes that long, however cloud-init is being used by juju for orchestra deployments now. This is running on bare metal.

Revision history for this message
Scott Moser (smoser) wrote : Re: [Bug 861866] Re: cloud-init-nonet does not wait for dhcp

On Thu, 29 Sep 2011, James E. Blair wrote:

> But because cloud-init-nonet only checks to see if the ifstate file is
> updated, it exits immediately.

That is no longer the case. cloud-init now waits for the
static-network-up event. That event will only occur after the dhcp
receives an address (oneiric).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.6.1-0ubuntu21

---------------
cloud-init (0.6.1-0ubuntu21) oneiric; urgency=low

  * increase cloud-init-nonet timeout to 130 seconds from 70 (LP: #861866)
 -- Scott Moser <email address hidden> Wed, 28 Sep 2011 21:03:30 -0400

Changed in cloud-init (Ubuntu):
status: Triaged → Fix Released
Scott Moser (smoser)
Changed in cloud-init:
status: Triaged → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.