Bug 861111 - iscsiadm can't discovery targets using port number when hostname is defined on /etc/hosts
iscsiadm can't discovery targets using port number when hostname is defined o...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iscsi-initiator-utils (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Chris Leech
Bruno Goncalves
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 10:26 EDT by Bruno Goncalves
Modified: 2015-03-26 11:26 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-26 11:26:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bruno Goncalves 2012-09-27 10:26:03 EDT
Description of problem:
Host defined on /etc/hosts cannot be resolved when specifying port number.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.echo 127.0.0.1 localhost_ipv4 >> /etc/hosts

2.iscsiadm -m discovery -t st -p "localhost_ipv4:3260" -I default  -P1
iscsiadm: Cannot resolve host localhost_ipv4:3260. getaddrinfo error: [Name or service not known]

iscsiadm: cannot resolve host name localhost_ipv4:3260
iscsiadm: cannot resolve host name localhost_ipv4:3260

  

Expected results:
It should be able to discovery the target. Without the port it works fine
iscsiadm -m discovery -t st -p "localhost_ipv4" -I default  -P1

[  OK  ] iscsid: [  OK  ]
Target: iqn.2009-10.com.redhat:storage-1
	Portal: 127.0.0.1:3260,1
		Iface Name: default
Discovered the following portals:
	127.0.0.1
Discovered the following interfaces:
	default
Discovered the following targets:
	iqn.2009-10.com.redhat:storage-1


Additional info:
This issue does not happen on RHEL6.3
Comment 1 Bruno Goncalves 2012-09-27 10:28:28 EDT
iscsi-initiator-utils-6.2.0.872-18.el7.x86_64
kernel: 3.3.0-0.20.el7.x86_64
Comment 6 Bruno Goncalves 2013-08-20 05:10:16 EDT
I tested iscsi-initiator-utils-6.2.0.873-7.el7 and it fixes the problem.
Comment 8 Ludek Smid 2014-06-26 06:43:58 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.
Comment 9 Ludek Smid 2014-06-26 07:15:07 EDT
The comment above is incorrect. The correct version is bellow.
I'm sorry for any inconvenience.
---------------------------------------------------------------

This request was NOT resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you need
to escalate this bug.

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