Driver filter disallows using queries with share_backend_name

Bug #1815700 reported by Goutham Pacha Ravi on 2019-02-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Manila
Medium
Sneha Prasad

Bug Description

How to reproduce:

1) With a manila installation, set up a share type with an extra-spec that covers two or more backend names, For example, if your backend names were "Prague" and "Vienna", you'd do:

  manila type-key <share-type-name> set share_backend_name="<in> Prague <in> Vienna"

2) Attempt to create a share with this share type

Manila's "driver" scheduler filter fails the share creation.

RCA:
The driver filter is checking for hard equality between the share_backend_name specified in the share type and the name reported by the host [1]. This defeats the purpose of the capabilities filter giving the ability to use "<in>" (selection) operator in the extra-spec.

This filter originated in Cinder, and they removed this errant check with [2]

[1] https://github.com/openstack/manila/blob/6eea03b/manila/scheduler/filters/driver.py#L60
[2] https://github.com/openstack/cinder/commit/b320911

tags: added: low-hanging-fruit
tags: added: backport-potential
Changed in manila:
importance: Undecided → Medium
Sneha Prasad (snpd) wrote :

Hi, I am an outreachy applicant, and I want to try to fix this issue.

Changed in manila:
assignee: nobody → Xinyue Wang (xinyue.wang)
Sneha Prasad (snpd) on 2019-03-02
Changed in manila:
assignee: Xinyue Wang (xinyue.wang) → Sneha Prasad (snpd)
Changed in manila:
status: New → In Progress
Changed in manila:
assignee: Sneha Prasad (snpd) → Goutham Pacha Ravi (gouthamr)
Changed in manila:
assignee: Goutham Pacha Ravi (gouthamr) → Sneha Prasad (snpd)
milestone: none → stein-3
Changed in manila:
assignee: Sneha Prasad (snpd) → Tom Barron (tpb)

Reviewed: https://review.openstack.org/640630
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=86c1576110f9e6d92ea539c2a2b16f46d325f6ee
Submitter: Zuul
Branch: master

commit 86c1576110f9e6d92ea539c2a2b16f46d325f6ee
Author: snpd <email address hidden>
Date: Sun Mar 3 12:26:34 2019 +0530

    Fix driver filter to not check share_backend_name

    Fixed the bug stating: Driver filter disallows using
    queries with share_backend_name. The driver filter was
    checking for hard equality between the share_backend_name
    specified in the share type and the name reported by the
    host [1]. This defeats the purpose of the capabilities
    filter giving the ability to use "<in>" (selection)
    operator in the extra-spec. Thus this commit fixes it by
    updating the required files according to
    openstack/cinder/commit/b32011 as now the driver does not
    check for shared_backend_name.

    Closes-Bug: #1815700

    Change-Id: If384392d0f140922bb85a1dc50b0c4494c231e2f

Changed in manila:
status: In Progress → Fix Released
Tom Barron (tpb) on 2019-03-18
Changed in manila:
assignee: Tom Barron (tpb) → Sneha Prasad (snpd)

Reviewed: https://review.openstack.org/643767
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=ce370a1892ed5e1820d55008acb2e87abc7b9db8
Submitter: Zuul
Branch: stable/rocky

commit ce370a1892ed5e1820d55008acb2e87abc7b9db8
Author: snpd <email address hidden>
Date: Sun Mar 3 12:26:34 2019 +0530

    Fix driver filter to not check share_backend_name

    Fixed the bug stating: Driver filter disallows using
    queries with share_backend_name. The driver filter was
    checking for hard equality between the share_backend_name
    specified in the share type and the name reported by the
    host [1]. This defeats the purpose of the capabilities
    filter giving the ability to use "<in>" (selection)
    operator in the extra-spec. Thus this commit fixes it by
    updating the required files according to
    openstack/cinder/commit/b32011 as now the driver does not
    check for shared_backend_name.

    Closes-Bug: #1815700

    Change-Id: If384392d0f140922bb85a1dc50b0c4494c231e2f
    (cherry picked from commit 86c1576110f9e6d92ea539c2a2b16f46d325f6ee)

tags: added: in-stable-rocky

Reviewed: https://review.openstack.org/644723
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=c75d48c067875609f5e0dcc1c8f6896f55af9fbd
Submitter: Zuul
Branch: stable/queens

commit c75d48c067875609f5e0dcc1c8f6896f55af9fbd
Author: snpd <email address hidden>
Date: Sun Mar 3 12:26:34 2019 +0530

    Fix driver filter to not check share_backend_name

    Fixed the bug stating: Driver filter disallows using
    queries with share_backend_name. The driver filter was
    checking for hard equality between the share_backend_name
    specified in the share type and the name reported by the
    host [1]. This defeats the purpose of the capabilities
    filter giving the ability to use "<in>" (selection)
    operator in the extra-spec. Thus this commit fixes it by
    updating the required files according to
    openstack/cinder/commit/b32011 as now the driver does not
    check for shared_backend_name.

    Closes-Bug: #1815700

    Change-Id: If384392d0f140922bb85a1dc50b0c4494c231e2f
    (cherry picked from commit 86c1576110f9e6d92ea539c2a2b16f46d325f6ee)
    (cherry picked from commit ce370a1892ed5e1820d55008acb2e87abc7b9db8)

tags: added: in-stable-queens

Reviewed: https://review.openstack.org/644886
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=dee12e0841d55dd80b3bb3b4926749c70fa86190
Submitter: Zuul
Branch: stable/pike

commit dee12e0841d55dd80b3bb3b4926749c70fa86190
Author: snpd <email address hidden>
Date: Sun Mar 3 12:26:34 2019 +0530

    Fix driver filter to not check share_backend_name

    Fixed the bug stating: Driver filter disallows using
    queries with share_backend_name. The driver filter was
    checking for hard equality between the share_backend_name
    specified in the share type and the name reported by the
    host [1]. This defeats the purpose of the capabilities
    filter giving the ability to use "<in>" (selection)
    operator in the extra-spec. Thus this commit fixes it by
    updating the required files according to
    openstack/cinder/commit/b32011 as now the driver does not
    check for shared_backend_name.

    Closes-Bug: #1815700

    Change-Id: If384392d0f140922bb85a1dc50b0c4494c231e2f
    (cherry picked from commit 86c1576110f9e6d92ea539c2a2b16f46d325f6ee)
    (cherry picked from commit ce370a1892ed5e1820d55008acb2e87abc7b9db8)
    (cherry picked from commit c75d48c067875609f5e0dcc1c8f6896f55af9fbd)

tags: added: in-stable-pike

This issue was fixed in the openstack/manila 8.0.0.0rc1 release candidate.

This issue was fixed in the openstack/manila 6.2.0 release.

This issue was fixed in the openstack/manila 7.2.0 release.

This issue was fixed in the openstack/manila 5.1.0 release.

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

Other bug subscribers