Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Mar 2009 13:09:34 -0500
From:      Brooks Davis <brooks@freebsd.org>
To:        Mike Makonnen <mmakonnen@gmail.com>
Cc:        andrew-freebsd@areilly.bpc-users.org, Brooks Davis <brooks@freebsd.org>, astrodog@gmail.com, usb@freebsd.org, freebsd-current@freebsd.org, Garrett Cooper <yanefbsd@gmail.com>
Subject:   Re: The rc.d mess strikes back
Message-ID:  <20090308180934.GA9147@lor.one-eyed-alien.net>
In-Reply-To: <49B397A4.8090508@gmail.com>
References:  <2fd864e0903020512i22b2c31fg487aaf37fed6398b@mail.gmail.com> <20090302.132522.-432836388.imp@bsdimp.com> <20090302233215.GA53763@duncan.reilly.home> <20090302.181513.1973603215.imp@bsdimp.com> <584bfc3f0903030833k70405609q7e2d3b28c8cf4c29@mail.gmail.com> <20090303180307.GA11134@lor.one-eyed-alien.net> <584bfc3f0903032212x25831c5bi35d9b637c1896e1d@mail.gmail.com> <7d6fde3d0903040004y1fcbb086i355cd0113717620b@mail.gmail.com> <20090304164953.GB1209@lor.one-eyed-alien.net> <49B397A4.8090508@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--ibTvN161/egqYuK8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 08, 2009 at 01:02:12PM +0300, Mike Makonnen wrote:
> Brooks Davis wrote:
>> On Wed, Mar 04, 2009 at 12:04:06AM -0800, Garrett Cooper wrote:
>>> On Tue, Mar 3, 2009 at 10:12 PM, Mike Telahun Makonnen
>>> <mmakonnen@gmail.com> wrote:
>>>> On Tue, Mar 3, 2009 at 9:03 PM, Brooks Davis <brooks@freebsd.org> wrot=
e:
>>>>> I don't have much time to debug this, but I've not had problems with
>>>>> services starting too early on the systems I've been running with asy=
nc
>>>>> dhcp. ?If there is a problem with the wait process we need to actually
>>>>> debug it. ?If the wait for a route/running interface isn't sufficent =
we
>>>>> should try to figure out what is. ?Synchronous dhcp sucks and yeilds
>>>>> justifed user complaints so it would be nice to kill it off. ?I switc=
hed
>>>>> the default because it worked for me and I hoped that people would he=
lp
>>>>> find and fix edge cases.
>>>> Can you elaborate why synchronous DHCP sucks ?
>>> The only reason I could see is bringup time. Am I correct in this assum=
ption?
>>=20
>> If you use synchronous DHCP then every interface that wants to try to
>> get a DHCP address if it has link needs to run through the full link
>> timeout at boot.  On a laptop this is annoying and generally pointless.
>=20
> Ok, I just turned synchronous dhclient on locally and I see what you
> mean.
>=20
>> The changes to defaultroute to wait for a default route to be set mean
>> that you consolidate the wait in one location and you don't waste time
>> starting dhclient on interfaces until a link exists (or an association
>> is made for wlan devices).
>=20
> OK, so that means that it's not just waiting for the default route, but
> it's also waiting for the link on any DHCP interfaces to come up as
> well. That's what confused me. When it's plugged in my NIC's link is
> always up by the time rc.d gets to the default route, so I didn't see
> the point in waiting the extra 30sec when it wasn't plugged in. The
> comments also seemed to imply that we should be checking whether the
> link is up.
>=20
> Anyways, given that synchronous dhclient re-introduces the same problem
> I was trying to fix in the first place I'll just back the whole thing out=
=20
> until we can come up with a better fix. Do you mind if I change the timeo=
ut=20
> to 15sec. (instead of 30s)?

15 is probably a bit short in practice for wpa networks.  Someone a
while back suggested that there's some reason (perhaps spanning tree,
but I can't remember) why it it should be closer to 50sec for maximum
reliability.  One thing I've thought of adding is changing the sleeps to
"read -t1", checking for a non-timeout result and adding "Press return
to skip".  Another option would be for each interface to set a minimum
timeout based on it's type such as having WPA interfaces set it to 30
and others set it to 15.

-- Brooks

--ibTvN161/egqYuK8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iD8DBQFJtAndXY6L6fI4GtQRAqNkAKDLodO2GYwJCapCMRlQtQ04Hg+1kQCff/s/
Kom2CpzErZS19OtbyfvtGGw=
=Rk/w
-----END PGP SIGNATURE-----

--ibTvN161/egqYuK8--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090308180934.GA9147>