Re: svn commit: r190031 - head/etc/defaults

2009-04-24 Thread Brooks Davis
On Sat, Apr 25, 2009 at 01:47:53AM +0400, Dmitry Marakasov wrote:
> * Brooks Davis (bro...@freebsd.org) wrote:
> 
> So, any comments on this? Should I submit the PR?

Please do submit a pr.  I think we should actually change the link check
for a check if there are dhcp interfaces marked up and add a press-any
key to skip option for laptop users on the plane.  The carrier check is
bogus because negotiation can take quite a while with some devices as in
your case.  People who don't want to wait should probably set the delay
to 0.

-- Brooks


pgpBDpXCoWmHi.pgp
Description: PGP signature


Re: svn commit: r190031 - head/etc/defaults

2009-04-24 Thread Dmitry Marakasov
* Brooks Davis (bro...@freebsd.org) wrote:

So, any comments on this? Should I submit the PR?

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ruhttp://www.amdmi3.ru
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r190031 - head/etc/defaults

2009-04-10 Thread Dmitry Marakasov
* Brooks Davis (bro...@freebsd.org) wrote:

> > I use ale(4). Will test some more. Couldn't the fact that the interface
> > is renamed be the reason?
> 
> Shouldn't be.  I use renamed interfaces a fair bit.  The ale(4) driver
> uses mii, but so lack of link events shouldn't be an issue unless the
> driver is buggy.
> 
> > Also, how is the issue of services not starting because of no default
> > route/dns/network available solved when running dhclient from devd?
> 
> The wait in /etc/rc.d/defaultroute.

OK, an hour of reboots and I've nailed it. The cause is that by the time
defaultroute is executed, there's no link on the interface -> wait for
route is skipped (see defaultroute_start).

Some lines from dmesg:

ale0:  port 0xdc00-0xdc7f mem 
0xfe9c-0xfe9f irq 17 at device 0.0 on pci2
ale0: 960 Tx FIFO, 1024 Rx FIFO
ale0: Using 1 MSI messages.
miibus0:  on ale0
atphy0:  PHY 0 on miibus0
atphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
ale0: Ethernet address: 00:22:15:75:15:b2
ale0: [FILTER]
... (many other devices)
ale0: changing name to 'panopticon'
panopticon: link state changed to DOWN
panopticon: no link .panopticon: link state changed to UP
 got link
DHCPREQUEST on panopticon to 255.255.255.255 port 67
DHCPREQUEST on panopticon to 255.255.255.255 port 67
DHCPACK from 192.168.0.2
bound to 192.168.0.32 -- renewal in 43200 seconds.

Turning off name change won't help - it still linkdowns after detection like 
that.

I think that check for live interface should be removed from
defaultroute.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ruhttp://www.amdmi3.ru
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r190031 - head/etc/defaults

2009-04-10 Thread M. Warner Losh
In message: <20090410.123404.-1398308997@bsdimp.com>
"M. Warner Losh"  writes:
: In message: <20090409153805.gb83...@lor.one-eyed-alien.net>
: Brooks Davis  writes:
: : Unless you have one of the few interfaces that does not generate
: : link status events, dhclient will be started by devd.  The only ones I
: : know of are a subset set of ed(4) devices, though I think imp may have
: : fixed those recently with a stub ifmedia interface.
: 
: I think ep(4) is the only "common" case left.  For ed(4) we now do the
: right thing for the really old cards (those without a MII) as well as
: the merely old cards (those with a phy).  For the really old cards, we
: generally default to "Link is up all the time" as our status,
: specifically to keep dhclient happy.
: 
: Of course, the number of users of these cards is quite low these
: days...  I've fixed a number of bugs that should have been bad enough
: for people to complain, but since nobody did, I'm guessing the install
: base is smaller than I'd thought...

ep(4) now works for UTP aka 10BaseT.  At least for the 3c589-based
cards (the 3c574-based cards I haven't tested, but should be using the
MII that's there to manage this stuff, but aren't: another rainy day
project).

As a side effect, I dusted off my 3C1 documentation and thought I'd
give it one more try to get working, and I found the magic pixie dust
to sprinkle in...  This makes FreeBSD the only open source OS to
support it, although now that the secret is out, I suspect others will
follow since it is really rather simple...

Warner
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r190031 - head/etc/defaults

2009-04-10 Thread M. Warner Losh
In message: <20090410184337.ga6...@lor.one-eyed-alien.net>
Brooks Davis  writes:
: On Fri, Apr 10, 2009 at 12:34:04PM -0600, M. Warner Losh wrote:
: > In message: <20090409153805.gb83...@lor.one-eyed-alien.net>
: > Brooks Davis  writes:
: > : Unless you have one of the few interfaces that does not generate
: > : link status events, dhclient will be started by devd.  The only ones I
: > : know of are a subset set of ed(4) devices, though I think imp may have
: > : fixed those recently with a stub ifmedia interface.
: > 
: > I think ep(4) is the only "common" case left.  For ed(4) we now do the
: > right thing for the really old cards (those without a MII) as well as
: > the merely old cards (those with a phy).  For the really old cards, we
: > generally default to "Link is up all the time" as our status,
: > specifically to keep dhclient happy.
: > 
: > Of course, the number of users of these cards is quite low these
: > days...  I've fixed a number of bugs that should have been bad enough
: > for people to complain, but since nobody did, I'm guessing the install
: > base is smaller than I'd thought...
: 
: Good to know.  This will be pretty useful since some emulators seem to
: emulate very old ed devices.

That's true.  Although performance on the ed(4) devices are rather
pathetic by today's standards, at least it would work.  Good thing
most of the emulators don't try to be cycle accurate.

Warner

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r190031 - head/etc/defaults

2009-04-10 Thread Brooks Davis
On Fri, Apr 10, 2009 at 12:34:04PM -0600, M. Warner Losh wrote:
> In message: <20090409153805.gb83...@lor.one-eyed-alien.net>
> Brooks Davis  writes:
> : Unless you have one of the few interfaces that does not generate
> : link status events, dhclient will be started by devd.  The only ones I
> : know of are a subset set of ed(4) devices, though I think imp may have
> : fixed those recently with a stub ifmedia interface.
> 
> I think ep(4) is the only "common" case left.  For ed(4) we now do the
> right thing for the really old cards (those without a MII) as well as
> the merely old cards (those with a phy).  For the really old cards, we
> generally default to "Link is up all the time" as our status,
> specifically to keep dhclient happy.
> 
> Of course, the number of users of these cards is quite low these
> days...  I've fixed a number of bugs that should have been bad enough
> for people to complain, but since nobody did, I'm guessing the install
> base is smaller than I'd thought...

Good to know.  This will be pretty useful since some emulators seem to
emulate very old ed devices.

-- Brooks


pgpfXgBIgqZYI.pgp
Description: PGP signature


Re: svn commit: r190031 - head/etc/defaults

2009-04-10 Thread M. Warner Losh
In message: <20090409153805.gb83...@lor.one-eyed-alien.net>
Brooks Davis  writes:
: Unless you have one of the few interfaces that does not generate
: link status events, dhclient will be started by devd.  The only ones I
: know of are a subset set of ed(4) devices, though I think imp may have
: fixed those recently with a stub ifmedia interface.

I think ep(4) is the only "common" case left.  For ed(4) we now do the
right thing for the really old cards (those without a MII) as well as
the merely old cards (those with a phy).  For the really old cards, we
generally default to "Link is up all the time" as our status,
specifically to keep dhclient happy.

Of course, the number of users of these cards is quite low these
days...  I've fixed a number of bugs that should have been bad enough
for people to complain, but since nobody did, I'm guessing the install
base is smaller than I'd thought...

Warner
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r190031 - head/etc/defaults

2009-04-09 Thread Brooks Davis
On Thu, Apr 09, 2009 at 07:51:38PM +0400, Dmitry Marakasov wrote:
> * Brooks Davis (bro...@freebsd.org) wrote:
> 
> > > Shouldn't synchronous_dhclient be ON by default then? The way it
> > > is, DHCP is not used at all, I ended up with unreachable box which
> > > didn't get any IP already.
> > 
> > Unless you have one of the few interfaces that does not generate
> > link status events, dhclient will be started by devd.  The only ones I
> > know of are a subset set of ed(4) devices, though I think imp may have
> > fixed those recently with a stub ifmedia interface.
> 
> I use ale(4). Will test some more. Couldn't the fact that the interface
> is renamed be the reason?

Shouldn't be.  I use renamed interfaces a fair bit.  The ale(4) driver
uses mii, but so lack of link events shouldn't be an issue unless the
driver is buggy.

> Also, how is the issue of services not starting because of no default
> route/dns/network available solved when running dhclient from devd?

The wait in /etc/rc.d/defaultroute.

-- Brooks


pgp5WJjzRT5Bq.pgp
Description: PGP signature


Re: svn commit: r190031 - head/etc/defaults

2009-04-09 Thread Dmitry Marakasov
* Brooks Davis (bro...@freebsd.org) wrote:

> > Shouldn't synchronous_dhclient be ON by default then? The way it
> > is, DHCP is not used at all, I ended up with unreachable box which
> > didn't get any IP already.
> 
> Unless you have one of the few interfaces that does not generate
> link status events, dhclient will be started by devd.  The only ones I
> know of are a subset set of ed(4) devices, though I think imp may have
> fixed those recently with a stub ifmedia interface.

I use ale(4). Will test some more. Couldn't the fact that the interface
is renamed be the reason?

Also, how is the issue of services not starting because of no default
route/dns/network available solved when running dhclient from devd?

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ruhttp://www.amdmi3.ru
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r190031 - head/etc/defaults

2009-04-09 Thread Brooks Davis
On Thu, Apr 09, 2009 at 05:12:53PM +0400, Dmitry Marakasov wrote:
> * Dag-Erling Smorgrav (d...@freebsd.org) wrote:
> 
> > Modified: head/etc/defaults/rc.conf
> > ==
> > --- head/etc/defaults/rc.conf   Thu Mar 19 12:39:13 2009
> > (r190030)
> > +++ head/etc/defaults/rc.conf   Thu Mar 19 12:48:00 2009
> > (r190031)
> > @@ -101,7 +101,7 @@ nisdomainname="NO"  # Set to NIS domain 
> >  dhclient_program="/sbin/dhclient"  # Path to dhcp client program.
> >  dhclient_flags=""  # Extra flags to pass to dhcp client.
> >  #dhclient_flags_fxp0=""# Extra dhclient flags for fxp0 only
> > -background_dhclient="YES"  # Start dhcp client in the background.
> > +background_dhclient="NO"   # Start dhcp client in the background.
> >  #background_dhclient_fxp0="YES"# Start dhcp client on fxp0 in the 
> > background.
> >  synchronous_dhclient="NO"  # Start dhclient directly on configured
> > # interfaces during startup.
> 
> Shouldn't synchronous_dhclient be ON by default then? The way it
> is, DHCP is not used at all, I ended up with unreachable box which
> didn't get any IP already.

Unless you have one of the few interfaces that does not generate
link status events, dhclient will be started by devd.  The only ones I
know of are a subset set of ed(4) devices, though I think imp may have
fixed those recently with a stub ifmedia interface.

-- Brooks



pgp4YArOvvKk6.pgp
Description: PGP signature


Re: svn commit: r190031 - head/etc/defaults

2009-04-09 Thread Dmitry Marakasov
* Dag-Erling Smorgrav (d...@freebsd.org) wrote:

> Modified: head/etc/defaults/rc.conf
> ==
> --- head/etc/defaults/rc.conf Thu Mar 19 12:39:13 2009(r190030)
> +++ head/etc/defaults/rc.conf Thu Mar 19 12:48:00 2009(r190031)
> @@ -101,7 +101,7 @@ nisdomainname="NO"# Set to NIS domain 
>  dhclient_program="/sbin/dhclient"# Path to dhcp client program.
>  dhclient_flags=""# Extra flags to pass to dhcp client.
>  #dhclient_flags_fxp0=""  # Extra dhclient flags for fxp0 only
> -background_dhclient="YES"# Start dhcp client in the background.
> +background_dhclient="NO" # Start dhcp client in the background.
>  #background_dhclient_fxp0="YES"  # Start dhcp client on fxp0 in the 
> background.
>  synchronous_dhclient="NO"# Start dhclient directly on configured
>   # interfaces during startup.

Shouldn't synchronous_dhclient be ON by default then? The way it
is, DHCP is not used at all, I ended up with unreachable box which
didn't get any IP already.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ruhttp://www.amdmi3.ru
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r190031 - head/etc/defaults

2009-03-19 Thread Dag-Erling Smorgrav
Author: des
Date: Thu Mar 19 12:48:00 2009
New Revision: 190031
URL: http://svn.freebsd.org/changeset/base/190031

Log:
  Revert r188010.  When dhclient is backgrounded, services such as ntpdate,
  sendmail / postfix etc. may fail to start because DNS is unavailable and /
  or the server is unreachable.  In the worst case, the machine may become
  unusable.
  
  Debugging this issue was far more difficult than it should have been, due
  to earlier changes to the rc framework to hide almost all useful information
  about the boot process.
  
  Approved by:  silence

Modified:
  head/etc/defaults/rc.conf

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Thu Mar 19 12:39:13 2009(r190030)
+++ head/etc/defaults/rc.conf   Thu Mar 19 12:48:00 2009(r190031)
@@ -101,7 +101,7 @@ nisdomainname="NO"  # Set to NIS domain 
 dhclient_program="/sbin/dhclient"  # Path to dhcp client program.
 dhclient_flags=""  # Extra flags to pass to dhcp client.
 #dhclient_flags_fxp0=""# Extra dhclient flags for fxp0 only
-background_dhclient="YES"  # Start dhcp client in the background.
+background_dhclient="NO"   # Start dhcp client in the background.
 #background_dhclient_fxp0="YES"# Start dhcp client on fxp0 in the 
background.
 synchronous_dhclient="NO"  # Start dhclient directly on configured
# interfaces during startup.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"