Bug 961750

Summary: systemd: handling of masked unit is broken for v228
Product: [openSUSE] openSUSE Tumbleweed Reporter: Franck Bui <fbui>
Component: BasesystemAssignee: Franck Bui <fbui>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: systemd-maintainers
Version: Current   
Target Milestone: Current   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Franck Bui 2016-01-13 16:58:41 UTC
$ systemctl cat bug.service
[Unit]
Description=dummy service
Requires=masked.service 

[Service]
Type=simple
ExecStart=/bin/sleep 99999

$ systemclt mask masked.service
$ ls -l /etc/systemd/system/masked.service 
lrwxrwxrwx 1 root root 9 Jan 13 17:37 /etc/systemd/system/masked.service -> /dev/null

$ systemctl start bug.service
Failed to start bug.service: Unit masked.service is masked.


This defeats the purpose of masking.
Comment 1 Franck Bui 2016-01-15 07:55:48 UTC
It looks like the wanted behaviour in this case is not clearly defined and that brings some disagreements.

So I asked clarification to upstream:
https://github.com/systemd/systemd/pull/2322

but whatever the answer, either TW/Factory (>v218) or SLE12-SP1 are broken, will see.
Comment 2 Franck Bui 2016-02-12 07:52:21 UTC
Apparantly the desired behavior is to fail when starting a unit requiring a masked one.

So v210 is correct in this regard, but v228 is not.

This has been fixed upstream:
https://github.com/systemd/systemd/pull/2565

Please note that this implies also a change in basic.target which had previously RequiresMountsFor=/tmp and it's been changed to Wants=tmp.mount. Otherwise masking tmp.mount as it's described in the official documentation to disable tmpfs on /tmp wouldn't work anymore.
Comment 4 Benjamin Brunner 2019-06-12 09:35:11 UTC
This bug has been reviewed due to our Bug Squash.

Already fixed in SLE 12 >= SP2 and Tumbleweed.

Closing.