Skip to contentSkip to conversation

linux-yocto: Fix systemd-modules-load.service start failure

PATCH In review He Zhe 3 participants 7 messages Jul 24, 2018 – Jul 27, 2018

lore
Share & tools
lore

He Zhe

author
#0 lore raw

PATCH 1/1 linux-yocto: Fix systemd-modules-load.service start failure

systemd-modules-load.service bindly load whatever in modules-load.d/*.conf, in this case, kvm_intel and kvm_amd. One of them must fail on a specific board and causes the following failure.

This patches remove them from KERNEL_MODULE_AUTOLOAD and leaves them to udev.

systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE Failed to start Load Kernel Modules.

---
 recipes-kernel/linux/linux-yocto_virtualization.inc | 2 --
 1 file changed, 2 deletions(-)
recipes-kernel/linux/linux-yocto_virtualization.inc +0 -2
index 9905ed9..c09b07c 100644
@@ -10,8 +10,6 @@ KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'featu
 
 KERNEL_MODULE_AUTOLOAD += "openvswitch"
 KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-amd', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-intel', '', d)}"
 
 # aufs kernel support required for xen-image-minimal
 KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
Signature · 1 line
2.11.0
author
#1 lore raw

PATCH 1/1 libvirt: Remove unsupported configure options and fix warning

xen and xen-inotify have been removed from upstream. We change PACKAGECONFIG accordingly.

pkg_postinst has been deprecated, use pkg_postinst_ontarget instead.

WARNING: wrlinux-image-ovp-kvm-1.0-r0 do_rootfs: Intentionally failing postinstall scriptlets of ['libvirt'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().

---
 recipes-extended/libvirt/libvirt_4.3.0.bb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
recipes-extended/libvirt/libvirt_4.3.0.bb +2 -4
index edd5261..e6dac5d 100644
@@ -175,7 +175,7 @@ PRIVATE_LIBS_${PN}-ptest = " \
 PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \
                    remote macvtap libvirtd netcf udev python ebtables \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen libxl xen-inotify', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'polkit', '', d)} \
                   "
 
@@ -183,10 +183,8 @@ PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \
 #
 PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu,"
 PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
-PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen,"
 PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi,,"
 PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,libxl,"
-PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen,"
 PACKAGECONFIG[uml] = "--with-uml, --without-uml,,"
 PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,,"
 PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,,"
@@ -305,7 +303,7 @@ do_install_ptest() {
 	done
 }
 
-pkg_postinst_libvirt() {
+pkg_postinst_ontarget_${PN}() {
         if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
                 /etc/init.d/populate-volatile.sh update
         fi
Signature · 1 line
2.11.0
author
#2 lore raw

Re: [PATCH] libvirt: Remove unsupported configure options and fix warning

Please ignore.

Zhe

Quoted 47 lines · He Zhe

xen and xen-inotify have been removed from upstream. We change PACKAGECONFIG accordingly.

pkg_postinst has been deprecated, use pkg_postinst_ontarget instead.

WARNING: wrlinux-image-ovp-kvm-1.0-r0 do_rootfs: Intentionally failing postinstall scriptlets of ['libvirt'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().

---
 recipes-extended/libvirt/libvirt_4.3.0.bb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
recipes-extended/libvirt/libvirt_4.3.0.bb +2 -4
index edd5261..e6dac5d 100644
@@ -175,7 +175,7 @@ PRIVATE_LIBS_${PN}-ptest = " \
 PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \
                    remote macvtap libvirtd netcf udev python ebtables \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen libxl xen-inotify', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'polkit', '', d)} \
                   "
 
@@ -183,10 +183,8 @@ PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \
 #
 PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu,"
 PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
-PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen,"
 PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi,,"
 PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,libxl,"
-PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen,"
 PACKAGECONFIG[uml] = "--with-uml, --without-uml,,"
 PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,,"
 PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,,"
@@ -305,7 +303,7 @@ do_install_ptest() {
 	done
 }
 
-pkg_postinst_libvirt() {
+pkg_postinst_ontarget_${PN}() {
         if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
                 /etc/init.d/populate-volatile.sh update
         fi
#3 lore raw
In reply to He Zhe

merged.

Bruce

Quoted 30 lines · He Zhe

systemd-modules-load.service bindly load whatever in modules-load.d/*.conf, in this case, kvm_intel and kvm_amd. One of them must fail on a specific board and causes the following failure.

This patches remove them from KERNEL_MODULE_AUTOLOAD and leaves them to udev.

systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE Failed to start Load Kernel Modules.

---
 recipes-kernel/linux/linux-yocto_virtualization.inc | 2 --
 1 file changed, 2 deletions(-)
recipes-kernel/linux/linux-yocto_virtualization.inc +0 -3
index 9905ed9..c09b07c 100644
@@ -10,8 +10,6 @@ KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'featu
 
 KERNEL_MODULE_AUTOLOAD += "openvswitch"
 KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-amd', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-intel', '', d)}"
 
 # aufs kernel support required for xen-image-minimal
 KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
--

2.11.0

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#4 lore raw
Quoted 13 lines · Bruce Ashfield

merged.

Bruce

Quoted 8 lines · He Zhe

systemd-modules-load.service bindly load whatever in modules-load.d/*.conf, in this case, kvm_intel and kvm_amd. One of them must fail on a specific board and causes the following failure.

This patches remove them from KERNEL_MODULE_AUTOLOAD and leaves them to udev.

systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE Failed to start Load Kernel Modules.

Nice. I have been wanting to look at why this message was being produced.

I do wonder if this change will cause an issue for folks using meta-virtualization with sysvinit though. What is the behavior if this is the case?

Mark

Quoted 33 lines
Quoted 20 lines
---
 recipes-kernel/linux/linux-yocto_virtualization.inc | 2 --
 1 file changed, 2 deletions(-)
recipes-kernel/linux/linux-yocto_virtualization.inc +0 -3
index 9905ed9..c09b07c 100644
@@ -10,8 +10,6 @@ KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'featu
 
 KERNEL_MODULE_AUTOLOAD += "openvswitch"
 KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-amd', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-intel', '', d)}"
 
 # aufs kernel support required for xen-image-minimal
 KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
--
Quoted 2 lines

2.11.0

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
--
_______________________________________________
meta-virtualization mailing list [email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

author
#5 lore raw
Quoted 13 lines · Mark Asselstine
Quoted 11 lines · Bruce Ashfield

merged.

Bruce

Quoted 6 lines · He Zhe

systemd-modules-load.service bindly load whatever in modules-load.d/*.conf, in this case, kvm_intel and kvm_amd. One of them must fail on a specific board and causes the following failure.

This patches remove them from KERNEL_MODULE_AUTOLOAD and leaves them to udev.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE Failed to start Load Kernel Modules.

Nice. I have been wanting to look at why this message was being produced.

I do wonder if this change will cause an issue for folks using meta-virtualization with sysvinit though. What is the behavior if this is the case?

It's also OK for sysvinit.

With sysvinit, modutils.sh in modutils-initscripts.bb in packagegroup-core-boot.bb would take care of /etc/modules-load.d. And udev still takes care of kvm-intel and kvm-amd.

Zhe

Quoted 34 lines

Mark

Quoted 31 lines
Quoted 19 lines
---
 recipes-kernel/linux/linux-yocto_virtualization.inc | 2 --
 1 file changed, 2 deletions(-)
recipes-kernel/linux/linux-yocto_virtualization.inc +0 -3
index 9905ed9..c09b07c 100644
@@ -10,8 +10,6 @@ KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'featu
 
 KERNEL_MODULE_AUTOLOAD += "openvswitch"
 KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-amd', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-intel', '', d)}"
 
 # aufs kernel support required for xen-image-minimal
 KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
--
Quoted 2 lines

2.11.0

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
--
_______________________________________________
meta-virtualization mailing list [email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

#6 lore raw
Quoted 24 lines · He Zhe
Quoted 13 lines · Mark Asselstine
Quoted 11 lines · Bruce Ashfield

merged.

Bruce

Quoted 6 lines · He Zhe

systemd-modules-load.service bindly load whatever in modules-load.d/*.conf, in this case, kvm_intel and kvm_amd. One of them must fail on a specific board and causes the following failure.

This patches remove them from KERNEL_MODULE_AUTOLOAD and leaves them to udev.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE Failed to start Load Kernel Modules.

Nice. I have been wanting to look at why this message was being produced.

I do wonder if this change will cause an issue for folks using meta-virtualization with sysvinit though. What is the behavior if this is the case?

Quoted 5 lines

It's also OK for sysvinit.

With sysvinit, modutils.sh in modutils-initscripts.bb in packagegroup-core-boot.bb would take care of /etc/modules-load.d. And udev still takes care of kvm-intel and kvm-amd.

Great. Thanks for checking.

Mark

Quoted 43 lines

Zhe

Quoted 34 lines

Mark

Quoted 31 lines
Quoted 19 lines
---
 recipes-kernel/linux/linux-yocto_virtualization.inc | 2 --
 1 file changed, 2 deletions(-)
recipes-kernel/linux/linux-yocto_virtualization.inc +0 -3
index 9905ed9..c09b07c 100644
@@ -10,8 +10,6 @@ KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'featu
 
 KERNEL_MODULE_AUTOLOAD += "openvswitch"
 KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-amd', '', d)}"
-KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm-intel', '', d)}"
 
 # aufs kernel support required for xen-image-minimal
 KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}"
--
Quoted 2 lines

2.11.0

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
--
_______________________________________________
meta-virtualization mailing list [email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization