From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755937Ab2BHDuh (ORCPT ); Tue, 7 Feb 2012 22:50:37 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:56840 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753935Ab2BHDuf convert rfc822-to-8bit (ORCPT ); Tue, 7 Feb 2012 22:50:35 -0500 MIME-Version: 1.0 In-Reply-To: <20120208020038.GE13296@khazad-dum.debian.net> References: <4F27120A.4040106@suse.cz> <4F27C54F.1010107@suse.cz> <20120204021457.GA25386@khazad-dum.debian.net> <20120208020038.GE13296@khazad-dum.debian.net> From: Kay Sievers Date: Wed, 8 Feb 2012 04:50:15 +0100 Message-ID: Subject: Re: network regression: cannot rename netdev twice To: Henrique de Moraes Holschuh Cc: Jiri Slaby , "Eric W. Biederman" , Greg KH , LKML , ML netdev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 8, 2012 at 03:00, Henrique de Moraes Holschuh wrote: > On Mon, 06 Feb 2012, Kay Sievers wrote: >> On Sat, Feb 4, 2012 at 03:14, Henrique de Moraes Holschuh >> 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