[Bug 1213788] New: systemd units under /usr/local don't work properly
https://bugzilla.suse.com/show_bug.cgi?id=1213788 Bug ID: 1213788 Summary: systemd units under /usr/local don't work properly Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: seroton10@gmail.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- /usr/local/lib/systemd/system is a location where systemd sources system units, as stated in systemd.unit(5). On a default install of openSUSE Tumbleweed, with a root filesystem of type btrfs, and with snapshots, /usr/local is mounted as a subvolume to avoid it being modified in case of an OS rollback. This combination causes systemd units under /usr/local/lib/systemd/system to not work properly. Service and timer units stored there are found, and can be enabled, but they don't actually run as expected on reboot. If ext4 is used as root filesystem, it works as expected. Tested on Tumbleweed 20230728. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1213788 https://bugzilla.suse.com/show_bug.cgi?id=1213788#c1 --- Comment #1 from Olav Reinert <seroton10@gmail.com> --- Just to be clear: This isn't an issue with btrfs or snapshotting in itself. The same issue occurs if a plain partition is mounted at /usr/local. I only describe the subvolume mount in the error description because it's what you get after a standard install. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1213788 https://bugzilla.suse.com/show_bug.cgi?id=1213788#c3 --- Comment #3 from Olav Reinert <seroton10@gmail.com> --- On transactional systems, /etc is a fairly complicated mounted filesystem, yet it is still possible to put unit files in it. So if it can be done for /etc, why not for /usr/local, too? -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1213788 https://bugzilla.suse.com/show_bug.cgi?id=1213788#c6 Olav Reinert <seroton10@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS Flags|needinfo?(lukas.kucharczyk@ | |suse.com) | --- Comment #6 from Olav Reinert <seroton10@gmail.com> --- (In reply to Franck Bui from comment #4)
If you put unit files in /usr/local you need to tag this directory to be mounted earlier in initrd as described in https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP2/index. html#systemsManagement.
Thank you for the tip, this solves the issue for me. As far as I am concerned, this bug can be closed now.
For some reasons this release note hasn't been forward ported to more recent versions of SLE, that's probably a bug.
If you wish, you can also keep this bug report open and repurpose it to track the documentation bug. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1213788 https://bugzilla.suse.com/show_bug.cgi?id=1213788#c8 --- Comment #8 from Olav Reinert <seroton10@gmail.com> --- Having read the discussion on the upstream bug report, I agree with Pöttering that /usr/local should not automatically be mounted in initrd, but only when admins ask for it (because, supposedly, they know what they're doing). -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1213788 https://bugzilla.suse.com/show_bug.cgi?id=1213788#c9 --- Comment #9 from Olav Reinert <seroton10@gmail.com> --- It seems I must have done something wrong when I tested the proposed solution (from the SLE 15 SP2 release notes), because it doesn't actually work. The correct mount option is "x-initrd.mount", as stated in the systemd.mount(5) man page. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com