manila scheduler does not filter storage protocol

Bug #1783736 reported by liushi on 2018-07-26
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
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) on 2018-07-26
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

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

Changed in manila:
status: Confirmed → In Progress
tags: added: backport-potential
wiley (gfhjgfhdfjd) on 2019-05-10
summary: - manila scheduler does not filter storage protocol
+ Tramadol No Prescription :: YourRxPills.com
description: updated
wiley (gfhjgfhdfjd) on 2019-05-19
tags: added: yourrxpills
removed: backport-potential scheduler
tags: added: yourrxpills.com
removed: yourrxpills
liushi (liu.shi) on 2019-05-20
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) on 2019-06-06
description: updated
summary: - manila scheduler does not filter storage protocol
+ buy ambien online here without prescription
Colin Watson (cjwatson) on 2019-06-07
description: updated
summary: - buy ambien online here without prescription
+ manila scheduler does not filter storage protocol
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) on 2021-01-28
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
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

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

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

Other bug subscribers