Description of problem: I'm running Fedora in docker container and as a such it doesn't run systemd nor bus. If I try to install/upgrade/remove package which has systemd unit rpm trigger is invoked and runs systemctl daemon-reload. This isn't successful and prints "Failed to connect to bus: No such file or directory". Version-Release number of selected component (if applicable): systemd-231-3.fc26.x86_64 How reproducible: Always Steps to Reproduce: 1. docker run -ti fedora:rawhide bash 2. dnf upgrade --downloadonly -y dnf 3. cd /var/cache/dnf/rawhide-*/packages 4. rpm -Uvh *.rpm Actual results: In the output after dnf and libcomps I see: Cleaning up / removing... 26:dnf-yum-1.1.9-6.fc26 ################################# [ 58%] 27:dnf-1.1.9-6.fc26 ################################# [ 60%] Failed to connect to bus: No such file or directory 28:python3-dnf-1.1.9-6.fc26 ################################# [ 62%] ... 44:librepo-1.7.18-4.fc26 ################################# [ 98%] 45:libcomps-0.1.7-6.fc26 ################################# [100%] Failed to connect to bus: No such file or directory Expected results: No messages: Failed to connect to bus: No such file or directory Additional info: My rawhide Image has sha256:3bcdeb6ee43bf3dfffd130c5fe6b81d47b04aed315638a85fbf26760962d733e. I'm not sure how to pull it by this id though. I'm testing this in docker but I guess this can happen in mock, anaconda or other common environments where systemd is not running. File triggers.systemd (http://pkgs.fedoraproject.org/cgit/rpms/systemd.git/tree/triggers.systemd, upstream: https://github.com/systemd/systemd/blob/master/src/core/triggers.systemd.in) seems to be the code which fails here. I guess it could check if /var/run/dbus/system_bus_socket exists and reload it only if it does.
You're right, we should wrap this in a check that systemd is running. A better check would be that described in https://www.freedesktop.org/software/systemd/man/sd_booted.html, "test -e /run/systemd/system".
Created attachment 1238983 [details] patch I'll submit a proper pull request tomorrow ;)
https://github.com/systemd/systemd/commit/f0c03de85a
(In reply to Zbigniew Jędrzejewski-Szmek from comment #3) > https://github.com/systemd/systemd/commit/f0c03de85a I believe you have meant this one: https://github.com/systemd/systemd/commit/13749f547357f8e9ec398680548f818dea3aba1c
Indeed. Fixed in rawhide with systemd-232-11.fc26, reassigning to 25 which also needs the fix.
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.