Bug 1888105 - Manila scheduler ignores storage protocol
Summary: Manila scheduler ignores storage protocol
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-manila
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Alpha
: 16.2 (Train on RHEL 8.4)
Assignee: Goutham Pacha Ravi
QA Contact: lkuchlan
RHOS Documentation Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-14 04:53 UTC by Goutham Pacha Ravi
Modified: 2023-10-25 06:14 UTC (History)
3 users (show)

Fixed In Version: openstack-manila-9.1.6-2.20210603154809.479a8a7.el8
Doc Type: Bug Fix
Doc Text:
When multiple storage backends are configured on the Shared File Systems service (manila), each storage back end might support a different storage protocol. Before this update, the Shared File Systems service scheduler did not consider the storage protocol and capability of the shared storage back ends when deciding where to place them, which caused share provisioning to fail. With this update, the Shared File Systems service scheduler now automatically considers the share type extra specs with the storage protocol, which makes it possible use the `CapabilitiesFilter` to compare storage back end capabilities and provision shares successfully.
Clone Of:
Environment:
Last Closed: 2021-09-15 07:09:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1783736 0 None None None 2020-10-14 04:53:46 UTC
OpenStack gerrit 794055 0 None MERGED Filter storage protocol in the scheduler 2021-06-02 17:15:44 UTC
Red Hat Issue Tracker OSP-4356 0 None None None 2023-10-25 06:14:06 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:10:12 UTC

Description Goutham Pacha Ravi 2020-10-14 04:53:47 UTC
Description of problem:

When using Manila, you can specify the NAS protocol that the share needs to be exported with. For example, with the CLI, creating an 10Gib NFS share will be:

  $ manila create nfs 10 --name testshare

The scheduler must take the protocol capability of the backends to make its scheduling decision. However, this isn't happening. 

This bug can be reproduced in two ways:

1) a) Enable a fake/unsupported NAS protocol in manila by modifying   
     '[DEFAULT]/enabled_share_protocols'
   b) Create a share with the fake protocol - manila will schedule the share, and then 
      the share could be in "error" state if the backend performs a protocol 
      supportability check. 

2) a) Enable two manila backends that support different protocols, for example:
      Native CephFS and CephFS-via-NFS
   b) Create a Native CephFS share, there is a possibility that the CephFS-via-NFS
      backend is chosen as the candidate to land the share.

Comment 7 lkuchlan 2021-06-24 09:51:29 UTC
Tested using:
puppet-manila-15.5.0-2.20210601014536.9c6604a.el8ost.2.noarch
python3-manilaclient-1.29.0-2.20210528015043.1b2cafb.el8ost.1.noarch

Verification steps:
===================

Positive test:
--------------

(overcloud) [stack@undercloud-0 ~]$ manila type-list
+--------------------------------------+---------+------------+------------+--------------------------------------+----------------------+-------------+
| ID                                   | Name    | visibility | is_default | required_extra_specs                 | optional_extra_specs | Description |
+--------------------------------------+---------+------------+------------+--------------------------------------+----------------------+-------------+
| 885af7f9-8c29-4615-b0e5-7d97f4ed4703 | default | public     | YES        | driver_handles_share_servers : False |                      | None        |
+--------------------------------------+---------+------------+------------+--------------------------------------+----------------------+-------------+
(overcloud) [stack@undercloud-0 ~]$ manila create cephfs 1
+---------------------------------------+--------------------------------------+
| Property                              | Value                                |
+---------------------------------------+--------------------------------------+
| id                                    | c471799d-dda9-4f67-bdc9-21a92a3b2442 |
| size                                  | 1                                    |
| availability_zone                     | None                                 |
| created_at                            | 2021-06-24T06:46:38.000000           |
| status                                | creating                             |
| name                                  | None                                 |
| description                           | None                                 |
| project_id                            | 84f5cbd3e2a64dc2bc1d811cf315ccb7     |
| snapshot_id                           | None                                 |
| share_network_id                      | None                                 |
| share_proto                           | CEPHFS                               |
| metadata                              | {}                                   |
| share_type                            | 885af7f9-8c29-4615-b0e5-7d97f4ed4703 |
| is_public                             | False                                |
| snapshot_support                      | False                                |
| task_state                            | None                                 |
| share_type_name                       | default                              |
| access_rules_status                   | active                               |
| replication_type                      | None                                 |
| has_replicas                          | False                                |
| user_id                               | f479e27b10d94c4ebdb6bef4963f8fb2     |
| create_share_from_snapshot_support    | False                                |
| revert_to_snapshot_support            | False                                |
| share_group_id                        | None                                 |
| source_share_group_snapshot_member_id | None                                 |
| mount_snapshot_support                | False                                |
| share_server_id                       | None                                 |
| host                                  |                                      |
+---------------------------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ manila list
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+
| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type Name | Host                    | Availability Zone |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+
| c471799d-dda9-4f67-bdc9-21a92a3b2442 | None | 1    | CEPHFS      | available | False     | default         | hostgroup@cephfs#cephfs | nova              |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-------------------------+-------------------+
(overcloud) [stack@undercloud-0 ~]$ manila create nfs 1
+---------------------------------------+--------------------------------------+
| Property                              | Value                                |
+---------------------------------------+--------------------------------------+
| id                                    | 317ea440-8cbb-4786-8052-260ffc450299 |
| size                                  | 1                                    |
| availability_zone                     | None                                 |
| created_at                            | 2021-06-24T06:46:59.000000           |
| status                                | creating                             |
| name                                  | None                                 |
| description                           | None                                 |
| project_id                            | 84f5cbd3e2a64dc2bc1d811cf315ccb7     |
| snapshot_id                           | None                                 |
| share_network_id                      | None                                 |
| share_proto                           | NFS                                  |
| metadata                              | {}                                   |
| share_type                            | 885af7f9-8c29-4615-b0e5-7d97f4ed4703 |
| is_public                             | False                                |
| snapshot_support                      | False                                |
| task_state                            | None                                 |
| share_type_name                       | default                              |
| access_rules_status                   | active                               |
| replication_type                      | None                                 |
| has_replicas                          | False                                |
| user_id                               | f479e27b10d94c4ebdb6bef4963f8fb2     |
| create_share_from_snapshot_support    | False                                |
| revert_to_snapshot_support            | False                                |
| share_group_id                        | None                                 |
| source_share_group_snapshot_member_id | None                                 |
| mount_snapshot_support                | False                                |
| share_server_id                       | None                                 |
| host                                  |                                      |
+---------------------------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ manila list
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-----------------------------------+-------------------+
| ID                                   | Name | Size | Share Proto | Status    | Is Public | Share Type Name | Host                              | Availability Zone |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-----------------------------------+-------------------+
| 317ea440-8cbb-4786-8052-260ffc450299 | None | 1    | NFS         | available | False     | default         | hostgroup@tripleo_netapp#aggr1_n1 | nova              |
| c471799d-dda9-4f67-bdc9-21a92a3b2442 | None | 1    | CEPHFS      | available | False     | default         | hostgroup@cephfs#cephfs           | nova              |
+--------------------------------------+------+------+-------------+-----------+-----------+-----------------+-----------------------------------+-------------------+


Negative test:
--------------

(overcloud) [stack@undercloud-0 ~]$ manila delete 317ea440-8cbb-4786-8052-260ffc450299 c471799d-dda9-4f67-bdc9-21a92a3b2442
(overcloud) [stack@undercloud-0 ~]$ manila type-create netapp_st False --extra-specs share_backend_name=tripleo_netapp
+----------------------+--------------------------------------+
| Property             | Value                                |
+----------------------+--------------------------------------+
| ID                   | d7a293eb-bb93-4698-ade1-f3df871e8966 |
| Name                 | netapp_st                            |
| Visibility           | public                               |
| is_default           | -                                    |
| required_extra_specs | driver_handles_share_servers : False |
| optional_extra_specs | share_backend_name : tripleo_netapp  |
| Description          | None                                 |
+----------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ manila type-list
+--------------------------------------+-----------+------------+------------+--------------------------------------+-------------------------------------+-------------+
| ID                                   | Name      | visibility | is_default | required_extra_specs                 | optional_extra_specs                | Description |
+--------------------------------------+-----------+------------+------------+--------------------------------------+-------------------------------------+-------------+
| 885af7f9-8c29-4615-b0e5-7d97f4ed4703 | default   | public     | YES        | driver_handles_share_servers : False |                                     | None        |
| d7a293eb-bb93-4698-ade1-f3df871e8966 | netapp_st | public     | -          | driver_handles_share_servers : False | share_backend_name : tripleo_netapp | None        |
+--------------------------------------+-----------+------------+------------+--------------------------------------+-------------------------------------+-------------+
(overcloud) [stack@undercloud-0 ~]$ manila create cephfs 1 --share-type netapp_st
+---------------------------------------+--------------------------------------+
| Property                              | Value                                |
+---------------------------------------+--------------------------------------+
| id                                    | 972a87be-6172-4b74-8f65-8f24ab35b4ca |
| size                                  | 1                                    |
| availability_zone                     | None                                 |
| created_at                            | 2021-06-24T06:52:27.000000           |
| status                                | creating                             |
| name                                  | None                                 |
| description                           | None                                 |
| project_id                            | 84f5cbd3e2a64dc2bc1d811cf315ccb7     |
| snapshot_id                           | None                                 |
| share_network_id                      | None                                 |
| share_proto                           | CEPHFS                               |
| metadata                              | {}                                   |
| share_type                            | d7a293eb-bb93-4698-ade1-f3df871e8966 |
| is_public                             | False                                |
| snapshot_support                      | False                                |
| task_state                            | None                                 |
| share_type_name                       | netapp_st                            |
| access_rules_status                   | active                               |
| replication_type                      | None                                 |
| has_replicas                          | False                                |
| user_id                               | f479e27b10d94c4ebdb6bef4963f8fb2     |
| create_share_from_snapshot_support    | False                                |
| revert_to_snapshot_support            | False                                |
| share_group_id                        | None                                 |
| source_share_group_snapshot_member_id | None                                 |
| mount_snapshot_support                | False                                |
| share_server_id                       | None                                 |
| host                                  |                                      |
+---------------------------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ manila list
+--------------------------------------+------+------+-------------+--------+-----------+-----------------+------+-------------------+
| ID                                   | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+------+------+-------------+--------+-----------+-----------------+------+-------------------+
| 972a87be-6172-4b74-8f65-8f24ab35b4ca | None | 1    | CEPHFS      | error  | False     | netapp_st       |      | None              |
+--------------------------------------+------+------+-------------+--------+-----------+-----------------+------+-------------------+
(overcloud) [stack@undercloud-0 ~]$ manila message-list --resource-id 972a87be-6172-4b74-8f65-8f24ab35b4ca
+--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+
| ID                                   | Resource Type | Resource ID                          | Action ID | User Message                                                                                             | Detail ID | Created At                 |
+--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+
| 7a8c72c9-dde0-48c5-be66-2860bbac57d6 | SHARE         | 972a87be-6172-4b74-8f65-8f24ab35b4ca | 001       | allocate host: No storage could be allocated for this share request, Capabilities filter didn't succeed. | 008       | 2021-06-24T06:52:27.000000 |
+--------------------------------------+---------------+--------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+-----------+----------------------------+

Comment 9 errata-xmlrpc 2021-09-15 07:09:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483


Note You need to log in before you can comment on or make changes to this bug.