Problem attaching iSCSI volumes without TCP transport

Bug #1710599 reported by Hamdy Khader
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
Undecided
Aviram Bar-Haim

Bug Description

Problem:
OS-Brick doesn't recognise transport type from command "iscsiadm -m session" other than TCP,
for example if [cinder.conf]iscsi_ptotocol=iser, OS-Brick will not be able to see the created
iscsi sessions and will always try to log into iscsi, at that point iscsi already has session
open so each login attempt will be rejected and volume will be in Attaching status.

$iscsiadm -m session
iser: [9] 1.1.1.1:3260,1 iqn.2010-10.org.openstack:volume-38b2e6bb-30e1-46c1-b02f-102b129e3be3 (non-flash)

Reproduce:
1. create VM that uses image as volume source.
2. change iscsi_ptotocol to iser in /cinder.conf
3. create volume
5. attach it to the VM

Cinder log:
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG oslo.privsep.daemon [-] privsep: request[140297724561200]: (3, 'os_brick.privileged.rootwrap.execute_root', ('iscsiadm', '-m', 'session'), {'check_exit_code': (0, 1, 21, 255)}) {{(pid=18057) loop /usr/local/lib/python2.7/dist-packages/oslo_privsep/daemon.py:443}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG oslo_concurrency.processutils [-] Running cmd (subprocess): iscsiadm -m session {{(pid=18057) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:355}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG oslo_concurrency.processutils [-] CMD "iscsiadm -m session" returned: 0 in 0.006s {{(pid=18057) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:385}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG os_brick.initiator.connectors.iscsi [None req-35a4bf00-7056-457a-8371-e6dc9024165e admin admin] iscsiadm ('-m', 'session'): stdout=iser: [9] 1.1.1.1:3260,1 iqn.2010-10.org.openstack:volume-38b2e6bb-30e1-46c1-b02f-102b129e3be3 (non-flash)
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: stderr= {{(pid=16882) _run_iscsiadm_bare /usr/local/lib/python2.7/dist-packages/os_brick/initiator/connectors/iscsi.py:1077}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG oslo.privsep.daemon [-] privsep: request[140297724561200]: (3, 'os_brick.privileged.rootwrap.execute_root', ('iscsiadm', '-m', 'node', '-T', u'iqn.2010-10.org.openstack:volume-38b2e6bb-30e1-46c1-b02f-102b129e3be3', '-p', u'1.1.1.1:3260', '--login'), {'attempts': 1, 'check_exit_code': (0, 15, 255), 'delay_on_retry': True}) {{(pid=18057) loop /usr/local/lib/python2.7/dist-packages/oslo_privsep/daemon.py:443}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG oslo_concurrency.processutils [-] Running cmd (subprocess): iscsiadm -m node -T iqn.2010-10.org.openstack:volume-38b2e6bb-30e1-46c1-b02f-102b129e3be3 -p 1.1.1.1:3260 --login {{(pid=18057) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:355}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG oslo_concurrency.processutils [-] CMD "iscsiadm -m node -T iqn.2010-10.org.openstack:volume-38b2e6bb-30e1-46c1-b02f-102b129e3be3 -p 1.1.1.1:3260 --login" returned: 15 in 0.005s {{(pid=18057) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:385}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG oslo.privsep.daemon [-] privsep: reply[140297724561200]: (4, ('', 'iscsiadm: iser: 1 session requested, but 1 already present.\niscsiadm: Could not log into all portals\n')) {{(pid=18057) loop /usr/local/lib/python2.7/dist-packages/oslo_privsep/daemon.py:456}}
Aug 14 04:06:47 hamdyk-X9DRFR nova-compute[16882]: DEBUG os_brick.initiator.connectors.iscsi [None req-35a4bf00-7056-457a-8371-e6dc9024165e admin admin] iscsiadm ('--login',): stdout= stderr=iscsiadm: iser: 1 session requested, but 1 already present.

Changed in os-brick:
assignee: nobody → Aviram Bar-Haim (aviramb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/496737

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.openstack.org/493568
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=af2f60f9bab271ba26d4d1e8f15e0d1ce7f1ccec
Submitter: Jenkins
Branch: master

commit af2f60f9bab271ba26d4d1e8f15e0d1ce7f1ccec
Author: Aviram Bar-Haim <email address hidden>
Date: Mon Aug 14 16:50:39 2017 +0300

    Fix iSCSI volume attachment over RDMA transport

    Recent changes assumed 'tcp:' prefix to iscsi sessions,
    and that broke the session status discovery for RDMA
    connections. in this change we add the 'iser:' transport
    prefix to the os-brick functions, to fix volumes attach
    over RDMA.

    Closes-bug: #1710599
    Change-Id: I27b30dafcf488ebd125917e1924c828e3bdf3a99

Changed in os-brick:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/pike)

Reviewed: https://review.openstack.org/496737
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=f1a8346a51836cea43943ad47d65fa8e72fbfc24
Submitter: Jenkins
Branch: stable/pike

commit f1a8346a51836cea43943ad47d65fa8e72fbfc24
Author: Aviram Bar-Haim <email address hidden>
Date: Mon Aug 14 16:50:39 2017 +0300

    Fix iSCSI volume attachment over RDMA transport

    Recent changes assumed 'tcp:' prefix to iscsi sessions,
    and that broke the session status discovery for RDMA
    connections. in this change we add the 'iser:' transport
    prefix to the os-brick functions, to fix volumes attach
    over RDMA.

    Closes-bug: #1710599
    Change-Id: I27b30dafcf488ebd125917e1924c828e3bdf3a99
    (cherry picked from commit af2f60f9bab271ba26d4d1e8f15e0d1ce7f1ccec)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 1.15.3

This issue was fixed in the openstack/os-brick 1.15.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 2.0.0

This issue was fixed in the openstack/os-brick 2.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.