| Summary: | iscsiadm does not support hostname with port | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Bruno Goncalves <bgoncalv> |
| Component: | iscsi-initiator-utils | Assignee: | Andy Grover <agrover> |
| Status: | CLOSED ERRATA | QA Contact: | Bruno Goncalves <bgoncalv> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.3 | CC: | coughlan, fge, fsimonce, mchristi |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: iscsiadm did not parse the hostname and port properly when they were passed into discovery and login commands.
Consequence: The login or discovery operation would fail, because iscsiadm would not be able to fine the record for the portal.
Fix: The iscsiadm portal processing was modified to check for ports after hostnames.
Result: Hostnames are now supported as portal arguments in iscsiadm.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-06-20 14:49:10 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
*** Bug 800864 has been marked as a duplicate of this bug. *** Fixed in iscsi-initiator-utils-6.2.0.872-37.el6. This bug has been fixed on iscsi-initiator-utils-6.2.0.872-37.el6.
--------
service tgtd restart
Stopping SCSI target daemon: not running [FAILED]
Starting SCSI target daemon: [ OK ]
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.1994-05.com.redhat:tgtd-1
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
dd if=/dev/zero of=/tmp/disk.1 bs=1M count=0 seek=100
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3.599e-05 s, 0.0 kB/s
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /tmp/disk.1
iscsiadm -m discovery -t st -p "localhost:3260" -I default -P1
Starting iscsid: [ OK ]
Target: iqn.1994-05.com.redhat:tgtd-1
Portal: [::1]:3260,1
Iface Name: default
iscsiadm -m node -l
Logging in to [iface: default, target: iqn.1994-05.com.redhat:tgtd-1, portal: ::1,3260] (multiple)
Login to [iface: default, target: iqn.1994-05.com.redhat:tgtd-1, portal: ::1,3260] successful.
Looks like there was some regression using localhost IPV6 format (::1).
If add it [] ([::1]) works.
----------
rpm -q iscsi-initiator-utils
iscsi-initiator-utils-6.2.0.872-36.el6.x86_64
iscsiadm -m discovery -t st -p "::1" -I default -P1
Starting iscsid: [ OK ]
Target: iqn.1994-05.com.redhat:tgtd-1
Portal: [::1]:3260,1
Iface Name: default
rpm -q iscsi-initiator-utils
iscsi-initiator-utils-6.2.0.872-37.el6.x86_64
iscsiadm -m discovery -t st -p "::1" -I default -P1
Starting iscsid: [ OK ]
iscsiadm: Cannot resolve host . getaddrinfo error: [Name or service not known]
iscsiadm: cannot resolve host name
iscsiadm: cannot resolve host name
iscsiadm: No portals found
iscsiadm -m discovery -t st -p "[::1]" -I default -P1
Target: iqn.1994-05.com.redhat:tgtd-1
Portal: [::1]:3260,1
Iface Name: default
Fixed in iscsi-initiator-utils-6.2.0.872-38.el6. Everything is working now on iscsi-initiator-utils-6.2.0.872-38.el6.x86_64
rpm -q iscsi-initiator-utils
iscsi-initiator-utils-6.2.0.872-38.el6.x86_64
service tgtd restart
Stopping SCSI target daemon: not running [FAILED]
Starting SCSI target daemon: [ OK ]
tgtadm --lld iscsi --op new --mode target --tid 1 -T
iqn.1994-05.com.redhat:tgtd-1
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
dd if=/dev/zero of=/tmp/disk.1 bs=1M count=0 seek=100
0+0 records in
0+0 records out
0 bytes (0 B) copied, 3.599e-05 s, 0.0 kB/s
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /tmp/disk.1
iscsiadm -m discovery -t st -p "::1" -I default -P1
Starting iscsid: [ OK ]
Target: iqn.1994-05.com.redhat:tgtd-1
Portal: [::1]:3260,1
Iface Name: default
iscsiadm -m discovery -t st -p "localhost:3260" -I default -P1
Starting iscsid: [ OK ]
Target: iqn.1994-05.com.redhat:tgtd-1
Portal: [::1]:3260,1
Iface Name: default
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Cause: iscsiadm did not parse the hostname and port properly when they were passed into discovery and login commands.
Consequence: The login or discovery operation would fail, because iscsiadm would not be able to fine the record for the portal.
Fix: The iscsiadm portal processing was modified to check for ports after hostnames.
Result: Hostnames are now supported as portal arguments in iscsiadm.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0957.html |
Description of problem: When trying to run discovery using hostname and port it does not work. This problem seems to apply only to host definition on /etc/hosts. With DNS hostname it works fine. Version-Release number of selected component (if applicable): iscsi-initiator-utils-6.2.0.872-34.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. install scsi-target-utils 2. service tgtd restart 3. tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.1994-05.com.redhat:tgtd-1 4. tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL 5. Create disk for LUN: mktemp /tmp/disk.XXXXX dd if=/dev/zero of=/tmp/disk.XXXXX bs=1M count=0 seek=100 6. tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /tmp/disk.XXXXX 7. iscsiadm -m discovery -t st -p "localhost:3260" -I default -P1 iscsiadm: Cannot resolve host localhost:3260. getaddrinfo error: [Name or service not known] iscsiadm: cannot resolve host name localhost:3260 iscsiadm: cannot resolve host name localhost:3260 iscsiadm: No portals found --------------- For DNS hostname it works iscsiadm -m discovery -t st -p "localhost.localdomain:3260" -I default -P1 Target: iqn.1994-05.com.redhat:tgtd-1 Portal: [::1]:3260,1 Iface Name: default Actual results: Cannot resolve host Expected results: Discovery should work