manila scheduler does not filter storage protocol

Bug #1783736 reported by liushi
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Goutham Pacha Ravi

Bug Description

I found that the current manila scheduler does not filter the storage protocol during scheduling, which I think is unreasonable. If the user has multiple share backends that provide storage support for different protocols, this will not allow the user to reasonably use the storage protocol to specify the storage backend.

In my environment, there is only one cephfs backend, but I specified in the API to enable the CIFS protocol, this create operation will still be scheduler to cephfs, I think this should be thrown by the `manila-scheduler` NoValidHost exception.

Maybe we should filter the drive in `manila.scheduler.filters.driver.DriverFilter:host_passes`

// manila.conf
```ini
[DEFAULT]
enabled_share_protocols = CEPHFS, NFS, CIFS
enabled_share_backends = cephfs-001

[cephfs-001]
share_backend_name = ctest-ssd
share_driver = manila.share.drivers.cephfs.cephfs_native.CephFSNativeDriver
```

liushi (liu.shi)
Changed in manila:
assignee: nobody → liushi (liu.shi)
Changed in manila:
status: New → In Progress
importance: Undecided → High
Changed in manila:
status: In Progress → Confirmed
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/586456

Changed in manila:
status: Confirmed → In Progress
tags: added: backport-potential
wiley (gfhjgfhdfjd)
summary: - manila scheduler does not filter storage protocol
+ Tramadol No Prescription :: YourRxPills.com
description: updated
wiley (gfhjgfhdfjd)
tags: added: yourrxpills
removed: backport-potential scheduler
tags: added: yourrxpills.com
removed: yourrxpills
liushi (liu.shi)
Changed in manila:
status: In Progress → Invalid
assignee: liushi (liu.shi) → nobody
tags: added: scheduler
removed: yourrxpills.com
description: updated
tags: added: backport-potential
summary: - Tramadol No Prescription :: YourRxPills.com
+ manila scheduler does not filter storage protocol
wiley (gfhjgfhdfjd)
description: updated
summary: - manila scheduler does not filter storage protocol
+ buy ambien online here without prescription
Colin Watson (cjwatson)
description: updated
summary: - buy ambien online here without prescription
+ manila scheduler does not filter storage protocol
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Picking this bug up since it's still a valid concern in manila.

It is possible to reproduce this issue the way the description says:

- In a manila environment, enable a random protocol by appending to "[DEFAULT]/enabled_share_protocols" E.g.:

       [DEFAULT]
       ...
       enabled_share_protocols = NFS, CIFS, INVALIDPROTOCOL

- Create a share with "INVALIDPROTOCOL"
- curl -i -X POST http://<MANILA-ENDPOINT>/v2/<PROJECT-ID>/shares -H "X-Auth-Token: <AUTH_TOKEN>" -H "X-Openstack-Manila-Api-Version: 2.51" -d '{"share": {"size": 1, "snapshot_id": null, "name": null, "description": null, "metadata": {}, "share_proto": "INVALIDPROTOCOL", "share_network_id": null, "share_type": null, "is_public": false, "availability_zone": null}}'

This request will be accepted, and the share goes to error state after the manila-scheduler is done with it.

Changed in manila:
status: Invalid → New
assignee: nobody → Goutham Pacha Ravi (gouthamr)
milestone: none → wallaby-1
Changed in manila:
milestone: wallaby-1 → wallaby-2
Changed in manila:
milestone: wallaby-2 → wallaby-3
Vida Haririan (vhariria)
Changed in manila:
importance: High → Medium
milestone: wallaby-3 → none
milestone: none → wallaby-rc1
Changed in manila:
status: New → Confirmed
tags: added: wallaby-rc-bugsquash
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

Fix proposed to branch: master
    https://review.opendev.org/781026

Changed in manila:
status: Confirmed → In Progress
Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 12.0.0.0rc1

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

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/783206
Committed: https://opendev.org/openstack/manila/commit/06d380c212006346b350b386906089d2f5fd2468
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 06d380c212006346b350b386906089d2f5fd2468
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Mar 16 23:48:42 2021 -0700

    Filter storage protocol in the scheduler

    The share protocol requested was being
    ignored by the scheduler and this would
    cause shares to get scheduled to hosts
    that don't support the specified protocol.

    Change-Id: I2e87264865b645781c481383c039fecbfd7c6eb1
    Closes-Bug: #1783736
    (cherry picked from commit f24fff9522a114d88406e820e2cac5d14398a6c1)

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

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

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/792765
Committed: https://opendev.org/openstack/manila/commit/4a75c699c0cb36757c56a14dddf3cd83497dc33a
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 4a75c699c0cb36757c56a14dddf3cd83497dc33a
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Mar 16 23:48:42 2021 -0700

    Filter storage protocol in the scheduler

    The share protocol requested was being
    ignored by the scheduler and this would
    cause shares to get scheduled to hosts
    that don't support the specified protocol.

    Change-Id: I2e87264865b645781c481383c039fecbfd7c6eb1
    Closes-Bug: #1783736
    (cherry picked from commit f24fff9522a114d88406e820e2cac5d14398a6c1)
    (cherry picked from commit 06d380c212006346b350b386906089d2f5fd2468)

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by "Goutham Pacha Ravi <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/manila/+/586456
Reason: Thank you for proposing this fix, as noted on the bug report, we've decided to take a different direction. The fix is being back-ported to stable branches: https://review.opendev.org/q/topic:%22bug%252F1783736%22+(status:open%20OR%20status:merged)

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/794055
Committed: https://opendev.org/openstack/manila/commit/4bf36d02297cb78f0af2221891e563c4fb844a5c
Submitter: "Zuul (22348)"
Branch: stable/train

commit 4bf36d02297cb78f0af2221891e563c4fb844a5c
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Mar 16 23:48:42 2021 -0700

    Filter storage protocol in the scheduler

    The share protocol requested was being
    ignored by the scheduler and this would
    cause shares to get scheduled to hosts
    that don't support the specified protocol.

    Change-Id: I2e87264865b645781c481383c039fecbfd7c6eb1
    Closes-Bug: #1783736
    (cherry picked from commit f24fff9522a114d88406e820e2cac5d14398a6c1)
    (cherry picked from commit 06d380c212006346b350b386906089d2f5fd2468)
    (cherry picked from commit 4a75c699c0cb36757c56a14dddf3cd83497dc33a)

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

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

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

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

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

This issue was fixed in the openstack/manila train-eol 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.