I agree with reverting change in bionic, and that xenial still needs some fix.
I recreated your failure in xenial and agree with your change there.
I used this job as it actually tries to write to the private tmp.
If I change 'ExecStart' below to be just '/bin/true' like in your job, it does not fail (status says 'code=exited, status=0/SUCCESS). But the command below seems to never get exited (it produces no output).
So it seems to me that the 'Read only filesystem' error is not even from the service itself, but rather from systemd, and also dependent on the content in ExecStart.
I agree with reverting change in bionic, and that xenial still needs some fix.
I recreated your failure in xenial and agree with your change there.
I used this job as it actually tries to write to the private tmp.
If I change 'ExecStart' below to be just '/bin/true' like in your job, it does not fail (status says 'code=exited, status=0/SUCCESS). But the command below seems to never get exited (it produces no output).
So it seems to me that the 'Read only filesystem' error is not even from the service itself, but rather from systemd, and also dependent on the content in ExecStart.
$ cat /lib/systemd/ system/ my-ptmp- test.service cies=no multi-user. target
[Unit]
Description=foo
DefaultDependen
[Service]
Type=oneshot
PrivateTmp=yes
ExecStart=/bin/sh -ec 'f=/tmp/my.txt; uptime > $f; echo ==; cat $f; echo ==; cat /proc/mounts'
[Install]
WantedBy=
Then we can see the same failure:
$ journalctl -o short-monotonic --no-pager | grep --context=2 my-ptmp-test 20180223- 142555 systemd[1]: Created slice System Slice. 20180223- 142555 systemd[1]: Created slice system- systemd\ x2dfsck. slice. 20180223- 142555 systemd[1]: my-ptmp- test.service: Failed to run 'start' task: Read-only file system 20180223- 142555 systemd[1]: Failed to start foo. 20180223- 142555 systemd[1]: my-ptmp- test.service: Unit entered failed state. 20180223- 142555 systemd[1]: my-ptmp- test.service: Failed with result 'resources'. 20180223- 142555 systemd[1]: Starting Load Kernel Modules... 20180223- 142555 systemd[1]: Starting Journal Service...
[ 7.715220] xenial-
[ 7.718923] xenial-
[ 7.740250] xenial-
[ 7.749135] xenial-
[ 7.754114] xenial-
[ 7.760217] xenial-
[ 7.764170] xenial-
[ 7.775558] xenial-
$ systemctl status my-ptmp- test.service --no-pager --full test.service - foo system/ my-ptmp- test.service; enabled; vendor preset: enabled)
● my-ptmp-
Loaded: loaded (/lib/systemd/
Active: failed (Result: resources)