Re: system is not match systemd.link configs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag, dem 28.10.2024 um 17:56 +0000 schrieb Henti Smith:
> On Mon, 28 Oct 2024 at 13:47, Andrei Borzenkov <[arvidjaar@xxxxxxxxx](mailto:arvidjaar@xxxxxxxxx)> wrote:
> 
> > On Mon, Oct 28, 2024 at 3:07 PM Henti Smith <[henti@xxxxxxxxxxxxxxxxx](mailto:henti@xxxxxxxxxxxxxxxxx)> wrote:  
> > >  
> > > On Mon, 28 Oct 2024 at 10:38, Andrei Borzenkov <[arvidjaar@xxxxxxxxx](mailto:arvidjaar@xxxxxxxxx)> wrote:  
> > > >  
> > > > On Thu, Oct 24, 2024 at 6:29 PM Henti Smith <[henti@xxxxxxxxxxxxxxxxx](mailto:henti@xxxxxxxxxxxxxxxxx)> wrote:  
> > > > >  
> > > > > Good day everybody  
> > > > >  
> > > > > I have two link files for mvc-sw1 and mvc-sw2.  
> > > > >  
> > > > > `mvc-sw1`
> > > > >
> > > > > ```ini
> > > > > # Fixed MAC and name for eno2 (Switch 1 connection) when debug board is plugged in
> > > > > # Renamed to mvc-sw1 by PCI Address and set custom MAC address.
> > > > > [Match]
> > > > > Property=DEVPATH=/devices/pci0000:00/0000:00:10.0/0000:05:00.0/net/eno2
> > > > > 
> > > > > [Link]
> > > > > MACAddress=02:00:00:00:05:00
> > > > > Name=mvc-sw1
> > > > > ```
> > > > > 
> > > > > `mvc-sw2`
> > > > >
> > > > > ```ini
> > > > > # Fixed MAC and name for enp6s0 (Block Diagram) when debug board is plugged in
> > > > > # Renamed to mvc-sw2 by PCI Address and set custom MAC address.
> > > > > [Match]
> > > > > Property=DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:06:00.0/net/enp6s0
> > > > > ```
> > > > 
> > > > These names are already the result of earlier renamoing. I am not sure systemd/udev/networkd will rename the second time.
> > >
> > > Would that be udev ?  
> > >  
> > > we're trying hard to use systemd for all our network management. If this is not a realistic goal, what is the correct way of managing our network with systemd alongside other tools ?
> > 
> > Yes, networkd.link files provide the desired names and naming policy, it is systemd-udevd that applies them.  
> > 
> > You need to match on some intrinsic device properties and these rules must be present when systemd-udevd first sees and renames these interfaces. Which often means in initrd/initramfs.
> 
> Good evening Andrei, 
> 
> Where can I find detailed information on where to find the names when systemd-udevd sees the interface for the first time ?
> 
> Silvio in my previous mail thread commented that I can use  udevadm info which is what I'm trying to do here. Is there another method to get the "pre systemd" interface names that I should be using ?
> 
> I cannot use mac addresses to match on, nor the Path as both are not reliable in my use case, hence using the full DEVPATH from udevadm.
> 
> Any assistance will be appreciated.
> 
> Kind regards  
> Henti

Hi,

why do you use `Property=DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:06:00.0/net/enp6s0` and not `Path=0000:06:00.0`, as stated by <man:systemd.link>?

What systemd version do you use, so I can reference online? Also, is your `.link` file applied? What are `networkctl status` and `networkctl status <interface_name>` saying? What says `udevadmin info /sys/class/net/<interface_name>` for all the  interfaces in question?

In the end, if your interface locations or hardware properties are *not* reliable, than *no* automatism in the world would be able to assign static values to them.

BR  
Silvio





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux