systemd / systemd

The systemd System and Service Manager
https://systemd.io
GNU General Public License v2.0
13.35k stars 3.82k forks source link

Update of older systemd on rpm based system fails because of unsupported D-Bus method EnqueueMarkedJobs #22898

Open DaanDeMeyer opened 2 years ago

DaanDeMeyer commented 2 years ago

systemd version the issue has been seen with

v250

Used distribution

CentOS Stream 8

Linux kernel version used (uname -a)

/

CPU architecture issue was seen on

/

Expected behaviour you didn't see

Update from v239 to v250 was successful

Unexpected behaviour you saw

Update failed because v239 does not support the EnqueueMarkedJobs D-Bus method

Steps to reproduce the problem

# Build latest hyperscale systemd RPM
git clone git@git.centos.org:rpms/systemd.git
cd systemd
git checkout c8s-sig-hyperscale
spectool --define "_sourcedir $PWD" -g systemd.spec -f
mock -r centos-stream-8-x86_64 -D '%dist .hs.el8' --sources . --spec systemd.spec
cp /var/lib/mock/centos-stream-8-x86_64/result/systemd-* .
mkosi -d centos -r 8-stream --bootable --autologin --qemu-headless --source-file-transfer-final copy-all -p libmicrohttpd -p kbd -p rpm -p libselinux-utils -p policycoreutils -p policycoreutils-python-utils -p selinux-policy-base -f qemu
rm systemd-tests*.rpm
rpm -U /root/src/systemd-*.rpm

Additional program output to the terminal or log subsystem illustrating the issue

…
[root@localhost ~]# rpm -U /root/src/systemd-*.x86_64.rpm /root/src/systemd-rpm-macros-250.3-6.3.hs.el8.noarch.rpm /root/src/systemd-selinux-250.3-6.3.hs.el8.noarch.rpm 
Failed to resolve roleattributeset statement at /var/lib/selinux/targeted/tmp/modules/200/systemd_hs/cil:1
/usr/sbin/semodule:  Failed!
Failed to start jobs: Unknown method 'EnqueueMarkedJobs' or interface 'org.freedesktop.systemd1.Manager'.
Creating group 'sgx' with GID 106.
Creating group 'systemd-network' with GID 192.
Creating user 'systemd-network' (systemd Network Management) with UID 192 and GID 192.
Creating group 'systemd-oom' with GID 996.
Creating user 'systemd-oom' (systemd Userspace OOM Killer) with UID 996 and GID 996.
Creating group 'systemd-journal-remote' with GID 995.
Creating user 'systemd-journal-remote' (systemd Journal Remote) with UID 995 and GID 995.
Creating group 'systemd-timesync' with GID 994.
Creating user 'systemd-timesync' (systemd Time Synchronization) with UID 994 and GID 994.
Failed to start jobs: Unknown method 'EnqueueMarkedJobs' or interface 'org.freedesktop.systemd1.Manager'.

cc @keszybz I'm not really sure if we intend to support this use case or not but it'd be nice if we could support it.

Conan-Kudo commented 2 years ago

It would be nice to work out so that the community could get c8s->c9s upgrades working with dnf system-upgrade.

keszybz commented 2 years ago

Maybe a call to systemctl daemon-reexec at the right time would help?

poettering commented 1 year ago

So, what's the state here? is this even an upstream issue?

keszybz commented 1 year ago

So, what's the state here? is this even an upstream issue?

Do we support upgrades from such old versions? I guess at least in principle we do, we always tried to make daemon-reexec from old versions work.

But this is strange. In systemd.rpm's %post, systemctl daemon-reexec is done. So we must be running the latest systemd by the time the transfiletrigger macros are called. So maybe something is borked in the downstream rpm packaging that prevents the reexec from happening? I think this needs to be debugged downstream; right now it seems that the upstream macros are correct and this should work without any issues.