Create share from snapshot command failed when share type is not specified - HTTP 400
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
manila-ui |
Invalid
|
Undecided
|
Unassigned | ||
python-manilaclient |
Fix Released
|
Medium
|
Goutham Pacha Ravi |
Bug Description
Create share from snapshot command failed when share type is not specified
Per the command line help: If a share type is not specified when requesting a new share from a snapshot, the share type of the source share will be applied to the new share.
Version-Release number of selected component (if applicable):
How reproducible:
100%
Steps to Reproduce:
1. Create share type sup-snapshot
2. Create a share using type sup-snapshot
3. Create snapshot of share in step 2
4. Create a new share from snapshot in step 4
Actual results:
Share creation fails due to share type not explicitly specified
Expected results:
Expected the share type of the source share will be applied to the new share.
Additional info:
Share creation succeeded When share type was specified
Screen captures below:
(overcloud) [stack@undercloud-0 ~]$ openstack share type create sup-snapshot false --extra-specs --create-
+------
| Field | Value |
+------
| id | 5e232f46-
| name | sup-snapshot |
| visibility | public |
| is_default | False |
| required_
| optional_
| | create_
| description | None |
+------
(overcloud) [stack@undercloud-0 ~]$ openstack share create nfs 1 --share-type sup-snapshot --name share1
+------
| Field | Value |
+------
| access_rules_status | active |
| availability_zone | None |
| create_
| created_at | 2022-07-
| description | None |
| has_replicas | False |
| host | |
| id | 37e14ebd-
| is_public | False |
| metadata | {} |
| mount_snapshot_
| name | share1 |
| progress | None |
| project_id | 32fa480757b740c
| replication_type | None |
| revert_
| share_group_id | None |
| share_network_id | None |
| share_proto | NFS |
| share_server_id | None |
| share_type | 5e232f46-
| share_type_name | sup-snapshot |
| size | 1 |
| snapshot_id | None |
| snapshot_support | True |
| source_
| status | creating |
| task_state | None |
| user_id | a149175623a74fa
| volume_type | sup-snapshot |
+------
(overcloud) [stack@undercloud-0 ~]$ openstack share snapshot create share1
+------
| Field | Value |
+------
| created_at | 2022-07-
| description | None |
| id | 179605f5-
| name | None |
| project_id | 32fa480757b740c
| provider_location | None |
| share_id | 37e14ebd-
| share_proto | NFS |
| share_size | 1 |
| size | 1 |
| status | creating |
| user_id | a149175623a74fa
+------
(overcloud) [stack@undercloud-0 ~]$ openstack share create nfs 1 --snapshot-id 179605f5-
Invalid input received: Invalid share type specified: the requested share type must match the type of the source share. If a share type is not specified when requesting a new share from a snapshot, the share type of the source share will be applied to the new share. (HTTP 400) (Request-ID: req-27c8ca2d-
# Share creation succeeded When share type was specified
(overcloud) [stack@undercloud-0 ~]$ openstack share create nfs 1 --snapshot-id 179605f5-
+------
| Field | Value |
+------
| access_rules_status | active |
| availability_zone | nova |
| create_
| created_at | 2022-07-
| description | None |
| has_replicas | False |
| host | hostgroup@
| id | e815a31e-
| is_public | False |
| metadata | {} |
| mount_snapshot_
| name | sha-from-
| progress | None |
| project_id | 32fa480757b740c
| replication_type | None |
| revert_
| share_group_id | None |
| share_network_id | None |
| share_proto | NFS |
| share_server_id | None |
| share_type | 5e232f46-
| share_type_name | sup-snapshot |
| size | 1 |
| snapshot_id | 179605f5-
| snapshot_support | True |
| source_
| status | creating |
| task_state | None |
| user_id | a149175623a74fa
| volume_type | sup-snapshot |
+------
Changed in manila-ui: | |
status: | New → Invalid |
Changed in python-manilaclient: | |
importance: | Undecided → High |
assignee: | nobody → Goutham Pacha Ravi (gouthamr) |
importance: | High → Medium |
milestone: | none → zed-2 |
Changed in python-manilaclient: | |
milestone: | zed-2 → zed-client-release |
Fix proposed to branch: master /review. opendev. org/c/openstack /python- manilaclient/ +/849037
Review: https:/