Hi Lee,

On 20 November 2016 at 00:14, Lee Duncan <[email protected]> wrote:
>
>> On Nov 19, 2016, at 12:57 PM, Vanush Misha Paturyan <[email protected]>
>> wrote:
>> is it possible to run more than one daemon on the same server? Maybe it will
>> be enough just to modify iscsiadm to check first if daemon is running before
>> trying to stop it?
>
>
> No, right now there is only one iscsid daemon, normally. Systemd has no
> concept of multiple daemons for iscsi.
>
> Normally it is the job of iscsiadm to send messages for this kind of thing
> to iscsid. Systemd normally starts iscsid if it is not running, so iscsiadm
> doesn’t normally need to worry about that. Plus, if systemd is not running
> iscsiadm has a configuration option to start iscsid manually, if needed.
> This handles every other case of iscsiadm talking to iscsid except this one.
>
> I have prototyped a patch that has iscsiadm check to see if iscsid is
> running before trying to kill it. It uses “kill(0)” but requires the caller
> to pass in the PID of iscsid. If you can think of a better and simpler way
> for iscsiadm to detect if iscsid is running, I’m open for a different
> approach.
>

That is the bit I don't like. If there should be only one iscsid
running, then there's no point in passing a PID number to iscsiadm to
kill it, is there?
iscsiadm should check if iscsid running or not and kill it if it is
not. Users shouldn't try to figure out the PID of the iscsid daemon
before passing it to the tool that suppose to control it.

But I can see that if iscsiadm is trying to check if the daemon is
running or not by checking for the presence of the socket that will
force systemd to start the daemon.

Speaking of different distros I am using Arch Linux, and it start
iscsid as a "forking" daemon via .service file, but I am interested to
test out your approach as well. I like the idea that if end user does
not want iscsi to be running (when for example when he does not log
into any nodes on bootup) then he can have iscsid be switched
completely, and activated only when he decides to log into iscsi
target). Can you share your systemd unit files with me?

cheers,

misha

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to