Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-12-02 Thread Martin Pitt
Kai Krakow [2016-12-02  8:47 +0100]:
> Am Thu, 17 Nov 2016 18:53:53 +0100
> schrieb Lennart Poettering :
> > I now added a small extension to this line: "(to the level the
> > firmware permits this)" ot clarify that we are bound by firmware
> > limitations for this.
> I think this should be pointed out better. In the common case, with
> usual firmwares out there, names change in unpredictable ways if you
> swap hardware. This, of course, totally reverses what the man page says
> about "even when hardware is added/removed"...

It does not *totally* reverse it -- existing interface names remain
stable in a lot of cases actually, just not with your case where the
firmware decides to rearrange the numbering completely (which should
hopefully not be the majority of cases, given how few reports we get
about it). So IMHO the "(to the level the firmware permits this)"
qualification seems to adequately address that?

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-12-01 Thread Kai Krakow
Am Thu, 17 Nov 2016 18:53:53 +0100
schrieb Lennart Poettering :

> On Wed, 16.11.16 23:19, Pekka Sarnila (sarn...@adit.fi) wrote:
> 
> > Well my first point was that the web page should not say
> >   
>  [...]  
> 
> I now added a small extension to this line: "(to the level the
> firmware permits this)" ot clarify that we are bound by firmware
> limitations for this.

Well, I think here's a common misconception about what people
understand, and what you would like them to understand.

After reading all this I asked myself: What's the point of stable
interface names anyways if it's going to change upon device add/remove?
And I think that's actually the point: Name stability is not for device
add/remove (in an ideal world, it would be). Your intention is to have
stable names across reboots and remove races from device detection.

I think this should be pointed out better. In the common case, with
usual firmwares out there, names change in unpredictable ways if you
swap hardware. This, of course, totally reverses what the man page says
about "even when hardware is added/removed"...

-- 
Regards,
Kai

Replies to list-only preferred.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-17 Thread Pekka Sarnila



On 11/16/16 23:26, Dave Reisner wrote:



On Wed, Nov 16, 2016 at 4:19 PM, Pekka Sarnila > wrote:



On 11/16/16 18:11, Greg KH wrote:

On Wed, Nov 16, 2016 at 03:33:42PM +0200, Pekka Sarnila wrote:

On 'Predictable Network Interface Names' it states as a
benefit of the new
policy:

  Stable interface names even when hardware is added or
removed, i.e.
  no re-enumeration takes place

Unfortunately this is not true.

I'm running a mail server, kernel 4.8.6. Graphics card
started to fail.
Replaced it with new one (newer model). Booted the system.

All seemed to be fine, network seemed to work. But after
some time got angry
cries: 'can't read the mail !!!'. A big headache.

Although the new card was in the same slot as the old one
kernel had changed
the name enp6s0 -> enp3s0 (no firmware/BIOS index available
and kernel
policy was used as default). Since enp6s0 was not found our
server instead
of fixed ip address used our dhcp-server to get a random
temp address. Thus
network worked, but not in the mail-servers correct address.

To figure this out took some nervous time.

Now, I don't know why kernel driver got a different name for
this network
interface (ethernet hardware is on the motherboard, and it
is the only net
hardware on the system). But obviously it can happen.


That is because your PCI devices renumbered themselves, which is
quite
common when changing PCI devices around (or adding/removing
them).  Not
much systemd can do about this, sorry.

greg k-h


Well my first point was that the web page should not say

>>   Stable interface names even when hardware is added or removed, i.e.
>>   no re-enumeration takes place

But second was that in principle persistent naming would be possible
for systems with only one interface. And it should possible to
implement it in systemd-network, and make it systemd package default
for such case.


No, it's not. It sounds more like you want to disable the naming policy,
which means you get "eth0" for the first device that shows up.


No thats not at all what I'm suggesting. I have also had my time getting 
gray hair for this 'is it eth0 or eth1 this time'.


But on servers that have only one interface (and no one is allowed to 
hot plug anything what so ever) the old method was better: always eth0. 
And you didn't need to understand how the names are given even when 
upgrading hardware. Of course for other cases the old way was not good.


I still believe that people who's job is to see that servers hardware is 
running don't in most cases know how to configure systemd or much 
anything about the os to that matter.


I'm sure systemd could be developed to count the interfaces right after 
boot, and there could be in the configuration setting saying that if 
there is only one interface at the boot time a name in that 
configuration would be given to that interface.


So what I'm saying, it should be possible the have the good of the old 
and good of the new way in the same package. I don't believe it is alway 
win loose situation


Anyway no big deal.

pekka




pekka

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org

https://lists.freedesktop.org/mailman/listinfo/systemd-devel




___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-17 Thread Lennart Poettering
On Wed, 16.11.16 23:19, Pekka Sarnila (sarn...@adit.fi) wrote:

> Well my first point was that the web page should not say
> 
> >>   Stable interface names even when hardware is added or removed, i.e.
> >>   no re-enumeration takes place

I now added a small extension to this line: "(to the level the
firmware permits this)" ot clarify that we are bound by firmware
limitations for this.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-17 Thread Lennart Poettering
On Wed, 16.11.16 15:33, Pekka Sarnila (sarn...@adit.fi) wrote:

> On 'Predictable Network Interface Names' it states as a benefit of the new
> policy:
> 
>   Stable interface names even when hardware is added or removed, i.e.
>   no re-enumeration takes place
> 
> Unfortunately this is not true.

Yeah, some firmware will renumerate PCI devices when you plug in a
device. Ideally they wouldn't. We are making the best effort to
provide stable names, but when the lower layers fuck with us they fuck
with us, there's little we can do about this.

> Could there be general solution for this? On ordinary system MAC could be
> used, but on virtual one. And there are of course docking systems for
> laptops. So that is not general enough.
> 
> It would seem there is no general way to enumerate persistently network
> interfaces unless the network hardware itself directly gives its name (and
> have unique names over the world). Or is there?

Well, the firmware exposes APIs of this, and we make usre of it. But
if the firmware provided info isn't actually reliable, then there's
little we can do.

> However could there be a way for systemsd/udev to know that there is only
> one interface in the system? At least then always as a default the same name
> could be given.

You can plug in an USB device anytime. You newer know what will
eventually show up. And probing time for many devices is essentially
unbounded, so you might have a USB device soldered onto your
mainboard, and it may take any time it likes to initialize, and we
simply cannot know in advance whether we got them all yet, or not.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-16 Thread Pekka Sarnila



On 11/16/16 18:11, Greg KH wrote:

On Wed, Nov 16, 2016 at 03:33:42PM +0200, Pekka Sarnila wrote:

On 'Predictable Network Interface Names' it states as a benefit of the new
policy:

  Stable interface names even when hardware is added or removed, i.e.
  no re-enumeration takes place

Unfortunately this is not true.

I'm running a mail server, kernel 4.8.6. Graphics card started to fail.
Replaced it with new one (newer model). Booted the system.

All seemed to be fine, network seemed to work. But after some time got angry
cries: 'can't read the mail !!!'. A big headache.

Although the new card was in the same slot as the old one kernel had changed
the name enp6s0 -> enp3s0 (no firmware/BIOS index available and kernel
policy was used as default). Since enp6s0 was not found our server instead
of fixed ip address used our dhcp-server to get a random temp address. Thus
network worked, but not in the mail-servers correct address.

To figure this out took some nervous time.

Now, I don't know why kernel driver got a different name for this network
interface (ethernet hardware is on the motherboard, and it is the only net
hardware on the system). But obviously it can happen.


That is because your PCI devices renumbered themselves, which is quite
common when changing PCI devices around (or adding/removing them).  Not
much systemd can do about this, sorry.

greg k-h



Well my first point was that the web page should not say

>>   Stable interface names even when hardware is added or removed, i.e.
>>   no re-enumeration takes place

But second was that in principle persistent naming would be possible for 
systems with only one interface. And it should possible to implement it 
in systemd-network, and make it systemd package default for such case.


pekka
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-16 Thread Pekka Sarnila

I was talking about systemd out of the box distribution defaults.
I'm afraid there are plenty of people who most likely would not be able 
figure out what happened to their system (while being able to change 
their display card).


pekka

On 11/16/16 18:21, Michał Zegan wrote:

But he coul use a .link file to give a persistent interface name based
on some property, wouldn't it be a nice thing to do?

W dniu 16.11.2016 o 17:11, Greg KH pisze:

On Wed, Nov 16, 2016 at 03:33:42PM +0200, Pekka Sarnila wrote:

On 'Predictable Network Interface Names' it states as a benefit of the new
policy:

  Stable interface names even when hardware is added or removed, i.e.
  no re-enumeration takes place

Unfortunately this is not true.

I'm running a mail server, kernel 4.8.6. Graphics card started to fail.
Replaced it with new one (newer model). Booted the system.

All seemed to be fine, network seemed to work. But after some time got angry
cries: 'can't read the mail !!!'. A big headache.

Although the new card was in the same slot as the old one kernel had changed
the name enp6s0 -> enp3s0 (no firmware/BIOS index available and kernel
policy was used as default). Since enp6s0 was not found our server instead
of fixed ip address used our dhcp-server to get a random temp address. Thus
network worked, but not in the mail-servers correct address.

To figure this out took some nervous time.

Now, I don't know why kernel driver got a different name for this network
interface (ethernet hardware is on the motherboard, and it is the only net
hardware on the system). But obviously it can happen.


That is because your PCI devices renumbered themselves, which is quite
common when changing PCI devices around (or adding/removing them).  Not
much systemd can do about this, sorry.

greg k-h
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel





___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-16 Thread Dave Reisner
On Wed, Nov 16, 2016 at 4:19 PM, Pekka Sarnila  wrote:

>
>
> On 11/16/16 18:11, Greg KH wrote:
>
>> On Wed, Nov 16, 2016 at 03:33:42PM +0200, Pekka Sarnila wrote:
>>
>>> On 'Predictable Network Interface Names' it states as a benefit of the
>>> new
>>> policy:
>>>
>>>   Stable interface names even when hardware is added or removed, i.e.
>>>   no re-enumeration takes place
>>>
>>> Unfortunately this is not true.
>>>
>>> I'm running a mail server, kernel 4.8.6. Graphics card started to fail.
>>> Replaced it with new one (newer model). Booted the system.
>>>
>>> All seemed to be fine, network seemed to work. But after some time got
>>> angry
>>> cries: 'can't read the mail !!!'. A big headache.
>>>
>>> Although the new card was in the same slot as the old one kernel had
>>> changed
>>> the name enp6s0 -> enp3s0 (no firmware/BIOS index available and kernel
>>> policy was used as default). Since enp6s0 was not found our server
>>> instead
>>> of fixed ip address used our dhcp-server to get a random temp address.
>>> Thus
>>> network worked, but not in the mail-servers correct address.
>>>
>>> To figure this out took some nervous time.
>>>
>>> Now, I don't know why kernel driver got a different name for this network
>>> interface (ethernet hardware is on the motherboard, and it is the only
>>> net
>>> hardware on the system). But obviously it can happen.
>>>
>>
>> That is because your PCI devices renumbered themselves, which is quite
>> common when changing PCI devices around (or adding/removing them).  Not
>> much systemd can do about this, sorry.
>>
>> greg k-h
>>
>>
> Well my first point was that the web page should not say
>
> >>   Stable interface names even when hardware is added or removed, i.e.
> >>   no re-enumeration takes place
>
> But second was that in principle persistent naming would be possible for
> systems with only one interface. And it should possible to implement it in
> systemd-network, and make it systemd package default for such case.


No, it's not. It sounds more like you want to disable the naming policy,
which means you get "eth0" for the first device that shows up.


>
> pekka
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-16 Thread Michał Zegan
But he coul use a .link file to give a persistent interface name based
on some property, wouldn't it be a nice thing to do?

W dniu 16.11.2016 o 17:11, Greg KH pisze:
> On Wed, Nov 16, 2016 at 03:33:42PM +0200, Pekka Sarnila wrote:
>> On 'Predictable Network Interface Names' it states as a benefit of the new
>> policy:
>>
>>   Stable interface names even when hardware is added or removed, i.e.
>>   no re-enumeration takes place
>>
>> Unfortunately this is not true.
>>
>> I'm running a mail server, kernel 4.8.6. Graphics card started to fail.
>> Replaced it with new one (newer model). Booted the system.
>>
>> All seemed to be fine, network seemed to work. But after some time got angry
>> cries: 'can't read the mail !!!'. A big headache.
>>
>> Although the new card was in the same slot as the old one kernel had changed
>> the name enp6s0 -> enp3s0 (no firmware/BIOS index available and kernel
>> policy was used as default). Since enp6s0 was not found our server instead
>> of fixed ip address used our dhcp-server to get a random temp address. Thus
>> network worked, but not in the mail-servers correct address.
>>
>> To figure this out took some nervous time.
>>
>> Now, I don't know why kernel driver got a different name for this network
>> interface (ethernet hardware is on the motherboard, and it is the only net
>> hardware on the system). But obviously it can happen.
> 
> That is because your PCI devices renumbered themselves, which is quite
> common when changing PCI devices around (or adding/removing them).  Not
> much systemd can do about this, sorry.
> 
> greg k-h
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-16 Thread Greg KH
On Wed, Nov 16, 2016 at 03:33:42PM +0200, Pekka Sarnila wrote:
> On 'Predictable Network Interface Names' it states as a benefit of the new
> policy:
> 
>   Stable interface names even when hardware is added or removed, i.e.
>   no re-enumeration takes place
> 
> Unfortunately this is not true.
> 
> I'm running a mail server, kernel 4.8.6. Graphics card started to fail.
> Replaced it with new one (newer model). Booted the system.
> 
> All seemed to be fine, network seemed to work. But after some time got angry
> cries: 'can't read the mail !!!'. A big headache.
> 
> Although the new card was in the same slot as the old one kernel had changed
> the name enp6s0 -> enp3s0 (no firmware/BIOS index available and kernel
> policy was used as default). Since enp6s0 was not found our server instead
> of fixed ip address used our dhcp-server to get a random temp address. Thus
> network worked, but not in the mail-servers correct address.
> 
> To figure this out took some nervous time.
> 
> Now, I don't know why kernel driver got a different name for this network
> interface (ethernet hardware is on the motherboard, and it is the only net
> hardware on the system). But obviously it can happen.

That is because your PCI devices renumbered themselves, which is quite
common when changing PCI devices around (or adding/removing them).  Not
much systemd can do about this, sorry.

greg k-h
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Stable interface names even when hardware is added or removed, not true

2016-11-16 Thread Pekka Sarnila
On 'Predictable Network Interface Names' it states as a benefit of the 
new policy:


  Stable interface names even when hardware is added or removed, i.e.
  no re-enumeration takes place

Unfortunately this is not true.

I'm running a mail server, kernel 4.8.6. Graphics card started to fail. 
Replaced it with new one (newer model). Booted the system.


All seemed to be fine, network seemed to work. But after some time got 
angry cries: 'can't read the mail !!!'. A big headache.


Although the new card was in the same slot as the old one kernel had 
changed the name enp6s0 -> enp3s0 (no firmware/BIOS index available and 
kernel policy was used as default). Since enp6s0 was not found our 
server instead of fixed ip address used our dhcp-server to get a random 
temp address. Thus network worked, but not in the mail-servers correct 
address.


To figure this out took some nervous time.

Now, I don't know why kernel driver got a different name for this 
network interface (ethernet hardware is on the motherboard, and it is 
the only net hardware on the system). But obviously it can happen.


Could there be general solution for this? On ordinary system MAC could 
be used, but on virtual one. And there are of course docking systems for 
laptops. So that is not general enough.


It would seem there is no general way to enumerate persistently network 
interfaces unless the network hardware itself directly gives its name 
(and have unique names over the world). Or is there?


However could there be a way for systemsd/udev to know that there is 
only one interface in the system? At least then always as a default the 
same name could be given.


Pekka
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel