Deleted instances didn't show when calling "nova list --deleted" by non-admin users

Bug #1552071 reported by Zhenyu Zheng
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

Bug Description

When calling "nova list --deleted" using non-admin context, no instance in "DELETED" will return:

root@SZX1000058625:/opt/devstack# nova list --deleted
+--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+
| 40bab05f-0692-43df-a8a9-e7c0d58a73bd | test_inject | ACTIVE | - | Running | private=10.0.0.13, fdb7:5d7b:6dcd:0:f816:3eff:fe63:b012 |
| ee8907c7-0730-4051-8426-64be44300e70 | test_inject | ACTIVE | - | Running | private=10.0.0.14, fdb7:5d7b:6dcd:0:f816:3eff:fe4f:1b32 |
+--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+

Tags: api
Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
Matt Riedemann (mriedem)
tags: added: api
Revision history for this message
Matt Riedemann (mriedem) wrote :

There is a mailing list thread discussing this here:

http://lists.openstack.org/pipermail/openstack-dev/2016-March/088021.html

It would be good to write a functional regression test in nova to exhibit the behavior, that would go here:

https://github.com/openstack/nova/tree/master/nova/tests/functional/regressions

I've also confirmed the weird behavior:

https://gist.github.com/mriedem/1299a15007e413ff646a

Changed in nova:
status: New → Confirmed
Revision history for this message
Matt Riedemann (mriedem) wrote :

What version of novaclient are you using? I'm using 3.2.1 and don't have the --changes-since option with the nova list command.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Oh I see because --changes-since isn't in novaclient yet, you're working on adding it here:

https://review.openstack.org/#/c/286423/

Revision history for this message
Zhenyu Zheng (zhengzhenyu) wrote :

@Matt Riedemann, yes I'm working on it.

summary: - Non-admin users can use changes-since to show deleted instances when
- list servers
+ Deleted instances didn't show when calling "nova list --deleted" by non-
+ admin users
description: updated
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Nazeema Begum (nazeema123) wrote :

Is anyone still working on this bug..!if not i would like to work on this bug

Changed in nova:
assignee: Zhenyu Zheng (zhengzhenyu) → Nazeema Begum (nazeema123)
Changed in nova:
assignee: Nazeema Begum (nazeema123) → nobody
Revision history for this message
Nazeema Begum (nazeema123) wrote :

The command 'nova list --deleted' is provided only for the admin role (not for non-admin )to list the deleted instances, whereas non-admin users have no such privileges to access the admin functionalities of viewing the deleted instances.

The same is mentioned under the usage of "nova list[--deleted]" command in the below reference link
http://docs.openstack.org/cli-reference/nova.html.

Can this bug be closed as invalid or won't fix.

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/598012

Changed in nova:
assignee: nobody → huanhongda (hongda)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Stephen Finucane (<email address hidden>) on branch: master
Review: https://review.opendev.org/598012

Revision history for this message
Matt Riedemann (mriedem) wrote :

To capture what I said in the now abandoned patch:

"This would change something that's not an error to an error, regardless of the weird latent behavior. Because of that, I think this would require a microversion which means we'd need a spec if we wanted to change this. gmann was compiling a list of random cleanup items for the compute API in an etherpad I believe, and this is something that could probably go in that list as a candidate for something to cleanup in a mass cleanup microversion."

Changed in nova:
importance: Undecided → Wishlist
status: In Progress → Opinion
assignee: huanhongda (hongda) → nobody
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.