Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 321125 - sys-block/iscsitarget: ietd service won't stop if daemon was already killed
Summary: sys-block/iscsitarget: ietd service won't stop if daemon was already killed
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Deadline: 2019-11-05
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard: Waiting for upstream
Keywords: Bug, PMASKED, UPSTREAM
Depends on: 262154
Blocks:
  Show dependency tree
 
Reported: 2010-05-22 21:48 UTC by Jack Daniels
Modified: 2019-11-05 22:36 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Daniels 2010-05-22 21:48:27 UTC
Start the ietd service; /etc/init.d/ietd start.

Kill the service; killall ietd.

Try and stop the service; /etc/init.d/ietd stop.
* Removing iSCSI Enterprise Target devices  [!!!]
* ietadm failed - Connection refused.

The and start the service again; /etc/init.d/ietd start
* WARNING:  ietd has already been started.

The issue is the init.d script. On line 86, it gets the output text of the ietadm app. If ietd was killed or crashed, ietadm will say "Connection refused." and return an error code. On line 88, we should hand-wave this past; it's a hack, but so is the whole stop() function:

Change
if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] ; then
To
if [ $RETVAL -eq 0 ] && [ "$RETURN" != "something wrong" ] || [ "$RETURN" = 'Connection refused.' ] ; then

Reproducible: Always

Steps to Reproduce:
Comment 1 Wormo (RETIRED) gentoo-dev 2010-06-04 06:56:58 UTC
Thanks for submitting your change to ietd init script -- assigning to maintainers
Comment 2 Stefan Behte (RETIRED) gentoo-dev Security 2010-06-19 17:08:05 UTC
This is the wrong way to go. Upstream needs to fix ietd to send an other return code, if it fails.
Comment 3 Richard Yao (RETIRED) gentoo-dev 2013-01-03 11:18:04 UTC
As of today, I have taken over primary maintainership of this package from base-system. I am reassigning this bug to myself.
Comment 4 Jonas Stein gentoo-dev 2018-10-04 21:23:55 UTC
Any news? Is there a link to an upstream ticket?
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-11-05 22:36:13 UTC
removed.