Bug #13282
smartd service spawns multiple daemons
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
Description
The smartmontools SMF service will repeatedly start smartd daemons because it thinks each one has exited, causing multiple smartd processes to be running:
[ Apr 22 14:51:15 Executing start method ("/usr/sbin/smartd "). ] [ Apr 22 14:51:16 Stopping because all processes in service exited. ] [ Apr 22 14:51:16 Executing start method ("/usr/sbin/smartd "). ] [ Apr 22 14:51:16 Stopping because all processes in service exited. ] [ Apr 22 14:51:16 Executing start method ("/usr/sbin/smartd "). ] [ Apr 22 14:51:17 Stopping because all processes in service exited. ] [ Apr 22 14:51:17 Executing start method ("/usr/sbin/smartd "). ] [ Apr 22 14:51:17 Stopping because all processes in service exited. ] [ Apr 22 14:51:17 Executing start method ("/usr/sbin/smartd "). ] [ Apr 22 14:51:18 Stopping because all processes in service exited. ] [ Apr 22 14:51:18 Executing start method ("/usr/sbin/smartd "). ] [ Apr 22 14:51:18 Stopping because all processes in service exited. ] [ Apr 22 14:51:18 Executing start method ("/usr/sbin/smartd "). ] [ Apr 22 14:51:18 Stopping because all processes in service exited. ] [etc]
In fact, the daemon behaves conventionally and forks into the background. I believe this issue arises because the service model has been set to child rather than left at the default, contract, in the smartmontools.xml manifest:
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='child' />
</property_group>
(If the child model is wanted then smartd should be executed with the -n argument to prevent it forking into the background.)
Arguably, the package should instead install and use a method script like many other services do (example script and manifest attached, based on collectd).
Files
No data to display