nova list doesn't work with tenant name, only tenant id
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-novaclient |
Opinion
|
Wishlist
|
Xiao Li Xu |
Bug Description
Hi,
I'm having issues listing all instances for a given tenant/project. It seems that the v2 Compute API ignores the tenant_id.
$ nova --debug --no-cache list
REQ: curl -i https:/
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| e8bb176c-
+------
That looks fine, and so does this:
$ nova --debug --no-cache --os-tenant-name hloeung_project list --tenant hloeung_project
REQ: curl -i https:/
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| e8bb176c-
+------
But when I try using the admin tenant, it seems to return a different list of servers/instances:
$ nova --debug --no-cache --os-tenant-name admin list --tenant hloeung_project
REQ: curl -i https:/
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 931bf3c2-
+------
ii python-novaclient 1:2.15.0-0ubuntu1 all client library for OpenStack Compute API
ii nova-api 1:2013.
Any ideas?
Regards,
Haw
tags: | added: api |
Changed in nova: | |
assignee: | nobody → Mauro Sergio Martins Rodrigues (maurosr) |
summary: |
- v2 API bug - list servers ignores tenant_id? + nova list doesn't work with tenant name, only tenant id |
Changed in python-novaclient: | |
assignee: | nobody → tcs_openstack_group (tcs-openstack-group) |
Changed in python-novaclient: | |
status: | Triaged → In Progress |
Changed in python-novaclient: | |
assignee: | sachi (sachi-gupta) → Abhishek Talwar (abhishek-talwar) |
Changed in python-novaclient: | |
assignee: | nobody → IBM-Cloud-SH (ibm-cloud-sh) |
Hi,
As suggested in LP: #1185290, I've tried with '--all-tenants 1' and it still doesn't seem to show all instances for a given tenant.
e.g. The instances that I currently have are as follows:
[hloeung@darkon tmp]$ nova --os-tenant-name hloeung_project list --tenant hloeung_project --all-tenants 1 ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ---+--- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- --+ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ---+--- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- --+ 9a19-4d97- b459-1dfb3aa3a4 8f | juju-canonistac k-haw-lcy02- machine- 0 | ACTIVE | None | Running | canonistack= 10.55.32. 107 | 97ae-4145- ba32-e1b325479d 04 | juju-canonistac k-haw-lcy02- machine- 1 | ACTIVE | None | Running | canonistack= 10.55.32. 45 | d7cc-45d6- a59f-378fe293a3 f6 | juju-canonistac k-haw-lcy02- machine- 3 | ACTIVE | None | Running | canonistack= 10.55.32. 58 | e5c9-4238- b3d6-e7b327af0a 49 | juju-canonistac k-haw-lcy02- machine- 6 | ACTIVE | None | Running | canonistack= 10.55.32. 73, 162.213.35.42 | 2a57-4a0e- a8db-95dad0ed71 cf | juju-canonistac k-haw-lcy02- machine- 7 | ACTIVE | None | Running | canonistack= 10.55.32. 106, 162.213.35.38 | ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ---+--- ------- --+---- ------- --+---- ------- ------- ------- ------- ------- --+
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| c2b33d0a-
| b5052d85-
| 50162d63-
| f6ffc9ca-
| 9afbe3b5-
+------
But with the admin tenant and --all-tenants, no instances are shown:
[hloeung@darkon tmp]$ nova --os-tenant-name admin list --tenant hloeung_project --all-tenants 1
[hloeung@darkon tmp]$
Regards,
Haw