Bug 736957

Summary: iscsiadm are showing "no route to host" when scsi-target firewall REJECT the 3260 port.
Product: Red Hat Enterprise Linux 6 Reporter: Gris Ge <fge>
Component: iscsi-initiator-utilsAssignee: Andy Grover <agrover>
Status: CLOSED NOTABUG QA Contact: Storage QE <storage-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: coughlan, czhang, mchristi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-02 21:47:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 767187    

Description Gris Ge 2011-09-09 07:50:18 UTC
Description of problem:
iscsiadm are showing "no route to host" when scsi-target firewall REJECT the 3260 port.
==
iscsiadm: cannot make connection to 10.66.13.207: No route to host
==
This error message are quit confusing.
The correct should be "Connection was reset" if got firewall blocking.

Version-Release number of selected component (if applicable):
iscsi-initiator-utils-6.2.0.872-25.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start tgtd on a server with firewall REJECT 3260 port.
2. Try to perfrom discovery st to that tgtd.
3. Check the error message.
  
Actual results:
iscsiadm: cannot make connection to 10.66.13.207: No route to host

Expected results:
iscsiadm: cannot make connection to 10.66.13.207: Connection was reset or target port not open.

Additional info:
In this case, firewall was set to REJECT (RHEL default setting), so that iscsi got instantly reply of FIN, in this case, we inform user as connection was reset or target port no open.
If firewall was set to DROP, iscsi will timeout.

Comment 1 Mike Christie 2011-09-13 22:00:19 UTC
(In reply to comment #0)
> Description of problem:
> iscsiadm are showing "no route to host" when scsi-target firewall REJECT the
> 3260 port.
> ==
> iscsiadm: cannot make connection to 10.66.13.207: No route to host
> ==
> This error message are quit confusing.
> The correct should be "Connection was reset" if got firewall blocking.
> 

I do not really have any control over the error message. I do not really know what is going on at the TCP/IP level. I am just opening a socket, and then I get back some error value in the errno value. I then do strerror(errno) to get the string.

Do you see the same incorrect error message with other apps? If so, I think this is a common bug in the network kernel code or libc code and we should fix it there.

Comment 4 Mike Christie 2012-03-22 06:52:57 UTC
Gris,

I am going to close this or reassign. There is nothing the iscsi tools can do here. We get "no route to host" from the tcp/ip layer. The iscsi layer uses normal old sockets, so we do not have any control over what they are returning.