Re: [OE-core] systemd issue with network commandline config and 6.4 kernel

2023-08-08 Thread Richard Purdie
On Tue, 2023-08-08 at 12:13 -0400, Bruce Ashfield wrote:
> On Tue, Aug 8, 2023 at 11:35 AM Chen Qi via lists.openembedded.org
>  wrote:
> > 
> > I found some clue, but not the root cause yet.
> > The eth0 is renamed to enp0s2 by 80-net-setup-link.rules udev rule in 
> > systemd. And the connman.conf only blacklists eth0.
> > 
> > The related log is:
> > Aug 08 15:18:16 qemux86-64 kernel[213]: [1.727332] virtio_net virtio0 
> > enp0s2: renamed from eth0 (while UP)
> > 
> > The systemd udev configuration file is:
> > root@qemux86-64:~# cat /lib/udev/rules.d/80-net-setup-link.rules
> > # do not edit this file, it will be overwritten on update
> > SUBSYSTEM!="net", GOTO="net_setup_link_end"
> > IMPORT{builtin}="path_id"
> > ACTION=="remove", GOTO="net_setup_link_end"
> > IMPORT{builtin}="net_setup_link"
> > NAME=="", ENV{ID_NET_NAME}!="", NAME="$env{ID_NET_NAME}"
> > LABEL="net_setup_link_end"
> > 
> > And the connman configuration file is:
> > root@qemux86-64:~# cat /etc/connman/main.conf
> > [General]
> > NetworkInterfaceBlacklist = eth0
> > 
> > In contrary, with 6.1 kernel, the renaming failed with the following 
> > message:
> > Aug 08 15:29:58 qemux86-64 (udev-worker)[206]: enp0s2: Network interface 
> > 'eth0' is already up, cannot rename to 'enp0s2'.
> > 
> > Maybe some changes in new kernel allows renaming network interface while 
> > it's up?
> 
> This brings back a memory of something I ran into on a build server
> when upgrading to a "newer" 6.2 kernel,
> 
> I had to disable interface renaming in order to get a consistent
> network configuration, and did that via "net.ifnames=0" on the kernel
> command line.

Thanks, Qi and Bruce, this all starts to make more sense now.

I've sent a patch adding "net.ifnames=0" to the two places we need it
to fix runqemu usage which fixed the issue in my local testing.

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185674): 
https://lists.openembedded.org/g/openembedded-core/message/185674
Mute This Topic: https://lists.openembedded.org/mt/100620069/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] systemd issue with network commandline config and 6.4 kernel

2023-08-08 Thread Bruce Ashfield
On Tue, Aug 8, 2023 at 11:35 AM Chen Qi via lists.openembedded.org
 wrote:
>
> I found some clue, but not the root cause yet.
> The eth0 is renamed to enp0s2 by 80-net-setup-link.rules udev rule in 
> systemd. And the connman.conf only blacklists eth0.
>
> The related log is:
> Aug 08 15:18:16 qemux86-64 kernel[213]: [1.727332] virtio_net virtio0 
> enp0s2: renamed from eth0 (while UP)
>
> The systemd udev configuration file is:
> root@qemux86-64:~# cat /lib/udev/rules.d/80-net-setup-link.rules
> # do not edit this file, it will be overwritten on update
> SUBSYSTEM!="net", GOTO="net_setup_link_end"
> IMPORT{builtin}="path_id"
> ACTION=="remove", GOTO="net_setup_link_end"
> IMPORT{builtin}="net_setup_link"
> NAME=="", ENV{ID_NET_NAME}!="", NAME="$env{ID_NET_NAME}"
> LABEL="net_setup_link_end"
>
> And the connman configuration file is:
> root@qemux86-64:~# cat /etc/connman/main.conf
> [General]
> NetworkInterfaceBlacklist = eth0
>
> In contrary, with 6.1 kernel, the renaming failed with the following message:
> Aug 08 15:29:58 qemux86-64 (udev-worker)[206]: enp0s2: Network interface 
> 'eth0' is already up, cannot rename to 'enp0s2'.
>
> Maybe some changes in new kernel allows renaming network interface while it's 
> up?

This brings back a memory of something I ran into on a build server
when upgrading to a "newer" 6.2 kernel,

I had to disable interface renaming in order to get a consistent
network configuration, and did that via "net.ifnames=0" on the kernel
command line.

Bruce

>
> Regards,
> Qi
>
>
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org 
>  On Behalf Of Richard Purdie
> Sent: Tuesday, August 8, 2023 7:51 PM
> To: openembedded-core 
> Cc: Luca Boccassi ; Alexandre Belloni 
> 
> Subject: [OE-core] systemd issue with network commandline config and 6.4 
> kernel
>
> Hi,
>
> We'd like to switch to the 6.4 kernel and there are two blockers. One of them 
> is that systemd appears to be breaking the network device config with 6.4 
> kernels.
>
> This happens with core-image-sato but not with core-image-minimal.
>
> In the sato image, I can see the kernel gets the ip= commandline parameters 
> and sets up the network (IP-Config: Complete:  info>) in the dmesg logs. When I look at the "ip addr" config, that
> setup is gone though.
>
> The autobuilder manifestation of this is for example:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/7580/steps/23/logs/stdio
>
> i.e. ping fails.
>
> Does anyone know why updating from the 6.1 kernel to the the 6.4 kernel would 
> cause this only for systemd images?
>
> I couldn't spot anything in the journal but I'm not sure I'd know what to 
> look for...
>
> Thanks,
>
> Richard
>
> 
>


--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185669): 
https://lists.openembedded.org/g/openembedded-core/message/185669
Mute This Topic: https://lists.openembedded.org/mt/100620069/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] systemd issue with network commandline config and 6.4 kernel

2023-08-08 Thread Peter Bergin


On 2023-08-08 17:34, Chen Qi via lists.openembedded.org wrote:

Maybe some changes in new kernel allows renaming network interface while it's 
up?


Seems correct!

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=bd039b5ea2a91ea707ee8539df26456bd5be80af

That was added in v6.2

/Peter


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185667): 
https://lists.openembedded.org/g/openembedded-core/message/185667
Mute This Topic: https://lists.openembedded.org/mt/100620069/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] systemd issue with network commandline config and 6.4 kernel

2023-08-08 Thread Chen Qi via lists.openembedded.org
I found some clue, but not the root cause yet.
The eth0 is renamed to enp0s2 by 80-net-setup-link.rules udev rule in systemd. 
And the connman.conf only blacklists eth0.

The related log is:
Aug 08 15:18:16 qemux86-64 kernel[213]: [1.727332] virtio_net virtio0 
enp0s2: renamed from eth0 (while UP)

The systemd udev configuration file is:
root@qemux86-64:~# cat /lib/udev/rules.d/80-net-setup-link.rules
# do not edit this file, it will be overwritten on update
SUBSYSTEM!="net", GOTO="net_setup_link_end"
IMPORT{builtin}="path_id"
ACTION=="remove", GOTO="net_setup_link_end"
IMPORT{builtin}="net_setup_link"
NAME=="", ENV{ID_NET_NAME}!="", NAME="$env{ID_NET_NAME}"
LABEL="net_setup_link_end"

And the connman configuration file is:
root@qemux86-64:~# cat /etc/connman/main.conf
[General]
NetworkInterfaceBlacklist = eth0

In contrary, with 6.1 kernel, the renaming failed with the following message:
Aug 08 15:29:58 qemux86-64 (udev-worker)[206]: enp0s2: Network interface 'eth0' 
is already up, cannot rename to 'enp0s2'.

Maybe some changes in new kernel allows renaming network interface while it's 
up?

Regards,
Qi


-Original Message-
From: openembedded-core@lists.openembedded.org 
 On Behalf Of Richard Purdie
Sent: Tuesday, August 8, 2023 7:51 PM
To: openembedded-core 
Cc: Luca Boccassi ; Alexandre Belloni 

Subject: [OE-core] systemd issue with network commandline config and 6.4 kernel

Hi,

We'd like to switch to the 6.4 kernel and there are two blockers. One of them 
is that systemd appears to be breaking the network device config with 6.4 
kernels.

This happens with core-image-sato but not with core-image-minimal.

In the sato image, I can see the kernel gets the ip= commandline parameters and 
sets up the network (IP-Config: Complete: ) in the dmesg logs. When I look at the "ip addr" config, that
setup is gone though.

The autobuilder manifestation of this is for example:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/7580/steps/23/logs/stdio

i.e. ping fails.

Does anyone know why updating from the 6.1 kernel to the the 6.4 kernel would 
cause this only for systemd images?

I couldn't spot anything in the journal but I'm not sure I'd know what to look 
for...

Thanks,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185664): 
https://lists.openembedded.org/g/openembedded-core/message/185664
Mute This Topic: https://lists.openembedded.org/mt/100620069/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] systemd issue with network commandline config and 6.4 kernel

2023-08-08 Thread Richard Purdie
Hi,

We'd like to switch to the 6.4 kernel and there are two blockers. One
of them is that systemd appears to be breaking the network device
config with 6.4 kernels.

This happens with core-image-sato but not with core-image-minimal.

In the sato image, I can see the kernel gets the ip= commandline
parameters and sets up the network (IP-Config: Complete: ) in the dmesg logs. When I look at the "ip addr" config, that
setup is gone though.

The autobuilder manifestation of this is for example:

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/7580/steps/23/logs/stdio

i.e. ping fails.

Does anyone know why updating from the 6.1 kernel to the the 6.4 kernel
would cause this only for systemd images?

I couldn't spot anything in the journal but I'm not sure I'd know what
to look for...

Thanks,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185660): 
https://lists.openembedded.org/g/openembedded-core/message/185660
Mute This Topic: https://lists.openembedded.org/mt/100620069/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-