|
Home > Archive > Debian Developers > March 2004 > Re: hotplug and ifup
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: hotplug and ifup
|
|
| Matt Zimmerman 2004-03-19, 2:35 pm |
| On Sun, Feb 23, 2003 at 02:08:17AM +1000, Anthony Towns wrote:
> or has always been there. Which means that whenever you do:
>
> # modprobe netdriver
>
> the kernel will helpfully run `ifup ethX' for you behind the scenes.
>
> This is annoying in and of itself -- you might not want this to
> come up at all, you might just want to do some anonymous snooping or
> something (see Bug#172671, eg) and if you're modprobe is a pre-up in
> your /etc/network/interfaces you've got an irritating race condition
> (which shouldn't cause problems now ifupdown does locking, but is still
> obnoxious).
hotplug should invoke ifup with a flag that acts like "ifup -a" but with one
interface; i.e., it only comes up if 'auto' is specified in the
configuration file.
> what should happen, and how should it happen? Should:
>
> * it behave as if the driver was compiled in directly (not as a
> module) -- ie, hotplug not called at all; it only gets enabled
> automatically if /etc/network/interfaces has an "auto" line
> for it ?
I believe this corresponds to this option.
--
- mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Thomas Hood 2004-03-19, 6:36 pm |
| At 2004-03-19 19:20:44 Matt Zimmerman wrote:
> hotplug should invoke ifup with a flag that acts like "ifup -a" but
> with one interface; i.e., it only comes up if 'auto' is specified
> in the configuration file.
hotplug's net.agent script runs (using eth0 as our example):
ifup eth0=hotplug
You can use the mapping mechanism to control whether this results
in a no-op or in eth0 being brought up. See
/usr/share/doc/hotplug/README.Debian for details.
--
Thomas Hood <jdthood@yahoo.co.uk>
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Matt Zimmerman 2004-03-19, 6:36 pm |
| On Fri, Mar 19, 2004 at 08:53:53PM +0100, Thomas Hood wrote:
> At 2004-03-19 19:20:44 Matt Zimmerman wrote:
>
> hotplug's net.agent script runs (using eth0 as our example):
>
> ifup eth0=hotplug
>
> You can use the mapping mechanism to control whether this results
> in a no-op or in eth0 being brought up. See
> /usr/share/doc/hotplug/README.Debian for details.
In other words, the default is for the interface to be left alone, unless
the user explicitly configures it to be hotplugged? I suppose this is
safest for now, but it would be nice if 'auto' applied.
--
- mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Anthony Towns 2004-03-20, 10:36 am |
| On Fri, Mar 19, 2004 at 12:23:19PM -0800, Matt Zimmerman wrote:
> In other words, the default is for the interface to be left alone, unless
> the user explicitly configures it to be hotplugged? I suppose this is
> safest for now, but it would be nice if 'auto' applied.
auto means "bring the interface up on boot"; that's not the same as "bring
the interface up hotplug event". So I don't think that idea's feasible.
Cheers,
aj
--
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.
Linux.conf.au 2004 -- Because we could.
http://conf.linux.org.au/ -- Jan 12-17, 2004
| |
| Matt Zimmerman 2004-03-20, 10:36 am |
| On Sat, Mar 20, 2004 at 03:41:50PM +1000, Anthony Towns wrote:
> On Fri, Mar 19, 2004 at 12:23:19PM -0800, Matt Zimmerman wrote:
>
> auto means "bring the interface up on boot"; that's not the same as "bring
> the interface up hotplug event". So I don't think that idea's feasible.
In an ideal world (and perhaps mostly in a future reality), most network
devices will be automatically detected and have their driver loaded by
hotplug, as the normal mode of operation. It would be nice if ifupdown
integrated well with such a setup.
--
- mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| David B Harris 2004-03-20, 2:35 pm |
| On Sat, 20 Mar 2004 15:41:50 +1000
Anthony Towns <aj@azure.humbug.org.au> wrote:
> On Fri, Mar 19, 2004 at 12:23:19PM -0800, Matt Zimmerman wrote:
>
> auto means "bring the interface up on boot"; that's not the same as "bring
> the interface up hotplug event". So I don't think that idea's feasible.
What's being proposed is for that to change from "bring the interface up
on boot" to "bring the interface up when the hardware becomes available
(and check to see if it's there on boot too)"
--
Arguing with an engineer is like wrestling with a pig in mud.
After a while, you realise the pig is enjoying it.
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Fumitoshi UKAI 2004-03-20, 2:35 pm |
| At Sat, 20 Mar 2004 01:05:51 -0800,
Matt Zimmerman wrote:
>
> In an ideal world (and perhaps mostly in a future reality), most network
> devices will be automatically detected and have their driver loaded by
> hotplug, as the normal mode of operation. It would be nice if ifupdown
> integrated well with such a setup.
For the latest version of hotplug, it finds pci devices at boot time,
so if you configure to use "mapping hotplug" in /etc/network/interfaces,
/etc/rcS.d/S39hotplug will load kernel drivers and will bring network
interfaces up wifh "ifup ethN=hotplug". In this case, you don't need "auto"
mark in /etc/network/interfaces to up the network interface at boot time.
Regards,
Fumitoshi UKAI
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Matt Zimmerman 2004-03-20, 2:35 pm |
| On Sat, Mar 20, 2004 at 11:37:45PM +0900, Fumitoshi UKAI wrote:
> At Sat, 20 Mar 2004 01:05:51 -0800,
> Matt Zimmerman wrote:
>
>
> For the latest version of hotplug, it finds pci devices at boot time,
> so if you configure to use "mapping hotplug" in /etc/network/interfaces,
> /etc/rcS.d/S39hotplug will load kernel drivers and will bring network
> interfaces up wifh "ifup ethN=hotplug". In this case, you don't need "auto"
> mark in /etc/network/interfaces to up the network interface at boot time.
Refer to earlier messages in this thread; what you've said is essentially
the same as what I was replying to in the topmost quote above.
--
- mdz
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Thomas Hood 2004-03-20, 8:39 pm |
| At Sat, 20 Mar 2004 01:05:51 -0800, Matt Zimmerman wrote:
> In an ideal world (and perhaps mostly in a future reality), most
> network devices will be automatically detected and have their
> driver loaded by hotplug, as the normal mode of operation. It
> would be nice if ifupdown integrated well with such a setup.
It does.
I am glad that by default ifup doesn't bring up hot plugged interfaces;
I prefer to have hotplug start ifplugd and have ifplugd run ifup.
To be consistent with hotplug, ifplugd should also ifup interfaces with
a liface name such as 'ifplugd'. Then the ifup from ifplugd would also
be disabled by default. That is wish #202378.
At Sat, 20 Mar 2004 14:37:45, Fumitoshi UKAI wrote:
> ... the latest version of hotplug ... finds pci devices at
> boot time, so if you configure to use "mapping hotplug" in
> /etc/network/interfaces, /etc/rcS.d/S39hotplug will load
> kernel drivers and will bring network interfaces up with
> "ifup ethN=hotplug".
Too bad networking is only initialized at S40!
This bug didn't exist when hotplug used the /etc/nohotplug
mechanism to delay the processing of hotplug events at boot.
Now that that mechanism has been eliminated, the bug would
seem to be back. Or is the race rectified in some other way?
> ... [Y]ou don't need "auto" mark in /etc/network/interfaces to
> up the network interface at boot time.
True.
--
Thomas Hood <jdthood@yahoo.co.uk>
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Fumitoshi UKAI 2004-03-21, 9:33 am |
| At Sat, 20 Mar 2004 22:06:44 +0100,
Thomas Hood wrote:
> At Sat, 20 Mar 2004 14:37:45, Fumitoshi UKAI wrote:
>
> Too bad networking is only initialized at S40!
>
> This bug didn't exist when hotplug used the /etc/nohotplug
> mechanism to delay the processing of hotplug events at boot.
> Now that that mechanism has been eliminated, the bug would
> seem to be back. Or is the race rectified in some other way?
what bug?
Regards,
Fumitoshi UKAI
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Anthony Towns 2004-03-21, 9:33 am |
| On Sat, Mar 20, 2004 at 08:31:04AM -0500, David B Harris wrote:
> Anthony Towns <aj@azure.humbug.org.au> wrote:
> What's being proposed is for that to change from "bring the interface up
> on boot" to "bring the interface up when the hardware becomes available
> (and check to see if it's there on boot too)"
That's not a reasonable change if we continue to imagine people might
be using their systems without hotplug installed.
Cheers,
aj
--
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.
Linux.conf.au 2004 -- Because we could.
http://conf.linux.org.au/ -- Jan 12-17, 2004
| |
| David B Harris 2004-03-21, 11:34 am |
| On Sun, 21 Mar 2004 14:45:15 +1000
Anthony Towns <aj@azure.humbug.org.au> wrote:
>
> That's not a reasonable change if we continue to imagine people might
> be using their systems without hotplug installed.
Sorry, I don't think I was clear; the last half of that sentence, "and
check to see if it's there on boot too", was meant to be
/etc/init.d/networking, not hotplug. From my perspective (as an admin
and as a user), it makes sense for me for these "auto" interfaces to be
brought up on boot if they're there, or later if they show up later.
Which bit does it is sort of irrelevant, though I suppose it'd be nice
if one subsystem handled it.
--
Arguing with an engineer is like wrestling with a pig in mud.
After a while, you realise the pig is enjoying it.
-----------------------------------------------------------------------
David B. Harris
dbharris@debian.org http://www.debian.org/
dbharris@oftc.net http://www.oftc.net/
4096R/59DDCB9F: CC53 F124 35C0 7BC2 58FE 7A3C 157D DFD9 59DD CB9F
(Retreive from subkeys.pgp.net or risk key corruption)
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Thomas Hood 2004-03-21, 1:33 pm |
| On Sun, 2004-03-21 at 14:49, Fumitoshi UKAI wrote:
> At Sat, 20 Mar 2004 22:06:44 +0100,
> Thomas Hood wrote:
Answering my own question ... What has been done is that the
hotplug link has been moved from S36 to S40 (not S39). The
question now is: Is that enough?
[color=darkred]
> what bug?
I meant: the bug of running ifup at S39hotplug before S39ifupdown
cleans out the ifstate file and before S40networking initializes
networking. But now I have installed the latest hotplug and I
find that the hotplug script is linked to S40hotplug (not S39).
That means it runs after S39ifupdown, which is vital. It runs
before S40networking; however, after reading /etc/init.d/networking
I am forced to admit that I don't see anything there that I know
can't be preceded by an ifup. AJT: Please check this.
--
Thomas Hood <jdthood@yahoo.co.uk>
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Marco d'Itri 2004-03-21, 6:33 pm |
| On Mar 21, Anthony Towns <aj@azure.humbug.org.au> wrote:
> That's not a reasonable change if we continue to imagine people might
> be using their systems without hotplug installed.
We can still do this for sarge, but probably not for sarge++.
--
ciao, |
Marco | [5228 boBHQH3bKlFts]
| |
| Anthony Towns 2004-03-22, 12:33 am |
| On Sun, Mar 21, 2004 at 06:32:34PM +0100, Thomas Hood wrote:
> I meant: the bug of running ifup at S39hotplug before S39ifupdown
> cleans out the ifstate file and before S40networking initializes
> networking. But now I have installed the latest hotplug and I
> find that the hotplug script is linked to S40hotplug (not S39).
> That means it runs after S39ifupdown, which is vital. It runs
> before S40networking; however, after reading /etc/init.d/networking
> I am forced to admit that I don't see anything there that I know
> can't be preceded by an ifup. AJT: Please check this.
It shouldn't cause any problems. If there are any, they'd be bugs in ifup
as far as I can imagine.
Cheers,
aj
--=20
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.
Linux.conf.au 2004 -- Because we could.
http://conf.linux.org.au/ -- Jan 12-17, 2004
| |
| Anthony Towns 2004-03-22, 2:33 am |
| On Sun, Mar 21, 2004 at 10:19:11AM -0500, David B Harris wrote:
> Anthony Towns <aj@azure.humbug.org.au> wrote:
> Sorry, I don't think I was clear; the last half of that sentence, "and
> check to see if it's there on boot too", was meant to be
> /etc/init.d/networking, not hotplug. From my perspective (as an admin
> and as a user), it makes sense for me for these "auto" interfaces to be
> brought up on boot if they're there, or later if they show up later.
Sure, but from ifup's perspective, having two meanings for a single line
isn't really plausible.
> Which bit does it is sort of irrelevant, though I suppose it'd be nice
> if one subsystem handled it.
Yeah, it would make sense, but I can't see any way of using "auto" to do it.
So, I guess there are a few questions when an interface becomes available.
One is how it became available -- sometimes it's just there on boot,
sometimes it's found by hotplug, sometimes it's noticed that there's an
active link by ifplugd. And we want some way to specify "yes, do something
about that" to those programs for some interfaces, but not for others.
For bootup and for ifplugd you probably know which interface names correspond
to what. For hotplug, you plausibly don't. Maybe:
# Bring these up on boot
auto lo eth0
# Bring these up if they're plugged in
allow-hotplug eth2 eth3
# Bring these up when a cable's connected
allow-ifplugd eth1
with "ifup -a" being the same as "ifup lo eth0", and "ifup --on=hotplug
eth1 eth2" being the same as "ifup eth2" would work okay. That is,
letting you write "allow-<foo> <interface names...>" where <foo> is
defined by the package/program invoking ifup, and <interface names...>
are glob patters matching which interfaces that subsystem should look at.
Cheers,
aj
--
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.
Linux.conf.au 2004 -- Because we could.
http://conf.linux.org.au/ -- Jan 12-17, 2004
| |
| Osamu Aoki 2004-03-27, 3:36 pm |
| On Sun, Mar 21, 2004 at 06:32:34PM +0100, Thomas Hood wrote:
> On Sun, 2004-03-21 at 14:49, Fumitoshi UKAI wrote:
>
> Answering my own question ... What has been done is that the
> hotplug link has been moved from S36 to S40 (not S39). The
> question now is: Is that enough?
On my system, I was relying hotplug started by discover probing to start
network. I do not use auto stanza. This was working until recently.
Last few weeks, the sytem was very erratic in booting. I usually booted
to single user mode and configured network since I did not have any
network other than lo or sometimes no lo.
I think using auto stanza in /etc/network/interfaces is one solution but
I miss probing with discover and getting network running.... was this
non-supported way of using discover?
Osamu
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
| |
| Osamu Aoki 2004-03-28, 2:34 pm |
| On Sat, Mar 27, 2004 at 08:31:27PM +0100, Osamu Aoki wrote:
> On Sun, Mar 21, 2004 at 06:32:34PM +0100, Thomas Hood wrote:
>
> On my system, I was relying hotplug started by discover probing to start
> network. I do not use auto stanza. This was working until recently.
>
> Last few weeks, the sytem was very erratic in booting. I usually booted
> to single user mode and configured network since I did not have any
> network other than lo or sometimes no lo.
>
> I think using auto stanza in /etc/network/interfaces is one solution but
> I miss probing with discover and getting network running.... was this
> non-supported way of using discover?
Bug #240363 was the reason of trouble.
modprobe was the root cause. I patched /sbin/discover-modprobe and now
works.
Also init order seems OK now.
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
|
|
|
|
|