Bug 167973 - iscsi reload can hang during "iscsi-rescan" if targets are unreachable
iscsi reload can hang during "iscsi-rescan" if targets are unreachable
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: iscsi-initiator-utils (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike Christie
:
Depends On:
Blocks: 181409
  Show dependency treegraph
 
Reported: 2005-09-09 17:26 EDT by Dave Wysochanski
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2006-0495
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-10 17:53:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
iscsi-kill-session (1.75 KB, text/plain)
2005-09-09 17:26 EDT, Dave Wysochanski
no flags Details

  None (edit)
Description Dave Wysochanski 2005-09-09 17:26:31 EDT
Description of problem:

If any targets are unreachable, and you try an "iscsi reload", the command will
hang indefinately.  

I came up with another simple script that issues the kill session command, and
seems to work ok in the session hangs I found.  I'll attach the script and let
you all decide whether you think this is ok to include or not - seems to meet my
needs but you may have issues with including it.  Also, for this particular
problem, there may be other more elegant solutions but I thought the simple
script was worth mentioning since it solved my problems.

Note that the README states how to shutdown sessions (see below), but having a
simple utility do it seems worth considering.

  Note that any configuration changes will not affect existing target sessions.
  For example, removal of a DiscoveryAddress entry from /etc/iscsi.conf
  will not cause the removal of sessions to targets discovered through this
  DiscoveryAddress, but it will cause the removal of the discovery session
  corresponding to the deleted DiscoveryAddress.
  To remove these sessions execute the following for each of these sessions:
  - Set ConnFailTimeout, ResetTimeout and AbortTimeout on the session to a low
    value, like 5 seconds through sysfs by executing the following commands:
    echo 5 > /sys/class/scsi_host/host<host_no>/connfail_timeout
    echo 5 > /sys/class/scsi_host/host<host_no>/reset_timeout
    echo 5 > /sys/class/scsi_host/host<host_no>/abort_timeout
  - Stop IOs to all the devices discovered through the session.
  - If these devices have been mounted, unmount them.
  - Shutdown the session through sysfs by executing the following command:
    echo > /sys/class/scsi_host/host<host_no>/shutdown
    where <host_no> is the Host Number of the session that has to be removed.



Version-Release number of selected component (if applicable):
iscsi-initiator-utils-4.0.3.0-2

How reproducible:
Every time

Steps to Reproduce:
1. Enter DiscoveryAddress=IP1 into /etc/iscsi.conf
2. /etc/init.d/iscsi start
3. Add DiscoveryAddress=IP2 in /etc/iscsi.conf
4. Somehow make target on IP1 unreachable (pull cable, stop iscsi on target
side, etc)
5. /etc/init.d/iscsi reload *command hang*
  
Actual results:
"/etc/init.d/iscsi reload" hangs indefinately

Expected results:
"/etc/init.d/iscsi reload" should not hang indefinately

Additional info:
Comment 1 Dave Wysochanski 2005-09-09 17:26:32 EDT
Created attachment 118667 [details]
iscsi-kill-session
Comment 2 Dave Wysochanski 2005-09-09 17:30:04 EDT

*** This bug has been marked as a duplicate of 167946 ***
Comment 3 Mike Christie 2006-01-28 18:26:24 EST
This bug is to add the iscsi-kill-session script created by Netapp to U4. This
is a dulpicate of BZ 167946, but for that BZ we did a fix for the rescan part in
U3. This bug is to get the second part of the fix into U4.
Comment 8 Red Hat Bugzilla 2006-08-10 17:53:41 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0495.html

Note You need to log in before you can comment on or make changes to this bug.