create with pre-existed volume not showed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuxi |
Fix Released
|
Undecided
|
KS Kim |
Bug Description
Steps to reproduce:
First, setup Fuxi with devstack: https:/
$ cat /etc/fuxi/fuxi.conf
...
[cinder]
fstype = ext4
multiattach = false
volume_connector = osbrick
memcached_servers = 10.0.0.6:11211
signing_dir = /var/cache/fuxi
cafile = /opt/stack/
auth_uri = http://
project_domain_name = Default
project_name = service
user_domain_name = Default
password = pass
username = fuxi
auth_url = http://
auth_type = password
...
$ source /opt/stack/
$ cinder create --name test 1
$ sudo docker volume create --driver fuxi --name test --opt volume_id=<id> # this succeeded
$ cinder list # The cinder volume was 'in-use'
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 9ca23942-
+------
$ sudo docker volume ls # However, we cannot list it in docker
DRIVER VOLUME NAME
$ sudo docker volume inspect test # we cannot inspect it either
[]
Error: No such volume: test
The issue is due to the fact that Fuxi was using 'service' tenant, but the cinder volume was pre-created in 'demo' tenant. Therefore, the creation succeeded because the 'service' credential has privilege to get volume from other tenants. However, list/inspect failed because it searched volume in 'service' tenant only.
Changed in fuxi: | |
assignee: | nobody → Kiseok Kim (kiseok7) |
Changed in fuxi: | |
status: | New → In Progress |
Reviewed: https:/ /review. openstack. org/497785 /git.openstack. org/cgit/ openstack/ fuxi/commit/ ?id=e7740fb3a7b e34daad8d41edeb 083af8f434bf10
Committed: https:/
Submitter: Jenkins
Branch: master
commit e7740fb3a7be34d aad8d41edeb083a f8f434bf10
Author: Kiseok Kim <email address hidden>
Date: Fri Aug 25 09:07:50 2017 +0000
Adds 'all_tenants' search option in volumeprovider/ cinder. py
When user create a docker volume with a pre-created cinder volume,
user can't see the docker volume if the pre-created cinder volume's
tenant is diffent to the tenant Fuxi use.
This patch adds 'all_tenants' option configurable.
With this, user can search cinder volumes over all tenant.
Change-Id: I0519f54c07e7ac 84f53b580a34b3b 4064183d8a6
Closes-Bug: #1656960