Hi Mike:

Just a heads up that stopping the open-iscsi iscsid daemon using systemd 
doesn't seem to be working correctly, at least not on SUSE SLE 12.

When I have one or more sessions present, and their startup value is set to 
"manual", when I try to stop the iscsid service, I get:

    # systemctl stop iscsid.service
    Job for iscsid.service canceled.

And a "ps" shows that iscsid is still running, but under a new process id. 
And, at times, I see that "iscsiadm -k 0 2" is hung.

Note that my systemd iscsid.service unit file looks like:

    [Unit]
    Description=Open-iSCSI
    Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
    DefaultDependencies=no
    After=network.target iscsiuio.service
    Before=remote-fs-pre.target

    [Service]
    Type=simple
    ExecStart=/sbin/iscsid -f
    ExecStop=/sbin/iscsiadm -k 0 2

    [Install]
    WantedBy=multi-user.target
    Also=iscsid.socket

While trying to track down this problem, I found a couple of issues:

1. I don't know what the "2" is on the "iscsiadm -k 0 2" is for. I see that 
command in systemd unit file in your master branch, and I see that other 
distributions use that, but the "2" seems to be ignored.

2. It looks like the "iscsiadm -k 0" is stopping the iscsi daemon, but that 
systemd is restarting it! I'm guessing this because (a) I get the 
"cancelled" message, and (b) iscsid is still running, but as a new process, 
i.e. it's been restarted.

I thought perhaps the problem was related to running iscsid as a "simple" 
service, in the foreground, but changing Type to forking and removing the 
"-f" from the iscsid command line did not change anything.

Then I simply commented out the "ExecStop" line, and iscsid now shutdowns 
correctly. This, I believe, is because systemd is shutting it down by 
sending first SIGHUP then SIGKILL, as per "man systemd.kill".

Before I comment out the "ExecStop=" for all SLE 12 users, I wondered if 
you've heard of any problems along these lines.

-- 
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 http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to