[Stgt-devel] [PATCH] in tgt-setup-lun: fix check if tgtd daemon is running
Mon Apr 7 10:15:36 CEST 2008
FUJITA Tomonori wrote:
>>> But the old script checks there are two tgtd daemons running. The new
>>> one doesn't. Can you improve the new one to do that?
>> Why tgtd has two daemons (process)?
> One daemon does only logging and another (the main daemon) does the
> rest. Two daemons use shared memory.
>> When running tgtd with -f flag it has only one process,
>> why is it?
> It's just for debugging.
>> So if I'll check for two process the script will exit.
>>> Note that one of the two tgtd daemons could die due to a bug.
>> When does it happen?
> It happens when we put a bug to the main daemon.
For conclusion, we can check if there are two process
running but then if some one use tgtd with -f flag the
script will not work.
On the other hand, we can check if such process exists
(without checking the amount of process).
This way, the script will work on both cases but
won't catch the bug on the main daemon (if exist).
Which solution should we use?
More information about the stgt