All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] systemd-conf: Allow systemd to manage QEMU wired networks
@ 2021-01-15 21:49 Joshua Watt
  2021-01-17  9:19 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Watt @ 2021-01-15 21:49 UTC (permalink / raw)
  To: openembedded-core; +Cc: kai.kang, Joshua Watt

Allows systemd to manage wired network interfaces just like on actual
hardware. Systemd seems to be smart enough to not enable DHCP if the
interface was assigned a IP address in the kernel (e.g. by runqemu), so
the existing use cases should continue to work.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-core/systemd/systemd-conf_247.2.bb | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-conf_247.2.bb b/meta/recipes-core/systemd/systemd-conf_247.2.bb
index 944b56ff82..ea35e83f4f 100644
--- a/meta/recipes-core/systemd/systemd-conf_247.2.bb
+++ b/meta/recipes-core/systemd/systemd-conf_247.2.bb
@@ -29,9 +29,6 @@ do_install() {
 # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
 do_install_append_qemuall() {
 	install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
-
-	# Do not install wired.network for qemu bsps
-	rm -rf ${D}${systemd_unitdir}/network
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core][PATCH] systemd-conf: Allow systemd to manage QEMU wired networks
  2021-01-15 21:49 [OE-core][PATCH] systemd-conf: Allow systemd to manage QEMU wired networks Joshua Watt
@ 2021-01-17  9:19 ` Richard Purdie
  2021-03-03 15:52   ` Stefan Schmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2021-01-17  9:19 UTC (permalink / raw)
  To: Joshua Watt, openembedded-core; +Cc: kai.kang

On Fri, 2021-01-15 at 15:49 -0600, Joshua Watt wrote:
> Allows systemd to manage wired network interfaces just like on actual
> hardware. Systemd seems to be smart enough to not enable DHCP if the
> interface was assigned a IP address in the kernel (e.g. by runqemu), so
> the existing use cases should continue to work.
> 
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>  meta/recipes-core/systemd/systemd-conf_247.2.bb | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd-conf_247.2.bb b/meta/recipes-core/systemd/systemd-conf_247.2.bb
> index 944b56ff82..ea35e83f4f 100644
> --- a/meta/recipes-core/systemd/systemd-conf_247.2.bb
> +++ b/meta/recipes-core/systemd/systemd-conf_247.2.bb
> @@ -29,9 +29,6 @@ do_install() {
>  # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
>  do_install_append_qemuall() {
>  	install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
> -
> -	# Do not install wired.network for qemu bsps
> -	rm -rf ${D}${systemd_unitdir}/network
>  }

We did this for a reason. In testing we're seeing:

https://autobuilder.yoctoproject.org/typhoon/#/builders/110/builds/1831
https://autobuilder.yoctoproject.org/typhoon/#/builders/110/builds/1830

which I suspect could be related to this.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core][PATCH] systemd-conf: Allow systemd to manage QEMU wired networks
  2021-01-17  9:19 ` Richard Purdie
@ 2021-03-03 15:52   ` Stefan Schmidt
  2021-03-04 19:39     ` Stefan Schmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Schmidt @ 2021-03-03 15:52 UTC (permalink / raw)
  To: Richard Purdie, Joshua Watt, openembedded-core; +Cc: kai.kang

Hello Richard.

On 17.01.21 10:19, Richard Purdie wrote:
> On Fri, 2021-01-15 at 15:49 -0600, Joshua Watt wrote:
>> Allows systemd to manage wired network interfaces just like on actual
>> hardware. Systemd seems to be smart enough to not enable DHCP if the
>> interface was assigned a IP address in the kernel (e.g. by runqemu), so
>> the existing use cases should continue to work.
>>
>> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
>> ---
>>   meta/recipes-core/systemd/systemd-conf_247.2.bb | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/meta/recipes-core/systemd/systemd-conf_247.2.bb b/meta/recipes-core/systemd/systemd-conf_247.2.bb
>> index 944b56ff82..ea35e83f4f 100644
>> --- a/meta/recipes-core/systemd/systemd-conf_247.2.bb
>> +++ b/meta/recipes-core/systemd/systemd-conf_247.2.bb
>> @@ -29,9 +29,6 @@ do_install() {
>>   # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
>>   do_install_append_qemuall() {
>>   	install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
>> -
>> -	# Do not install wired.network for qemu bsps
>> -	rm -rf ${D}${systemd_unitdir}/network
>>   }
> 
> We did this for a reason. In testing we're seeing:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/110/builds/1831
> https://autobuilder.yoctoproject.org/typhoon/#/builders/110/builds/1830
> 
> which I suspect could be related to this.

I looked into this a bit more. We started to use the network unit file 
for qemu as well, because we have a use case where it uses DHCP. That 
indeed broke the runqemu static IP configuration from the kernel 
commandline.

What we do here to cover both use cases is to skip the unit if we find 
the IP to be configured on the kernel commandline. The following in the 
match section does the trick for us:

KernelCommandLine=!ip

Joshua, do you want to update the unit file accordingly or me to send a 
patch superseding yours with this change integrated?

regards
Stefan Schmidt




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core][PATCH] systemd-conf: Allow systemd to manage QEMU wired networks
  2021-03-03 15:52   ` Stefan Schmidt
@ 2021-03-04 19:39     ` Stefan Schmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Schmidt @ 2021-03-04 19:39 UTC (permalink / raw)
  To: Richard Purdie, Joshua Watt, openembedded-core; +Cc: kai.kang

Hello.

On 03.03.21 16:52, Stefan Schmidt wrote:
> Hello Richard.
> 
> On 17.01.21 10:19, Richard Purdie wrote:
>> On Fri, 2021-01-15 at 15:49 -0600, Joshua Watt wrote:
>>> Allows systemd to manage wired network interfaces just like on actual
>>> hardware. Systemd seems to be smart enough to not enable DHCP if the
>>> interface was assigned a IP address in the kernel (e.g. by runqemu), so
>>> the existing use cases should continue to work.
>>>
>>> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
>>> ---
>>>   meta/recipes-core/systemd/systemd-conf_247.2.bb | 3 ---
>>>   1 file changed, 3 deletions(-)
>>>
>>> diff --git a/meta/recipes-core/systemd/systemd-conf_247.2.bb 
>>> b/meta/recipes-core/systemd/systemd-conf_247.2.bb
>>> index 944b56ff82..ea35e83f4f 100644
>>> --- a/meta/recipes-core/systemd/systemd-conf_247.2.bb
>>> +++ b/meta/recipes-core/systemd/systemd-conf_247.2.bb
>>> @@ -29,9 +29,6 @@ do_install() {
>>>   # Based on change from YP bug 8141, OE commit 
>>> 5196d7bacaef1076c361adaa2867be31759c1b52
>>>   do_install_append_qemuall() {
>>>       install -D -m0644 ${WORKDIR}/system.conf-qemuall 
>>> ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
>>> -
>>> -    # Do not install wired.network for qemu bsps
>>> -    rm -rf ${D}${systemd_unitdir}/network
>>>   }
>>
>> We did this for a reason. In testing we're seeing:
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/110/builds/1831
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/110/builds/1830
>>
>> which I suspect could be related to this.
> 
> I looked into this a bit more. We started to use the network unit file 
> for qemu as well, because we have a use case where it uses DHCP. That 
> indeed broke the runqemu static IP configuration from the kernel 
> commandline.
> 
> What we do here to cover both use cases is to skip the unit if we find 
> the IP to be configured on the kernel commandline. The following in the 
> match section does the trick for us:
> 
> KernelCommandLine=!ip
> 
> Joshua, do you want to update the unit file accordingly or me to send a 
> patch superseding yours with this change integrated?

I went ahead and posted a patch that has the two changes and matches 
(sic) what we have in place in our layers.

I would expect this to pass the yocto autobuilder now, but if not I 
would need to get access to the test files to figure out what wen wrong.

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-04 19:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 21:49 [OE-core][PATCH] systemd-conf: Allow systemd to manage QEMU wired networks Joshua Watt
2021-01-17  9:19 ` Richard Purdie
2021-03-03 15:52   ` Stefan Schmidt
2021-03-04 19:39     ` Stefan Schmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.