Bug 167973 - iscsi reload can hang during "iscsi-rescan" if targets are unreachable
Summary: iscsi reload can hang during "iscsi-rescan" if targets are unreachable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: iscsi-initiator-utils
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Mike Christie
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 181409
TreeView+ depends on / blocked
 
Reported: 2005-09-09 21:26 UTC by Dave Wysochanski
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHBA-2006-0495
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-10 21:53:41 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0495 0 normal SHIPPED_LIVE iscsi-initiator-utils bug fix update 2006-08-10 04:00:00 UTC

Description Dave Wysochanski 2005-09-09 21:26:31 UTC
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 21:26:32 UTC
Created attachment 118667 [details]
iscsi-kill-session

Comment 2 Dave Wysochanski 2005-09-09 21:30:04 UTC

*** This bug has been marked as a duplicate of 167946 ***

Comment 3 Mike Christie 2006-01-28 23:26:24 UTC
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 21:53:41 UTC
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.