Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1389300 - iSCSILogicalUnit should listen on ipv6 by default
iSCSILogicalUnit should listen on ipv6 by default
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: resource-agents (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Oyvind Albrigtsen
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-27 08:10 EDT by michal novacek
Modified: 2017-08-01 10:55 EDT (History)
3 users (show)

See Also:
Fixed In Version: resource-agents-3.9.5-88.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 10:55:11 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1844 normal SHIPPED_LIVE resource-agents bug fix and enhancement update 2017-08-01 13:49:20 EDT

  None (edit)
Description michal novacek 2016-10-27 08:10:37 EDT
Description of problem:

By default it only listens on ipv4 port 3260. The resource agent should either listen on ipv6 by default or have the possibility to turn it on which I believe is not possible right now.

Version-Release number of selected component (if applicable):
resource-agents-3.9.5-82.el7.x86_64

Actual results: iSCSILogicalUnit listening on ipv4 only

Expected results: iSCSILogicalUnit listening on both ipv6 and ipv4
Comment 2 Oyvind Albrigtsen 2017-02-24 04:22:25 EST
Tested and working patch: https://github.com/ClusterLabs/resource-agents/pull/931
Comment 3 Oyvind Albrigtsen 2017-02-24 05:05:11 EST
Step by step reproducer:
Setup:
# yum install -y targetcli
# targetcli
/> cd /iscsi
/iscsi> create
Created target iqn.2003-01.org.linux-iscsi.rhel7-1.x8664:sn.d1da1c08cd15.
...
Created default portal listening on all IPs (0.0.0.0), port 3260.

Note the target ID.


Before:
# pcs resource create iSCSI1 iSCSILogicalUnit target_iqn="iqn.2003-01.org.linux-iscsi.rhel7-1.x8664:sn.d1da1c08cd15" lun=0 path=/dev/sdb

Check that it's running without any issues
# pcs status
# targetcli
/iscsi> ls /
...
  o- iscsi ........................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.rhel7-1.x8664:sn.d1da1c08cd15 ..... [TPGs: 1]
  |   o- tpg1 ........................................... [no-gen-acls, no-auth]
  |     o- acls ...................................................... [ACLs: 0]
  |     o- luns ...................................................... [LUNs: 1]
  |     | o- lun0 .................................... [block/iSCSI1 (/dev/sdb)]
  |     o- portals ................................................ [Portals: 1]
  |       o- 0.0.0.0:3260 ................................................. [OK]

# telnet localhost 3260
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.


After:
# yum update resource-agents-...
# pcs resource create iSCSI1 iSCSILogicalUnit target_iqn="iqn.2003-01.org.linux-iscsi.rhel7-1.x8664:sn.d1da1c08cd15" lun=0 path=/dev/sdb


Check that it's running without any issues
# pcs status
# targetcli
/iscsi> ls /
...
  o- iscsi ........................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.rhel7-1.x8664:sn.d1da1c08cd15 ..... [TPGs: 1]
  |   o- tpg1 ........................................... [no-gen-acls, no-auth]
  |     o- acls ...................................................... [ACLs: 0]
  |     o- luns ...................................................... [LUNs: 1]
  |     | o- lun0 .................................... [block/iSCSI1 (/dev/sdb)]
  |     o- portals ................................................ [Portals: 1]
  |       o- [::0]:3260 ................................................... [OK]

# telnet localhost 3260
Trying ::1...
Connected to localhost.
Escape character is '^]'.

It only shows the IPv6 address, but it listens on both IPv6 and IPv4 (if you remove the IPv6 IP's in your configuration it'll only listen on IPv4 like in the Before example).
Comment 5 michal novacek 2017-05-17 09:21:40 EDT
I have verified that iSCSILogicalUnit resource will listen on ipv4 and ipv6 interface if both are available with resource-agents-3.9.5-98.el7.x86_64

-----
[root@kiff-01 ~]# ip ro | grep default
default via 10.34.71.254 dev br0 proto static metric 425 

[root@kiff-01 ~]# pcs resource --full
 Clone: dlm-clone
  Meta Attrs: interleave=true ordered=true 
  Resource: dlm (class=ocf provider=pacemaker type=controld)
   Operations: monitor interval=30s on-fail=fence (dlm-monitor-interval-30s)
               start interval=0s timeout=90 (dlm-start-interval-0s)
               stop interval=0s timeout=100 (dlm-stop-interval-0s)
 Clone: clvmd-clone
  Meta Attrs: interleave=true ordered=true 
  Resource: clvmd (class=ocf provider=heartbeat type=clvm)
   Attributes: with_cmirrord=1
   Operations: monitor interval=30s on-fail=fence (clvmd-monitor-interval-30s)
               start interval=0s timeout=90 (clvmd-start-interval-0s)
               stop interval=0s timeout=90 (clvmd-stop-interval-0s)
 Resource: iscsi-lu (class=ocf provider=heartbeat type=iSCSILogicalUnit)
  Attributes: lun=0 path=/dev/shared/shared0 target_iqn=iqn.2014-12.com.redhat:sn.aeou
  Operations: monitor interval=10 timeout=10 (iscsi-lu-monitor-interval-10)
              start interval=0s timeout=10 (iscsi-lu-start-interval-0s)
              stop interval=0s timeout=10 (iscsi-lu-stop-interval-0s)

[root@kiff-01 ~]# targetcli ls '/backstores/block'
o- block ......................................................................... [Storage Objects: 1]
  o- iscsi-lu .....................................[/dev/shared/shared0 (31.0GiB) write-thru activated]
    o- alua .......................................................................... [ALUA Groups: 1]
      o- default_tg_pt_gp .............................................. [ALUA state: Active/optimized]

with ipv6 configured
====================

[root@kiff-01 ~]# echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6

[root@kiff-01 ~]# ip a show dev br0
8: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 10:60:4b:9f:3f:c8 brd ff:ff:ff:ff:ff:ff
    inet 10.34.70.36/22 brd 10.34.71.255 scope global dynamic br0
       valid_lft 602536sec preferred_lft 602536sec
>   inet6 2620:52:0:2246:1260:4bff:fe9f:3fc8/64 scope global noprefixroute dynamic 
>      valid_lft 2591806sec preferred_lft 604606sec
>   inet6 fe80::1260:4bff:fe9f:3fc8/64 scope link 
>      valid_lft forever preferred_lft forever

[root@kiff-01 ~]# pcs resource
...
> iscsi-lu       (ocf::heartbeat:iSCSILogicalUnit):      Started kiff-01

[root@kiff-01 ~]# targetcli ls '/iscsi/iqn.2014-12.com.redhat:sn.aeou/tpg1/portals'
o- portals ........................................................... [Portals: 1]
  o- [::0]:3260 .............................................................. [OK]


[root@kiff-01 ~]# netstat -ltpn | grep 3260
tcp6       0      0 :::3260       :::*      LISTEN

[root@kiff-01 ~]# telnet localhost 3260
Trying ::1...
Connected to localhost.
Escape character is '^]'.

without ipv6 configured
=======================

[root@kiff-01 ~]# echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6

[root@kiff-01 ~]# ip a show dev br0
8: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 10:60:4b:9f:3f:c8 brd ff:ff:ff:ff:ff:ff
    inet 10.34.70.36/22 brd 10.34.71.255 scope global dynamic br0
       valid_lft 601921sec preferred_lft 601921sec

[root@kiff-01 ~]# pcs resource
...
> iscsi-lu       (ocf::heartbeat:iSCSILogicalUnit):      Started kiff-01

[root@kiff-01 ~]# targetcli ls '/iscsi/iqn.2014-12.com.redhat:sn.aeou/tpg1/portals'
o- portals ........................................................... [Portals: 1]
  o- 0.0.0.0:3260 ............................................................ [OK]

[root@kiff-01 ~]# netstat -ltpn | grep 3260
tcp        0      0 0.0.0.0:3260  0.0.0.0:* LISTEN

[root@kiff-01 ~]# telnet localhost 3260
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Comment 6 errata-xmlrpc 2017-08-01 10:55:11 EDT
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.

https://access.redhat.com/errata/RHBA-2017:1844

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