init-ifupdown: add predictable interface names
PATCH 1/1 init-ifupdown: add predictable interface names
From: Joe Slater <[email protected]>
Use a pattern to initialize interfaces which start with 'en'. Also, make 'eth0' a pattern so that we do not see an initialization error if it has been renamed.
--- .../init-ifupdown/init-ifupdown-1.0/interfaces | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces +5 -2
@@ -13,11 +13,14 @@ iface wlan0 inet dhcp iface atml0 inet dhcp -# Wired or wireless interfaces -auto eth0 +# Wired or wireless interfaces including predictable names +auto /eth0 iface eth0 inet dhcp iface eth1 inet dhcp +auto /en*=eth +iface eth inet dhcp + # Ethernet/RNDIS gadget (g_ether) # ... or on host side, usbnet and random hwaddr iface usb0 inet static
Signature · 1 line
2.25.1
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces iface wlan0 inet dhcp · line 17
Quoted 4 lines · Joe Slater via lists.openembedded.org
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces +2
-2-# Wired or wireless interfaces -auto eth0 +# Wired or wireless interfaces including predictable names +auto /eth0
Obviously we’re days away from release but I think we need to revert or rewrite this.
The /name syntax is specific to “proper” ifupdown, so any system which uses busybox’s ifupdown will fail to have functional networking. We don’t see this on the AB because there is a separate interfaces file for the qemuall override, this file is only used in non-qemu situations.
Ross
Quoted 10 lines · Ross Burton
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces iface wlan0 inet dhcp · line 17
Quoted 4 lines · Joe Slater via lists.openembedded.org
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces +2
-2-# Wired or wireless interfaces -auto eth0 +# Wired or wireless interfaces including predictable names +auto /eth0Obviously we’re days away from release but I think we need to revert or rewrite this.
Quoted 5 lines
The /name syntax is specific to “proper” ifupdown, so any system which uses busybox’s ifupdown will fail to have functional networking. We don’t see this on the AB because there is a separate interfaces file for the qemuall override, this file is only used in non-qemu situations.
I'm worried about the number of other changes over the last few months that are related to this so a simple revert might not get us to a good place.
I'd like to see a patch proposal on what we should do. Time is short as testing changes takes time and we're now a bit behind already :/.
So specific proposals welcome.
Cheers,
Richard
Quoted 4 lines · Richard Purdie
I'd like to see a patch proposal on what we should do. Time is short as testing changes takes time and we're now a bit behind already :/.
So specific proposals welcome.
If no one comes out with a better proposal, I'd suggest reverting the top five commts, all of them:
https://git.yoctoproject.org/poky/log/?qt=author&q=slater
Alex
The easiest thing to do is to change "auto /eth0" back to "auto eth0". This lets bitbake's ifupdown initialize eth0 and also allows the real ifupdown to initialize en* interfaces if they exist.
Joe
Quoted 37 lines
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: Wednesday, April 10, 2024 10:29 AM
To: Ross Burton <[email protected]>; Slater, Joseph <[email protected]>
Cc: [email protected]; MacLeod, Randy <[email protected]>
Subject: Re: [oe-core][PATCH 1/1] init-ifupdown: add predictable interface namesQuoted 10 lines · Ross Burton
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces iface wlan0 inet dhcp
Quoted 4 lines · Joe Slater via lists.openembedded.org
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces +2
-2-# Wired or wireless interfaces -auto eth0 +# Wired or wireless interfaces including predictable names auto +/eth0Obviously we’re days away from release but I think we need to revert or rewrite this.
Quoted 5 lines
The /name syntax is specific to “proper” ifupdown, so any system which uses busybox’s ifupdown will fail to have functional networking. We don’t see this on the AB because there is a separate interfaces file for the qemuall override, this file is only used in non-qemu situations.
I'm worried about the number of other changes over the last few months that are related to this so a simple revert might not get us to a good place.
I'd like to see a patch proposal on what we should do. Time is short as testing changes takes time and we're now a bit behind already :/.
So specific proposals welcome.
Cheers,
Richard
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Joe Slater via lists.openembedded.org
Sent: Wednesday, April 10, 2024 12:30 PM
To: Richard Purdie <[email protected]>; Ross Burton <[email protected]>
Cc: [email protected]; MacLeod, Randy <[email protected]>
Subject: Re: [oe-core][PATCH 1/1] init-ifupdown: add predictable interface names
Quoted 3 lines
The easiest thing to do is to change "auto /eth0" back to "auto eth0". This lets bitbake's ifupdown initialize eth0 and also allows the real ifupdown to initialize en* interfaces if they exist.
Oops, that's busybox, not bitbake. Since we would need ifupdown to process renamed interfaces, I'm preparing a patch for packagegroup-core-boot to RRECOMMENDS it into the rootfs if sysvinit and pni-names are distro features.
Joe
Quoted 41 lines
Joe
Quoted 38 lines
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: Wednesday, April 10, 2024 10:29 AM
To: Ross Burton <[email protected]>; Slater, Joseph <[email protected]>
Cc: [email protected]; MacLeod, Randy <[email protected]>
Subject: Re: [oe-core][PATCH 1/1] init-ifupdown: add predictable interface namesQuoted 10 lines · Ross Burton
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces iface wlan0 inet dhcp
Quoted 4 lines · Joe Slater via lists.openembedded.org
meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces +2
-2-# Wired or wireless interfaces -auto eth0 +# Wired or wireless interfaces including predictable names auto +/eth0Obviously we’re days away from release but I think we need to revert or rewrite this.
Quoted 5 lines
The /name syntax is specific to “proper” ifupdown, so any system which uses busybox’s ifupdown will fail to have functional networking. We don’t see this on the AB because there is a separate interfaces file for the qemuall override, this file is only used in non-qemu situations.
I'm worried about the number of other changes over the last few months that are related to this so a simple revert might not get us to a good place.
I'd like to see a patch proposal on what we should do. Time is short as testing changes takes time and we're now a bit behind already :/.
So specific proposals welcome.
Cheers,
Richard
Quoted 1 line · Joe Slater via lists.openembedded.org
Oops, that's busybox, not bitbake. Since we would need ifupdown to process renamed interfaces, I'm preparing a patch for packagegroup-core-boot to RRECOMMENDS it into the rootfs if sysvinit and pni-names are distro features.
We also need to resolve the situation in the 'systemd: make predictable name mac policy opt-out' thread, can you please look into it?
Alex