Project

General

Profile

Bug #13282

smartd service spawns multiple daemons

Added by Ade Rixon 25 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
OI-Userland
Target version:
-
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

smartd (774 Bytes) smartd Example smartd method script Ade Rixon, 2020-11-05 09:22 AM
smartmontools.xml (1.22 KB) smartmontools.xml Revised smartmontools manifest Ade Rixon, 2020-11-05 09:22 AM

No data to display

Also available in: Atom PDF