Share stuck on "creating" status when using a private share type from other project
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Medium
|
Tom Barron |
Bug Description
Description of problem:
When creating a share using a private share from other tenant, i.e.
the tenant has no access to the share type, as expected it failed with 404,
but the share stuck on "creating" status.
Steps to Reproduce:
1. Create private share type on tenant "A".
2. Create a share on tenant "B" using the share type from tenant "A" by non-admin user
Actual results:
Share stuck on "creating" status
Expected results:
The share should not reach the creation process.
The share should not be listed in manila list.
Additional info:
On tenant "A":
(overcloud) [stack@undercloud-0 ~]$ manila type-list
+------
| ID | Name | visibility | is_default | required_
+------
| 696b41dc-
+------
(overcloud) [stack@undercloud-0 ~]$ manila type-access-list 696b41dc-
+------------+
| Project_ID |
+------------+
+------------+
On tenant "B":
(overcloud) [stack@undercloud-0 ~]$ manila create --name share_member_user cephfs 1 --share-type private
ERROR: ShareTypeNotFound: Share type 696b41dc-
(.venv) (overcloud) [stack@undercloud-0 ~]$ manila list
+------
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+------
| 988854b1-
+------
Detailed Steps from Liron Kuchlani:
On admin project by admin user: ======= ======= ======= ===
=======
# Create project_a:
(overcloud) [stack@undercloud-0 ~]$ openstack project create project_a ------- +------ ------- ------- ------- ------- + ------- +------ ------- ------- ------- ------- + f8b155cf9cfd135 6f | ------- +------ ------- ------- ------- ------- +
+------
| Field | Value |
+------
| description | |
| domain_id | default |
| enabled | True |
| id | 8c988874e83543c
| is_domain | False |
| name | project_a |
| options | {} |
| parent_id | default |
| tags | [] |
+------
# Create user user_a on project_a
(overcloud) [stack@undercloud-0 ~]$ openstack user create --project project_a --password redhat user_a ------- ------- -+----- ------- ------- ------- ------- -+ ------- ------- -+----- ------- ------- ------- ------- -+ f8b155cf9cfd135 6f | 9ba67ce38da3ef9 a7 | ------- ------- -+----- ------- ------- ------- ------- -+
+------
| Field | Value |
+------
| default_project_id | 8c988874e83543c
| domain_id | default |
| enabled | True |
| id | 7dde343f6ff24f5
| name | user_a |
| options | {} |
| password_expires_at | None |
+------
# Assign member role to user_a user
(overcloud) [stack@undercloud-0 ~]$ openstack role add --user user_a --project project_a member
# Create private share type on admin project
(overcloud) [stack@undercloud-0 ~]$ manila type-create --is-public False admin-private- share-type False ------- ------- --+---- ------- ------- ------- ------- ------+ ------- ------- --+---- ------- ------- ------- ------- ------+ b143-4c56- ba71-0a45f4d584 8f | share-type | extra_specs | driver_ handles_ share_servers : False | extra_specs | | ------- ------- --+---- ------- ------- ------- ------- ------+
+------
| Property | Value |
+------
| ID | c4ef9a32-
| Name | admin-private-
| Visibility | private |
| is_default | - |
| required_
| optional_
| Description | None |
+------
(overcloud) [stack@undercloud-0 ~]$ manila type-access-list c4ef9a32- b143-4c56- ba71-0a45f4d584 8f
+------------+
| Project_ID |
+------------+
+------------+
On project_a by user_a user: ======= ======= =======
=======
# Although the share type does not exist, try to create share with it
(overcloud) [stack@undercloud-0 ~]$ manila type-show c4ef9a32- b143-4c56- ba71-0a45f4d584 8f b143-4c56- ba71-0a45f4d584 8f' exists.
ERROR: No sharetype with a name or ID of 'c4ef9a32-
(overcloud) [stack@undercloud-0 ~]$ manila create --name share_member_user cephfs 1 --share-type ...