create with pre-existed volume not showed

Bug #1656960 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuxi
Fix Released
Undecided
KS Kim

Bug Description

Steps to reproduce:

First, setup Fuxi with devstack: https://github.com/openstack/fuxi/tree/master/devstack
$ 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/data/ca-bundle.pem
auth_uri = http://10.0.0.6/identity
project_domain_name = Default
project_name = service
user_domain_name = Default
password = pass
username = fuxi
auth_url = http://10.0.0.6/identity_admin
auth_type = password
...
$ source /opt/stack/devstack/openrc demo demo
$ 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-7fb0-4e47-9227-1d42f5ce1811 | in-use | test | 1 | lvmdriver-1 | false | None |
+--------------------------------------+--------+------+------+-------------+----------+-------------+
$ 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.

KS Kim (kiseok7)
Changed in fuxi:
assignee: nobody → Kiseok Kim (kiseok7)
Changed in fuxi:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuxi (master)

Reviewed: https://review.openstack.org/497785
Committed: https://git.openstack.org/cgit/openstack/fuxi/commit/?id=e7740fb3a7be34daad8d41edeb083af8f434bf10
Submitter: Jenkins
Branch: master

commit e7740fb3a7be34daad8d41edeb083af8f434bf10
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: I0519f54c07e7ac84f53b580a34b3b4064183d8a6
    Closes-Bug: #1656960

Changed in fuxi:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuxi (master)

Change abandoned by Hongbin Lu (<email address hidden>) on branch: master
Review: https://review.openstack.org/420386

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.