nova list --host=<> silently ignored if not admin

Asked by Gavin B

nova list --host=<name> is treated like a simple nova list if the user is not an admin, i.e. the --host=<name> filter is silently ignored.

Should there not be an insufficient-privileges error message in this case ? Otherwise there is room for confusion.

Question information

Language:
English Edit question
Status:
Expired
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Subashini Soundararajan (subashini-rajan17) said :
#1

To validate the bug

Revision history for this message
Subashini Soundararajan (subashini-rajan17) said :
#2

I was looking at the nova api code that returns the list of servers to nova client. It appears that ignoring the host parameter when the user is not admin is by design. According to the current implementation when there is any parameter not applicable to a non-admin user, it is removed and the rest of the command options are processed. I'll try to bring this to notice to a reviewer/approver.

This is the commit which removes all the parameters not applicable to a non-admin user. Look for _get_servers method in servers.py

5b866f3a » klmitch
2012-01-09 Serialization, deserialization, and response code decorators.
514 remove_invalid_options(context, search_opts,

https://github.com/openstack/nova/commit/5b866f3ad18d497d39a35248c2b0fdb62fcfaa81

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.