Bug 51301

Summary: ignore_errors ineffective when daemon_reload performed while relevant process is running
Product: systemd Reporter: ataraxia937
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: test case

Description ataraxia937 2012-06-21 08:05:38 UTC
Created attachment 63309 [details]
test case

When using a leading '-' in ExecStart, if a daemon-reload is performed while the command in question is still running, and it then exits with an abnormal status, the unit will enter the failed state, just as if the '-' had not been present.

This is easily reproduced by a trivial service unit and an equally trivial shell script, which I will attach as a test case.

I'm running systemd 185 on Arch Linux.

Detailed steps to reproduce:
1. Download the attachment and unpack it under /. This will put a shell script in /tmp/tf and a unit in /etc/systemd/system/tf.service .
2. Start tf.service. Check its status after 10 seconds have gone by. Observe that it exited with code 1, and systemd correctly ignored this exit-code.
2. Start tf.service again. Do a daemon-reload within the next 10 seconds (before /tmp/tf exits). Again check its status after 10 seconds have gone by. Observe that it again exited with code 1, but this time, systemd didn't ignore the exit-code, and the job incorrectly entered the failed state.
Comment 1 ataraxia937 2012-08-18 00:00:07 UTC
This problem is still evident with systemd 188.
Comment 2 Lennart Poettering 2019-08-19 13:31:11 UTC
This has long been fixed with the smarter logic of matching ExecXYZ= lines during daemon reloads. Let#s close.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.