Pure Storage driver broken with ipv6 iscsi addresses

Bug #1910143 reported by Daniel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Simon Dodsley

Bug Description

Starting in Train there is a new config option for Pure Storage arrays called pure_iscsi_cidr. It is ipv4 only and if you have a Pure Storage FlashArray configured with ipv6 iscsi it will fail while building an instance on a cinder volume with this message

VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Driver initialize connection failed (error: Expected 4 octets in u'[2620').

The problem lies in volume/drives/pure.py where it's hardcoded to expect an ipv4 address

        # Check to ensure all returned portal IP addresses
        # are in iSCSI target CIDR
        if not isinstance(self.configuration.pure_iscsi_cidr, six.text_type):
            cidr = self.configuration.pure_iscsi_cidr.decode('utf8')
        else:
            cidr = self.configuration.pure_iscsi_cidr
        check_cidr = ipaddress.IPv4Network(cidr)
        for target_portal in target_portals:
            if not isinstance(target_portal.split(":")[0], six.text_type):
                portal = (target_portal.split(":")[0]).decode('utf8')
            else:
                portal = target_portal.split(":")[0]
            check_ip = ipaddress.IPv4Address(portal)
            if check_ip in check_cidr:
                valid_portals.append(target_portal)
        LOG.info("iSCSI target portals that match CIDR range: '%s'",
                 valid_portals)

Previous to Train this worked fine with ipv6 iscsi. It needs to be patched from master all the way back to the Train release.

Changed in cinder:
assignee: nobody → Simon Dodsley (simon-dodsley)
status: New → In Progress
tags: added: driver ipv6 pure
Changed in cinder:
importance: Undecided → Medium
Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 19.0.0.0b1

This issue was fixed in the openstack/cinder 19.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/cinder/+/864185

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/864185
Committed: https://opendev.org/openstack/cinder/commit/84dc4fb0599743ad19eac43ca2e10dedb5d5386b
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 84dc4fb0599743ad19eac43ca2e10dedb5d5386b
Author: Christophe Drevet-Droguet <email address hidden>
Date: Thu Feb 4 18:18:46 2021 +0100

    [PURE] support IPv6 / add parameter pure_iscsi_cidr_list

    Pure storage: Add support for IPv6 in pure_iscsi_cidr parameter.
    Pure storage: Add parameter pure_iscsi_cidr_list to support a list of networks.

    Depends-On: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad
    Change-Id: Ib04e49dac9fdabd81809ca389553ce3638bb9bbf
    Closes-Bug: 1910143
    (cherry picked from commit 7aa5e95d48c1bd0110001fb967c80e101f5b94dd)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/cinder/+/865164

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/865164
Committed: https://opendev.org/openstack/cinder/commit/d061455d4f7974a6f4c86ba7e54b4415be4a3385
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit d061455d4f7974a6f4c86ba7e54b4415be4a3385
Author: Christophe Drevet-Droguet <email address hidden>
Date: Thu Feb 4 18:18:46 2021 +0100

    [PURE] support IPv6 / add parameter pure_iscsi_cidr_list

    Pure storage: Add support for IPv6 in pure_iscsi_cidr parameter.
    Pure storage: Add parameter pure_iscsi_cidr_list to support a list of networks.

    Depends-On: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad
    Change-Id: Ib04e49dac9fdabd81809ca389553ce3638bb9bbf
    Closes-Bug: 1910143
    (cherry picked from commit 7aa5e95d48c1bd0110001fb967c80e101f5b94dd)
    (cherry picked from commit 84dc4fb0599743ad19eac43ca2e10dedb5d5386b)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/cinder/+/867294

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/867294
Committed: https://opendev.org/openstack/cinder/commit/7f283a9704f3b2bb56769ad2580cdf1426d22be2
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 7f283a9704f3b2bb56769ad2580cdf1426d22be2
Author: Christophe Drevet-Droguet <email address hidden>
Date: Thu Feb 4 18:18:46 2021 +0100

    [PURE] support IPv6 / add parameter pure_iscsi_cidr_list

    Pure storage: Add support for IPv6 in pure_iscsi_cidr parameter.
    Pure storage: Add parameter pure_iscsi_cidr_list to support a list of networks.

    Depends-On: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad
    Change-Id: Ib04e49dac9fdabd81809ca389553ce3638bb9bbf
    Closes-Bug: 1910143
    (cherry picked from commit 7aa5e95d48c1bd0110001fb967c80e101f5b94dd)
    (cherry picked from commit 84dc4fb0599743ad19eac43ca2e10dedb5d5386b)
    (cherry picked from commit d061455d4f7974a6f4c86ba7e54b4415be4a3385)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/cinder/+/867345

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/train)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/867345
Committed: https://opendev.org/openstack/cinder/commit/14c2db209b2f734d646c5ff4c798b456cdcaa911
Submitter: "Zuul (22348)"
Branch: stable/train

commit 14c2db209b2f734d646c5ff4c798b456cdcaa911
Author: Christophe Drevet-Droguet <email address hidden>
Date: Thu Feb 4 18:18:46 2021 +0100

    [PURE] support IPv6 / add parameter pure_iscsi_cidr_list

    Pure storage: Add support for IPv6 in pure_iscsi_cidr parameter.
    Pure storage: Add parameter pure_iscsi_cidr_list to support a list of networks.

    Depends-On: Ib001e2b4d1347754c2b46730bc10d86e8cdab7ad
    Change-Id: Ib04e49dac9fdabd81809ca389553ce3638bb9bbf
    Closes-Bug: 1910143
    (cherry picked from commit 7aa5e95d48c1bd0110001fb967c80e101f5b94dd)
    (cherry picked from commit 84dc4fb0599743ad19eac43ca2e10dedb5d5386b)
    (cherry picked from commit d061455d4f7974a6f4c86ba7e54b4415be4a3385)
    (cherry picked from commit 7f283a9704f3b2bb56769ad2580cdf1426d22be2)
    Conflicts:
            cinder/volume/drivers/pure.py

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder train-eol

This issue was fixed in the openstack/cinder train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder ussuri-eol

This issue was fixed in the openstack/cinder ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder victoria-eom

This issue was fixed in the openstack/cinder victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder wallaby-eom

This issue was fixed in the openstack/cinder wallaby-eom 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.