Driver filter disallows using queries with share_backend_name

Bug #1815700 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
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
Revision history for this message
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)
Changed in manila:
assignee: Xinyue Wang (xinyue.wang) → Sneha Prasad (snpd)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/640630

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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/rocky)

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

Tom Barron (tpb)
Changed in manila:
assignee: Tom Barron (tpb) → Sneha Prasad (snpd)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/rocky)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/queens)

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

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

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/pike)

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

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

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 8.0.0.0rc1

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 6.2.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 7.2.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 5.1.0

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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