Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307619 - sys-block/open-iscsi - broken initscript
Summary: sys-block/open-iscsi - broken initscript
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 340425
Blocks:
  Show dependency tree
 
Reported: 2010-03-03 14:08 UTC by Doktor Notor
Modified: 2012-02-09 09:20 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
initscript patch (iscsid-2.0.871-r1.init.d.diff,867 bytes, patch)
2010-03-03 14:09 UTC, Doktor Notor
Details | Diff
iscsid-init.d (iscsid-init.d,2.79 KB, text/plain)
2010-03-07 19:47 UTC, Stefan Behte (RETIRED)
Details
iscsid-conf.d (iscsid-conf.d,422 bytes, text/plain)
2010-03-07 19:48 UTC, Stefan Behte (RETIRED)
Details
iscsid-conf.d.patch (iscsid-conf.d.patch,320 bytes, patch)
2010-03-07 19:49 UTC, Stefan Behte (RETIRED)
Details | Diff
iscsid-init.d.patch (iscsid-init.d.patch,2.05 KB, patch)
2010-03-07 19:49 UTC, Stefan Behte (RETIRED)
Details | Diff
iscsid-init.d (iscsid-init.d,2.79 KB, text/plain)
2010-10-08 20:45 UTC, Stefan Behte (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Doktor Notor 2010-03-03 14:08:41 UTC
The initscript doesn't work at all - it fails to stop the thing everytime and subsequently fails to start as well, simply because:

- it sends SIGHUP to the process, which makes it reload the configuration instead of SIGTERM which would terminate it
- it tries to use $PID_FILE variable which is not definied anywhere, so it doesn't remove the pidfile either, plus the "ugly" portion of the script is not necessary at all, since the daemon removes its pidfile just fine once you tell it to terminate instead of reload config.

As a result, on repeated /etc/init.d/iscsid start the script seems to "fail" but repeated running instances of /usr/sbin/iscsid keep piling up instead.

Patch for 2.0.871-r1 attached.
Comment 1 Doktor Notor 2010-03-03 14:09:08 UTC
Created attachment 221933 [details, diff]
initscript patch
Comment 2 Stefan Behte (RETIRED) gentoo-dev Security 2010-03-07 19:40:44 UTC
An additional problem is, if you use AUTOSTARTTARGETS="yes" it will "return $?", then the runscript system thinks that iscsid wasn't started, but the deamon is indeed still running.

At that point, we could:
- run stop(), disconnect from already connected targets, unload iscsi modules
- ignore the error

Maybe we could add AUTOSTART="strict" which will run stop(); otherwise the error should be ignored. 

Opinions?
Comment 3 Stefan Behte (RETIRED) gentoo-dev Security 2010-03-07 19:47:53 UTC
Created attachment 222547 [details]
iscsid-init.d
Comment 4 Stefan Behte (RETIRED) gentoo-dev Security 2010-03-07 19:48:08 UTC
Created attachment 222549 [details]
iscsid-conf.d
Comment 5 Stefan Behte (RETIRED) gentoo-dev Security 2010-03-07 19:49:23 UTC
Created attachment 222551 [details, diff]
iscsid-conf.d.patch
Comment 6 Stefan Behte (RETIRED) gentoo-dev Security 2010-03-07 19:49:59 UTC
Created attachment 222553 [details, diff]
iscsid-init.d.patch
Comment 7 Doktor Notor 2010-03-07 21:14:56 UTC
(In reply to comment #2)
> Maybe we could add AUTOSTART="strict" which will run stop(); otherwise the
> error should be ignored. 

+1 on this... no need to stop() otherwise. And yeah, good point, the problem you've described is annoying as well.
Comment 8 Stefan Behte (RETIRED) gentoo-dev Security 2010-10-08 20:45:03 UTC
Created attachment 249972 [details]
iscsid-init.d
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-09 09:20:39 UTC
InCVS.