[systemd-bugs] [Bug 89587] New: Executing a service with RuntimeDirectory= produces an error: Failed at step RUNTIME_DIRECTORY spawning /bin/bash: File exists
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Mar 16 01:45:43 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=89587
Bug ID: 89587
Summary: Executing a service with RuntimeDirectory= produces an
error: Failed at step RUNTIME_DIRECTORY spawning
/bin/bash: File exists
Product: systemd
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: gsbox39stz at thurston.ru
QA Contact: systemd-bugs at lists.freedesktop.org
This is the unit I came up with called co2mon-log.service:
[Unit]
Description=Log Data From CO2Mon
PartOf=co2mon.service
[Service]
User=co2mon
Group=co2mon
RuntimeDirectory=co2mon
RuntimeDirectoryMode=0755
WorkingDirectory=/run/co2mon
StandardOutput=null
ExecStartPre=/usr/bin/rsync -a /var/lib/co2mon/ /run/co2mon
ExecStart=/bin/bash ./update_data.sh
ExecStopPost=-/bin/cp -p /run/co2mon/graph.rrd /var/lib/co2mon/
[Install]
WantedBy=multi-user.target
Starting it manually produces an error:
● co2mon-log.service - Log Data From CO2Mon
Loaded: loaded (/usr/lib64/systemd/system/co2mon-log.service; disabled;
vendor preset: enabled)
Active: failed (Result: exit-code) since 月 2015-03-16 11:36:02 MSK; 1s ago
Process: 15105 ExecStopPost=/bin/cp -p /run/co2mon/graph.rrd /var/lib/co2mon/
(code=exited, status=233/RUNTIME_DIRECTORY)
Process: 15104 ExecStart=/bin/bash ./update_data.sh (code=exited,
status=233/RUNTIME_DIRECTORY)
Process: 15098 ExecStartPre=/usr/bin/rsync -a /var/lib/co2mon/ /run/co2mon
(code=exited, status=0/SUCCESS)
Main PID: 15104 (code=exited, status=233/RUNTIME_DIRECTORY)
3月 16 11:36:02 melforce systemd[1]: Starting Log Data From CO2Mon...
3月 16 11:36:02 melforce systemd[1]: Started Log Data From CO2Mon.
3月 16 11:36:02 melforce systemd[15104]: Failed at step RUNTIME_DIRECTORY
spawning /bin/bash: File exists
3月 16 11:36:02 melforce systemd[1]: co2mon-log.service: main process exited,
code=exited, status=233/RUNTIME_DIRECTORY
3月 16 11:36:02 melforce systemd[15105]: Failed at step RUNTIME_DIRECTORY
spawning /bin/cp: File exists
3月 16 11:36:02 melforce systemd[1]: Unit co2mon-log.service entered failed
state.
3月 16 11:36:02 melforce systemd[1]: co2mon-log.service failed.
If I commment out options RuntimeDirectory= and RuntimeDirectoryMode= and
create directory /run/co2mon by hand giving it co2mon:co2mon ownership and mode
755, my unit starts successfully.
systemd version is 219.
I've read the manual systemd.exec and I think there are no problems with the
unit itself.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150316/6e53bb58/attachment.html>
More information about the systemd-bugs
mailing list