Description of problem: grub-boot-success.service should not be started inside systemd-nspawn container Version-Release number of selected component (if applicable): source: grub2-2.04-31.fc33.src.rpm binary: grub2-tools-2.04-31.fc33.x86_64.rpm How reproducible: always Steps to Reproduce: 1. Install Fedora Server 33 2. install systemd-container package: dnf install systemd-container 3. create test container: dnf --installroot=/var/lib/machines/test --releasever=33 install dnf systemd fedora-release openssh-clients openssh-server passwd vim mc 4. start test container: machinectl start test 5. enter inside test container: machinectl shell test 6. create user www inside container: useradd www 7. set password for user www inside container: passwd www 8. login to www via ssh inside container: ssh www@localhost 9. wait two minutes 10. check systemctl status for user www: systemctl --user Actual results: ● grub-boot-success.service loaded failed failed Mark boot as successful grub-boot-success.timer loaded active elapsed Mark boot as successful after the user session has run 2 minutes Host node journal fragment: Jan 09 22:56:38 test sshd[8786]: pam_unix(sshd:session): session opened for user www(uid=1000) by (uid=0) Jan 09 22:58:39 test systemd[8857]: Starting Mark boot as successful... Jan 09 22:58:39 test systemd[8857]: grub-boot-success.service: Main process exited, code=exited, status=1/FAILURE Jan 09 22:58:39 test systemd[8857]: grub-boot-success.service: Failed with result 'exit-code'. Jan 09 22:58:39 test systemd[8857]: Failed to start Mark boot as successful. Jan 09 22:58:39 test grub2-set-bootflag[10034]: Error canonicalizing /boot/grub2/grubenv filename: No such file or directory Expected results: grub-boot-success.timer should be disabled inside systemd-nspawn containers. Additional info: Patch to fix this bug: # diff -u /usr/lib/systemd/user/grub-boot-success.timer.orig /usr/lib/systemd/user/grub-boot-success.timer --- /usr/lib/systemd/user/grub-boot-success.timer.orig 2020-08-31 15:12:59.000000000 +0300 +++ /usr/lib/systemd/user/grub-boot-success.timer 2021-01-09 23:28:56.612000000 +0200 @@ -1,5 +1,6 @@ [Unit] Description=Mark boot as successful after the user session has run 2 minutes +ConditionVirtualization=!systemd-nspawn ConditionUser=!@system [Timer]
Updated patch to fix this bug: # diff -u /usr/lib/systemd/user/grub-boot-success.timer.orig /usr/lib/systemd/user/grub-boot-success.timer --- /usr/lib/systemd/user/grub-boot-success.timer.orig 2020-08-31 15:12:59.000000000 +0300 +++ /usr/lib/systemd/user/grub-boot-success.timer 2021-01-09 23:28:56.612000000 +0200 @@ -1,5 +1,6 @@ [Unit] Description=Mark boot as successful after the user session has run 2 minutes +ConditionVirtualization=!container ConditionUser=!@system [Timer]
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
FEDORA-2021-21ed0c951f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-21ed0c951f
FEDORA-2021-21ed0c951f has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.