Hi Bruce,

As the comment mentioned,  this issue root cause is service A ... service N enable each other caused oe-core's systemctl trap into a dead loop. To simply revert a commit in libvirt is masking the truth, other package might meet this issue,  so a fix using a filter in systemctl to against duplicates has been sent to oe-core mail list(https://lists.openembedded.org/g/openembedded-core/message/195958).


So please ignore this patch and help to remove it from meta-virtualization master-next (commit: 79c82358f322983e101e238695a9a77f56a675ab)


Thanks  :)


Br,

Xiangyu

On 2/6/24 19:11, Xiangyu Chen wrote:
From: Xiangyu Chen <xiangyu.c...@windriver.com>

libvirt upstream has added all sockets for a service being enabled when a
single one of them is[1], it likes serviceA enable serviceB, serviceB enable
serviceA, that cause our systemctl script[2] trap into a dead loop in 
postinstall
stage, the error message as below:

Traceback (most recent call last):
   File "/usr/lib/python3.8/pathlib.py", line 722, in __str__
     return self._str
AttributeError: _str

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
   File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
     SystemdUnit(self.root, also).enable(unit)
   File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
     SystemdUnit(self.root, also).enable(unit)
   File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
     SystemdUnit(self.root, also).enable(unit)
   [Previous line repeated 988 more times]
......
RecursionError: maximum recursion depth exceeded while calling a Python object

Since we are using systemctl script to process the dependency, so revert that
commit from upstream.

[1] 
https://github.com/libvirt/libvirt/commit/826931e95a38af8322f8ad069dc89117c6404a00
[2] 
https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd-systemctl/systemctl

Signed-off-by: Xiangyu Chen <xiangyu.c...@windriver.com>
---
  ...ert-systemd-Add-Also-between-sockets.patch | 143 ++++++++++++++++++
  recipes-extended/libvirt/libvirt_10.0.0.bb    |   1 +
  2 files changed, 144 insertions(+)
  create mode 100644 
recipes-extended/libvirt/libvirt/0001-Revert-systemd-Add-Also-between-sockets.patch

diff --git 
a/recipes-extended/libvirt/libvirt/0001-Revert-systemd-Add-Also-between-sockets.patch
 
b/recipes-extended/libvirt/libvirt/0001-Revert-systemd-Add-Also-between-sockets.patch
new file mode 100644
index 00000000..84367fc3
--- /dev/null
+++ 
b/recipes-extended/libvirt/libvirt/0001-Revert-systemd-Add-Also-between-sockets.patch
@@ -0,0 +1,143 @@
+From 66aa101abb639c64f71a2867424fb58a39a3bd21 Mon Sep 17 00:00:00 2001
+From: Xiangyu Chen <xiangyu.c...@windriver.com>
+Date: Tue, 6 Feb 2024 18:45:53 +0800
+Subject: [PATCH] Revert "systemd: Add Also between sockets"
+
+This reverts commit 826931e95a38af8322f8ad069dc89117c6404a00.
+
+We have systemctl script to process the service dependency, this cause our 
oe-core systemctl script
+trap into a dead loop.
+
+Error as below:
+Traceback (most recent call last):
+  File "/usr/lib/python3.8/pathlib.py", line 722, in __str__
+    return self._str
+AttributeError: _str
+
+During handling of the above exception, another exception occurred:
+Traceback (most recent call last):
+  File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
+    SystemdUnit(self.root, also).enable(unit)
+  File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
+    SystemdUnit(self.root, also).enable(unit)
+  File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
+    SystemdUnit(self.root, also).enable(unit)
+  [Previous line repeated 988 more times]
+......
+RecursionError: maximum recursion depth exceeded while calling a Python object
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Xiangyu Chen <xiangyu.c...@windriver.com>
+---
+ src/locking/virtlockd-admin.socket.in | 1 -
+ src/locking/virtlockd.socket.in       | 1 -
+ src/logging/virtlogd-admin.socket.in  | 1 -
+ src/logging/virtlogd.socket.in        | 1 -
+ src/remote/libvirtd-admin.socket.in   | 2 --
+ src/remote/libvirtd-ro.socket.in      | 2 --
+ src/remote/libvirtd.socket.in         | 2 --
+ src/virtd-admin.socket.in             | 2 --
+ src/virtd-ro.socket.in                | 2 --
+ src/virtd.socket.in                   | 2 --
+ 10 files changed, 16 deletions(-)
+
+diff --git a/src/locking/virtlockd-admin.socket.in 
b/src/locking/virtlockd-admin.socket.in
+index ed5b94edba..8902ae4225 100644
+--- a/src/locking/virtlockd-admin.socket.in
++++ b/src/locking/virtlockd-admin.socket.in
+@@ -11,4 +11,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=virtlockd.socket
+diff --git a/src/locking/virtlockd.socket.in b/src/locking/virtlockd.socket.in
+index 4eec90a95e..afd42d124e 100644
+--- a/src/locking/virtlockd.socket.in
++++ b/src/locking/virtlockd.socket.in
+@@ -9,4 +9,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=virtlockd-admin.socket
+diff --git a/src/logging/virtlogd-admin.socket.in 
b/src/logging/virtlogd-admin.socket.in
+index 7207878008..a634af8942 100644
+--- a/src/logging/virtlogd-admin.socket.in
++++ b/src/logging/virtlogd-admin.socket.in
+@@ -11,4 +11,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=virtlogd.socket
+diff --git a/src/logging/virtlogd.socket.in b/src/logging/virtlogd.socket.in
+index e1d6e30e4d..7c14d03ce4 100644
+--- a/src/logging/virtlogd.socket.in
++++ b/src/logging/virtlogd.socket.in
+@@ -9,4 +9,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=virtlogd-admin.socket
+diff --git a/src/remote/libvirtd-admin.socket.in 
b/src/remote/libvirtd-admin.socket.in
+index 37efc11357..5cbb83deaa 100644
+--- a/src/remote/libvirtd-admin.socket.in
++++ b/src/remote/libvirtd-admin.socket.in
+@@ -11,5 +11,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=libvirtd.socket
+-Also=libvirtd-ro.socket
+diff --git a/src/remote/libvirtd-ro.socket.in 
b/src/remote/libvirtd-ro.socket.in
+index 6e1fad2272..7e25498728 100644
+--- a/src/remote/libvirtd-ro.socket.in
++++ b/src/remote/libvirtd-ro.socket.in
+@@ -11,5 +11,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=libvirtd.socket
+-Also=libvirtd-admin.socket
+diff --git a/src/remote/libvirtd.socket.in b/src/remote/libvirtd.socket.in
+index 9cd37dc766..919b874acd 100644
+--- a/src/remote/libvirtd.socket.in
++++ b/src/remote/libvirtd.socket.in
+@@ -9,5 +9,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=libvirtd-ro.socket
+-Also=libvirtd-admin.socket
+diff --git a/src/virtd-admin.socket.in b/src/virtd-admin.socket.in
+index 63eabd70f8..d3b260e5b1 100644
+--- a/src/virtd-admin.socket.in
++++ b/src/virtd-admin.socket.in
+@@ -13,5 +13,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=@service@.socket
+-Also=@service@-ro.socket
+diff --git a/src/virtd-ro.socket.in b/src/virtd-ro.socket.in
+index 3284af5a4a..2f701c8adb 100644
+--- a/src/virtd-ro.socket.in
++++ b/src/virtd-ro.socket.in
+@@ -13,5 +13,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=@service@.socket
+-Also=@service@-admin.socket
+diff --git a/src/virtd.socket.in b/src/virtd.socket.in
+index 502c792e7d..3605b0103e 100644
+--- a/src/virtd.socket.in
++++ b/src/virtd.socket.in
+@@ -11,5 +11,3 @@ RemoveOnStop=yes
+
+ [Install]
+ WantedBy=sockets.target
+-Also=@service@-ro.socket
+-Also=@service@-admin.socket
+--
+2.25.1
+
diff --git a/recipes-extended/libvirt/libvirt_10.0.0.bb 
b/recipes-extended/libvirt/libvirt_10.0.0.bb
index 6b19b700..412fb67b 100644
--- a/recipes-extended/libvirt/libvirt_10.0.0.bb
+++ b/recipes-extended/libvirt/libvirt_10.0.0.bb
@@ -32,6 +32,7 @@ SRC_URI = 
"http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \
             file://gnutls-helper.py \
             
file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \
             
file://0001-messon.build-remove-build-path-information-to-avoid-.patch \
+           file://0001-Revert-systemd-Add-Also-between-sockets.patch \
            "
SRC_URI[libvirt.sha256sum] = "8ba2e72ec8bdd2418554a1474c42c35704c30174b7611eaf9a16544b71bcf00a"



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

Reply via email to