manage API ignores snapshot_support in the share_type

Bug #1544725 reported by Goutham Pacha Ravi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Rodrigo Barbieri

Bug Description

Manila's manage API can manage shares with an existing share_type. However, when managing a share with a share_type that has the required/undeletable extra_spec "snapshot_support" set to False, the share model update seems to ignore it altogether.

Steps to reproduce:
obiwan@openstack5:~$ manila extra-specs-list
+--------------------------------------+---------------------------+--------------------------------------+
| ID | Name | all_extra_specs |
+--------------------------------------+---------------------------+--------------------------------------+
| f60ca4df-1754-4003-8a62-4332be476beb | tempest-manila-155197757 | replication_type : dr |
| | | snapshot_support : False |
| | | driver_handles_share_servers : False |
+--------------------------------------+---------------------------+--------------------------------------+

obiwan@openstack5:~$ manila manage --share-type f60ca4df-1754-4003-8a62-4332be476beb openstack5@test_backend_1#aggr2 NFS 172.20.124.24:/share_fc6660b2_8d4c_4d60_81ba_762281dd27da
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | manage_starting |
| share_type_name | tempest-manila-155197757 |
| description | None |
| availability_zone | None |
| share_network_id | None |
| share_server_id | None |
| host | openstack5@test_backend_1#aggr2 |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 5701a47c-8e36-4ebe-9570-558845e032a1 |
| size | None |
| name | None |
| share_type | f60ca4df-1754-4003-8a62-4332be476beb |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-02-11T19:37:31.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 8ea2e614ae0e498f9a1d97ca057414ad |
| metadata | {} |
+-----------------------------+--------------------------------------+

obiwan@openstack5:~$ manila show 5701a47c-8e36-4ebe-9570-558845e032a1 | grep snapshot_support
| snapshot_support | True |

Try taking a snapshot:

obiwan@openstack5:~$ manila snapshot-create --name "test_snapshot" 5701a47c-8e36-4ebe-9570-558845e032a1
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| status | creating |
| share_id | 5701a47c-8e36-4ebe-9570-558845e032a1 |
| name | test_snapshot |
| created_at | 2016-02-11T20:49:06.401207 |
| share_proto | NFS |
| id | 22011ab7-a5aa-40a8-b488-25f329753599 |
| size | 1 |
| share_size | 1 |
| description | None |
+-------------+--------------------------------------+

obiwan@openstack5:~$ manila snapshot-show 22011ab7-a5aa-40a8-b488-25f329753599
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| status | available |
| share_id | 5701a47c-8e36-4ebe-9570-558845e032a1 |
| name | test_snapshot |
| created_at | 2016-02-11T20:49:06.000000 |
| share_proto | NFS |
| id | 22011ab7-a5aa-40a8-b488-25f329753599 |
| size | 1 |
| share_size | 1 |
| description | None |
+-------------+--------------------------------------+

This makes for bad user experience

Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
description: updated
Changed in manila:
importance: Undecided → High
milestone: none → mitaka-rc1
Changed in manila:
assignee: Goutham Pacha Ravi (gouthamr) → nobody
Changed in manila:
assignee: nobody → Rodrigo Barbieri (rodrigo-barbieri2010)
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/294269

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/294269
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=2da94bb55e4c38484d5f6ba557c24a15076fd015
Submitter: Jenkins
Branch: master

commit 2da94bb55e4c38484d5f6ba557c24a15076fd015
Author: Rodrigo Barbieri <email address hidden>
Date: Thu Mar 17 17:07:47 2016 -0300

    Fix manage API ignoring type extra specs

    Currently manage API allows managing a share with a share type that
    may not make sense in the service host. This patch addresses this
    by invoking the scheduler to validate the host before invoking the
    backend manager.

    APIImpact

    Change-Id: I8c780f2518f4a6eacf37cc448c73fbb41f6b7507
    Closes-bug: #1544725

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

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