Bug 1461093 - A bug of unable to filter 'openstack volume list' by --project option
A bug of unable to filter 'openstack volume list' by --project option
Status: CLOSED NEXTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient (Show other bugs)
10.0 (Newton)
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Julie Pichon
Shai Revivo
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-13 09:44 EDT by ByoungHee Lee
Modified: 2017-06-16 05:06 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-16 05:06:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 416852 None None None 2017-06-14 06:42 EDT

  None (edit)
Description ByoungHee Lee 2017-06-13 09:44:29 EDT
Description of problem:
There is a bug that unable to filter 'openstack volume list' by —project option in Newton(OSP10). 
I found it fixed in the Ocata(OSP11). 
Is it possible to upgrade only openstack client to the newest version without major upgrade?

Version-Release number of selected component (if applicable):
RHEL OSP 10 (Newton)
OpenStack client version is 3.2.1

How reproducible:
This occurs consistently

Steps to Reproduce:
1. Source overcloudrc for admin account and admin tenant
2. Use the CLI to list volumes for each tenant
  ex) openstack volume list --project=demo
      openstack volume list --project=a_department

Actual results:
It shows only admin volumes

Expected results:
It should list the volume for each tenant by using --project option with admin in Newton(OSP11).

Additional info:

1. results in OSP11
[stack@director-osp11 ~]$ cat overcloudrc
# Clear any old environment that may conflict.
for key in $( set | awk '{FS="="}  /^OS_/ {print $1}' ); do unset $key ; done
export OS_USERNAME=admin
export NOVA_VERSION=1.1
export OS_PROJECT_NAME=admin
export OS_PASSWORD=dzA6XF69rHjkt2G3vveUe3FbM
export OS_NO_CACHE=True
export COMPUTE_API_VERSION=1.1
export no_proxy=,192.168.15.21,172.20.23.34
export OS_CLOUDNAME=overcloud
export OS_AUTH_URL=http://192.168.15.21:5000/v2.0
export OS_AUTH_TYPE=password
export PYTHONWARNINGS="ignore:Certificate has no, ignore:A true SSLContext object is not available"
[stack@director-osp11 ~]$ source overcloudrc
[stack@director-osp11 ~]$ openstack volume list --project admin
+--------------------------------------+--------------+-----------+------+-------------+
| ID                                   | Display Name | Status    | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| d42f9f47-d361-4c07-895d-a8db25a83e04 | admin-vol-1G | available |    1 |             |
+--------------------------------------+--------------+-----------+------+-------------+
[stack@director-osp11 ~]$ openstack volume list --project a-department
+--------------------------------------+---------------------+-----------+------+-------------+
| ID                                   | Display Name        | Status    | Size | Attached to |
+--------------------------------------+---------------------+-----------+------+-------------+
| e561d7d7-fddf-4d2c-bc2c-53827f742e8c | a-department-vol-1G | available |    1 |             |
+--------------------------------------+---------------------+-----------+------+-------------+

2. results in OSP10
[stack@director-osp10 ~]$ cat overcloudrc
[stack@director-osp10 ~]$ source overcloudrc
[stack@director-osp10 ~]$ openstack volume list --project admin
+--------------------------------------+--------------+-----------+------+-------------+
| ID                                   | Display Name | Status    | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| d42f9f47-d361-4c07-895d-a8db25a83e04 | admin-vol-1G | available |    1 |             |
+--------------------------------------+--------------+-----------+------+-------------+
[stack@director-osp10 ~]$ openstack volume list --project a-department
+--------------------------------------+--------------+-----------+------+-------------+
| ID                                   | Display Name | Status    | Size | Attached to |
+--------------------------------------+--------------+-----------+------+-------------+
| d42f9f47-d361-4c07-895d-a8db25a83e04 | admin-vol-1G | available |    1 |             |
+--------------------------------------+--------------+-----------+------+-------------+
Comment 1 Julie Pichon 2017-06-14 06:42:49 EDT
There is a workaround of using the cinder CLI directly with the project_id:

$ cinder list --tenant <project_id>

I think it's possible to install and use a more recent client on a workstation, however on a server it would likely bring in new dependencies and not be recommended.
Comment 2 ByoungHee Lee 2017-06-15 20:25:58 EDT
This workaround is that I wanted. 
Thanks a lot. Julie
Comment 3 Julie Pichon 2017-06-16 05:06:44 EDT
Thank you for the reply. Workaround deemed sufficient, closing based on comment 2.

Note You need to log in before you can comment on or make changes to this bug.