linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Jiri Slaby <jslaby@suse.cz>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Greg KH <greg@kroah.com>, LKML <linux-kernel@vger.kernel.org>,
	ML netdev <netdev@vger.kernel.org>
Subject: Re: network regression: cannot rename netdev twice
Date: Wed, 8 Feb 2012 04:50:15 +0100	[thread overview]
Message-ID: <CAPXgP12ExDub9ML0=DcWRwyQP23GXDJ75jiNnw+BTXY17tEa8Q@mail.gmail.com> (raw)
In-Reply-To: <20120208020038.GE13296@khazad-dum.debian.net>

On Wed, Feb 8, 2012 at 03:00, Henrique de Moraes Holschuh
<hmh@hmh.eng.br> wrote:
> On Mon, 06 Feb 2012, Kay Sievers wrote:
>> On Sat, Feb 4, 2012 at 03:14, Henrique de Moraes Holschuh
>> <hmh@hmh.eng.br> wrote:
>> > Is it possible to configure the kernel to use something other than "eth#" as
>> > its initial namespace for netif names?  Or is there some other way to get
>> > eth1 to be what you need eth1 to be during userland boot?
>>
>> I don't think there is a sane way to do that. Someone could add a
>> kernel command line parameter to switch ethX in the kernel to
>> something else, and create custom udev rules which match on device
>> properties and apply configured names which are ethX again. But for
>> all that, there will be no generally available support in common base
>> system tools, and we absolutely do not recommend anybody doing that.
>
> What sort of impact analysis on userspace was done about this change?

None. It will just not be supported for new setups. Existing ones will
do what they always did.

> Nobody in his right mind would go back to the dark ages of uncontrolled
> ifnames.  You're effectively forcing everybody with a clue away from the
> eth# namespace.

Yes. It's a game we have lost and we will not win in the future. I
gave up, and I warn everybody who think it's simple to manage.

> Just to be very clear: the impact of this is the need to change the
> interface names on potentially millions of lines of firewall rules and
> scripts out there, as well as tracking down stuff (mostly scripts) that
> special-cases the eth prefix.

Yeah, and for good, ethX is a pretty much random kernel name, and I
personally will no longer work on conceptually broken infrastructure
that can never deliver what it seems to promise. In the longer run,
tools need to be fixed to automatically handle changing names, or not
care about the names at all, or names need to be explicitly set up
outside the ethX namespace to be predictable.

After years of working in that area I will stop to work on these hacks
to promise stable ethX names. It was just wrong, like enumerations
always are in hotplug setups.

> Is there a really good reason why we cannot have a way to move the
> kernel away from the eth# namespace at boot (through a kernel parameter,
> maybe with the default namespace set at compile time),

Could work, but I don't think it is worth. Simple enumeration, and
automatic persistent on-disk device name reservation in a flat
number-range is just a very flawed concept. I'm not interested in
working on that, but that surely should not stop anybody from trying
and providing tools that can do that.

> AND keep the
> "common base system tools" support to assign ifname based on MAC
> addresses that we have right now?

Not provided by udev's default setup, which did persistent name
reservation in the device hotplug path. It is already disabled and
will be entirely removed from the source tree some day. Other tools
can still try to provide that. But I declare that model as officially
failed and udev will not even try anything like that anymore.

People who need predictable interface names should just manually
configure custom/descriptive names, or names which are reliably
derived from the hardware, like firmware-provided names or the pci
slot number.

Kay

  reply	other threads:[~2012-02-08  3:50 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 21:56 sysfs regression: wrong link counts Jiri Slaby
2012-01-30 22:06 ` Greg KH
2012-01-30 22:10   ` Alan Cox
2012-01-30 22:27     ` Greg KH
2012-01-30 22:43       ` Al Viro
2012-01-30 22:56         ` Al Viro
2012-01-31  1:27       ` Eric W. Biederman
2012-01-31 10:48         ` Jiri Slaby
2012-01-31 12:44           ` Eric W. Biederman
2012-01-31 16:45             ` Linus Torvalds
2012-01-31 19:18               ` Al Viro
2012-02-01  5:06               ` Eric W. Biederman
2012-02-01 22:21                 ` [PATCH] sysfs: Optionally count subdirectories to support buggy applications Eric W. Biederman
2012-02-01 22:24                   ` Greg Kroah-Hartman
2012-02-01 22:44                     ` Eric W. Biederman
2012-02-01 22:49                       ` Greg Kroah-Hartman
2012-02-01 22:31                   ` Dave Jones
2012-02-01 22:35                   ` Jiri Slaby
2012-02-01 23:15                   ` Linus Torvalds
2012-02-01 23:18                     ` Linus Torvalds
2012-02-02  1:22                       ` Al Viro
2012-02-02 21:24                         ` [RFC] killing boilerplate checks in ->link/->mkdir/->rename Al Viro
2012-02-02 23:46                           ` Linus Torvalds
2012-02-03  1:16                             ` Al Viro
2012-02-03  1:45                               ` Al Viro
2012-02-03  2:00                                 ` Linus Torvalds
2012-02-03 14:57                               ` Chris Mason
2012-02-03 17:08                               ` Al Viro
2012-02-03 19:34                                 ` Artem Bityutskiy
2012-02-06  8:50                                 ` Artem Bityutskiy
2012-02-06 13:56                                   ` Al Viro
2012-02-06 17:05                                     ` Artem Bityutskiy
2012-02-06 17:11                                       ` Al Viro
2012-02-07  7:21                                         ` Artem Bityutskiy
2012-02-06 22:49                               ` Dave Chinner
2012-02-03  8:25                           ` Andreas Dilger
2012-02-03 17:03                             ` Al Viro
2012-02-04  7:42                               ` Andreas Dilger
2012-03-05 13:30                       ` [PATCH] sysfs: Optionally count subdirectories to support buggy applications Jiri Slaby
2012-03-05 16:09                         ` Greg Kroah-Hartman
2012-03-05 16:47                           ` Linus Torvalds
2012-03-08 21:05                             ` Greg Kroah-Hartman
2012-03-08 22:18                             ` Eric W. Biederman
2012-03-08 23:40                               ` Linus Torvalds
2012-03-08 21:28                           ` Eric W. Biederman
2012-03-08 21:34                           ` [PATCH 1/3] sysfs: Compact sysfs_dirent s_flags into a byte Eric W. Biederman
2012-03-08 21:36                             ` [PATCH 2/3] sysfs: Maintain usable nlink directory counts Eric W. Biederman
2012-03-08 21:37                               ` [PATCH 3/3] sysfs: Remove SYSFS_FLAG_REMOVED and use sd->s_nlink == 0 instead Eric W. Biederman
2012-03-09  3:40                                 ` Linus Torvalds
2012-03-08 22:28                             ` [PATCH 1/3] sysfs: Compact sysfs_dirent s_flags into a byte Greg Kroah-Hartman
2012-03-09  2:49                               ` Eric W. Biederman
2012-01-31  3:45     ` sysfs regression: wrong link counts Eric W. Biederman
2012-01-31 11:54       ` Alan Cox
2012-01-30 22:52 ` Kay Sievers
2012-01-31 10:41   ` network regression: cannot rename netdev twice Jiri Slaby
2012-01-31 10:52     ` Kay Sievers
2012-01-31 11:00       ` Jiri Slaby
2012-01-31 11:13         ` Kay Sievers
2012-01-31 11:17           ` Jiri Slaby
2012-01-31 11:58             ` Kay Sievers
2012-01-31 14:18               ` Eric W. Biederman
2012-01-31 14:40                 ` [PATCH] sysfs: Update the name hash when renaming sysfs entries Eric W. Biederman
2012-01-31 14:41                   ` Jiri Slaby
2012-01-31 14:55                   ` Greg KH
2012-02-04  2:14       ` network regression: cannot rename netdev twice Henrique de Moraes Holschuh
2012-02-06 20:03         ` Kay Sievers
2012-02-08  2:00           ` Henrique de Moraes Holschuh
2012-02-08  3:50             ` Kay Sievers [this message]
2012-02-08  6:42               ` Valdis.Kletnieks
2012-02-08 10:57                 ` Kay Sievers
2012-02-08 20:06                   ` Valdis.Kletnieks
2012-02-08 20:27                     ` Stephen Hemminger
2012-02-08 23:48                     ` Kay Sievers
2012-01-31  1:32 ` sysfs regression: wrong link counts Eric W. Biederman
2012-02-01 18:29 ` Maciej Rutecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPXgP12ExDub9ML0=DcWRwyQP23GXDJ75jiNnw+BTXY17tEa8Q@mail.gmail.com' \
    --to=kay.sievers@vrfy.org \
    --cc=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=hmh@hmh.eng.br \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).