ipmievd fails to start when a stray PID file exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ipmitool (Ubuntu) |
Expired
|
Medium
|
Unassigned |
Bug Description
root@controller
* ipmievd.service - IPMI event daemon
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Tue 2016-08-30 09:22:42 UTC; 1min 55s ago
Main PID: 4537 (code=exited, status=1/FAILURE)
Aug 30 09:22:42 controller-node14 systemd[1]: Starting IPMI event daemon...
Aug 30 09:22:42 controller-node14 ipmievd[14350]: PID file '/var/run/
Aug 30 09:22:42 controller-node14 ipmievd[14350]: Perhaps another instance is already running.
Aug 30 09:22:42 controller-node14 systemd[1]: ipmievd.service: Control process exited, code=exited status=1
Aug 30 09:22:42 controller-node14 systemd[1]: Failed to start IPMI event daemon.
Aug 30 09:22:42 controller-node14 systemd[1]: ipmievd.service: Unit entered failed state.
Aug 30 09:22:42 controller-node14 systemd[1]: ipmievd.service: Failed with result 'exit-code'.
root@controller
root 2792 0.0 0.0 0 0 ? SN Aug29 0:06 [kipmi0]
root 14513 0.0 0.0 15292 2004 pts/1 S+ 09:24 0:00 grep --color=auto ipmi
root@controller
-rw-r--r-- 1 root root 5 Aug 29 14:30 /var/run/
root@controller
4537
root@controller
root 14519 0.0 0.0 15292 2104 pts/1 S+ 09:25 0:00 grep --color=auto 4537
root@controller
Expected behaviour: The bogus PID file should be deleted and the daemon started successfully.
Changed in ipmitool (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in ipmitool (Ubuntu): | |
status: | Triaged → Confirmed |
Hi Jens,
I have to beg your pardon for so long inactivity. But I'm currently checking outdated bugs so it is a lot of apologizing in general :-/
But about the matter, I wondered about the pidfile as the systemd unit doesn't talk about one.
It seems that you can trigger that without any systemd/init at all.
Just on a system run (yes two times): ipmievd. pid0' already exists.
$ sudo ipmievd open daemon
$ sudo ipmievd open daemon
PID file '/var/run/
Perhaps another instance is already running
After that was clear I considered that the pidfile was misleading and that has to be part of the ipmi code itself.
And I found it in src/ipmievd.c.
Overall it seems that the logic is to call ipmievd_cleanup on a sighandler to clean up.
But there seem to be paths (like the double call I have mentioned above) that go by, stop the daemon and leave the pidfile.
That said that should be reported upstream.
If you'd be so kind to do so and link the bug here to be tracked that would be great.