From 1de0909a30d7b6eb54b35646572b89f2ca1de14d Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Thu, 13 Apr 2023 13:11:08 +0200 Subject: [PATCH] osbuilder: Enable dbus in the dracut case The agent now offloads cgroup configuration to systemd when possible. This requires to enable D-Bus in order to communicate with systemd. Fixes #6657 Signed-off-by: Greg Kurz (cherry picked from commit eb1762e813c52d5b593bacb04932d6fbf0ca3a19) Signed-off-by: Greg Kurz --- tools/osbuilder/dracut/dracut.conf.d/05-base.conf | 2 +- tools/osbuilder/rootfs-builder/rootfs.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/osbuilder/dracut/dracut.conf.d/05-base.conf b/tools/osbuilder/dracut/dracut.conf.d/05-base.conf index 1dd41c4a11..88591dda91 100644 --- a/tools/osbuilder/dracut/dracut.conf.d/05-base.conf +++ b/tools/osbuilder/dracut/dracut.conf.d/05-base.conf @@ -14,4 +14,4 @@ hostonly_cmdline="no" # create reproducible images reproducible="yes" # dracut modules to include (NOTE: these are NOT kernel modules) -dracutmodules="kernel-modules udev-rules syslog systemd" +dracutmodules="kernel-modules udev-rules syslog systemd dbus" diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 43c79fd7d5..6dfb8734e4 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -475,6 +475,8 @@ prepare_overlay() # Kata systemd unit file mkdir -p ./etc/systemd/system/basic.target.wants/ ln -sf /usr/lib/systemd/system/kata-containers.target ./etc/systemd/system/basic.target.wants/kata-containers.target + mkdir -p ./etc/systemd/system/kata-containers.target.wants/ + ln -sf /usr/lib/systemd/system/dbus.socket ./etc/systemd/system/kata-containers.target.wants/dbus.socket popd > /dev/null }