Shares cannot be found by name in admin context
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Medium
|
jiaopengju | ||
python-manilaclient |
Fix Released
|
Medium
|
Tom Barron |
Bug Description
In admin context, the manila client fails to find shares (outside the admin tenant)
when only the share name is passed. ID works fine. [1]
The reason is
https:/
which requires 'all_tenants' to be True, which is not set in the request
as sent by the client and hence the search is confined to the admin tenant.
The above code stems from Cinder days, but in Cinder the corresponding request
works now as the client is setting all_tenants to 1 when making the request. [2]
[1]
$ manila show xyz
ERROR: No share with a name or ID of 'xyz' exists.
$
$ manila show e653ff96-
| name | xyz
[2]
$ manila --debug show xyz 2>&1|grep detail
...
REQ: curl -i -X GET https:.
$
$ cinder --debug show vol-xyz 2>&1|grep detail
$REQ: curl -g -i -X GET https:.
summary: |
- Shares cannot be found in admin context + Shares cannot be found by name in admin context |
Changed in manila: | |
status: | New → Confirmed |
Changed in python-manilaclient: | |
status: | New → Confirmed |
description: | updated |
description: | updated |
Changed in manila: | |
importance: | Undecided → Medium |
Changed in python-manilaclient: | |
importance: | Undecided → Medium |
Changed in manila: | |
assignee: | nobody → jiaopengju (pj-jiao) |
assignee: | jiaopengju (pj-jiao) → nobody |
assignee: | nobody → jiaopengju (pj-jiao) |
Changed in python-manilaclient: | |
assignee: | nobody → jiaopengju (pj-jiao) |
Changed in python-manilaclient: | |
assignee: | jiaopengju (pj-jiao) → Tom Barron (tpb) |
Changed in manila: | |
status: | In Progress → Fix Released |
I just verified that this does indeed happen with the latest version of Devstack. My procedure was as follows using the Generic Share Driver:
source openrc create --neutron-net-id <private_ neutron_ net_id> --neutron-subnet-id <private_ neutron_ subnet_ id> share-net
manila share-network-
manila create NFS 1 --name test --share-network share-net
source openrc admin admin
manila show test
The final command will fail with the error indicated above. Thanks for the report, Arne!