The validation of iscsi session should be case insensitive since IPv6 address may contain lower or upper cases

Bug #1793627 reported by Yong Huang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
Undecided
Yong Huang

Bug Description

If the portal address are lower cases, and the portal address get from 'iscsiadm -m session' contain upper cases, the validation of iscsi session will failed, and can not jump out of the loop

--------------------
        while True:
            # Duplicate logins crash iscsiadm after load, so we scan active
            # sessions to see if the node is logged in.
            sessions = self._get_iscsi_sessions_full()
            for s in sessions:
                # Found our session, return session_id
                if (s[0] in self.VALID_SESSIONS_PREFIX and
                        portal == s[2] and s[4] == target_iqn):
                    return s[1], manual_scan
--------------------

So the validation of target address should be case insensitive since IPv6 address is case insensitive

Yong Huang (yonghuang)
Changed in os-brick:
assignee: nobody → Yong Huang (yonghuang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.openstack.org/604253
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=8782c4accfea8a745676517c1880810cfa07feac
Submitter: Zuul
Branch: master

commit 8782c4accfea8a745676517c1880810cfa07feac
Author: Yong Huang <email address hidden>
Date: Thu Sep 20 16:26:57 2018 -0400

    The validation of iscsi session should be case insensitive

    The validation of iscsi session should be case insensitive since IPv6
    address is case insensitive. If the portal address are all lower cases,
    and the address get from 'iscsiadm -m session' contain upper cases,
    the validation of iscsi session will failed, the loop will be endless.

    Change-Id: Ief5108e40f13cc53d8d9e9c5d1a5054f58f72aa0
    Closes-bug: #1793627

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

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/608578

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

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

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

Reviewed: https://review.openstack.org/608578
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=e01e5db822b29f898763197ec98e2c31f0b05c53
Submitter: Zuul
Branch: stable/rocky

commit e01e5db822b29f898763197ec98e2c31f0b05c53
Author: Yong Huang <email address hidden>
Date: Thu Sep 20 16:26:57 2018 -0400

    The validation of iscsi session should be case insensitive

    The validation of iscsi session should be case insensitive since IPv6
    address is case insensitive. If the portal address are all lower cases,
    and the address get from 'iscsiadm -m session' contain upper cases,
    the validation of iscsi session will failed, the loop will be endless.

    Change-Id: Ief5108e40f13cc53d8d9e9c5d1a5054f58f72aa0
    Closes-bug: #1793627
    (cherry picked from commit 8782c4accfea8a745676517c1880810cfa07feac)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/611213

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

Reviewed: https://review.openstack.org/611213
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=6de41bbef00b1b53bb9f3dd6f5665b6c9c060071
Submitter: Zuul
Branch: stable/queens

commit 6de41bbef00b1b53bb9f3dd6f5665b6c9c060071
Author: Yong Huang <email address hidden>
Date: Thu Sep 20 16:26:57 2018 -0400

    The validation of iscsi session should be case insensitive

    The validation of iscsi session should be case insensitive since IPv6
    address is case insensitive. If the portal address are all lower cases,
    and the address get from 'iscsiadm -m session' contain upper cases,
    the validation of iscsi session will failed, the loop will be endless.

    Change-Id: Ief5108e40f13cc53d8d9e9c5d1a5054f58f72aa0
    Closes-bug: #1793627
    (cherry picked from commit 8782c4accfea8a745676517c1880810cfa07feac)
    (cherry picked from commit e01e5db822b29f898763197ec98e2c31f0b05c53)

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

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

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

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

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/647768

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

Reviewed: https://review.openstack.org/647768
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=c45d8f67219cfe24ae62898db9a5cf4afe2f7c34
Submitter: Zuul
Branch: stable/pike

commit c45d8f67219cfe24ae62898db9a5cf4afe2f7c34
Author: Yong Huang <email address hidden>
Date: Thu Sep 20 16:26:57 2018 -0400

    The validation of iscsi session should be case insensitive

    The validation of iscsi session should be case insensitive since IPv6
    address is case insensitive. If the portal address are all lower cases,
    and the address get from 'iscsiadm -m session' contain upper cases,
    the validation of iscsi session will failed, the loop will be endless.

    Change-Id: Ief5108e40f13cc53d8d9e9c5d1a5054f58f72aa0
    Closes-bug: #1793627
    (cherry picked from commit 8782c4accfea8a745676517c1880810cfa07feac)
    (cherry picked from commit e01e5db822b29f898763197ec98e2c31f0b05c53)

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

This issue was fixed in the openstack/os-brick 1.15.9 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.