Admin only shown for args that can be used by non-admin

Bug #1295126 reported by Leandro Ignacio Costantino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Wishlist
Verónica Musso

Bug Description

The output of "nova help list" show several arguments as "Admin Only", while they are not.

--ip, --ipv6, --instance-name and --name can be used by regular users.

==============================================================
Optional arguments:
  --reservation-id <reservation-id>
                        Only return servers that match reservation-id.
  --ip <ip-regexp> Search with regular expression match by IP address
                        (Admin only).
  --ip6 <ip6-regexp> Search with regular expression match by IPv6 address
                        (Admin only).
  --name <name-regexp> Search with regular expression match by name
  --instance-name <name-regexp>
                        Search with regular expression match by server name
                        (Admin only).
  --status <status> Search by server status
  --flavor <flavor> Search by flavor name or ID
  --image <image> Search by image name or ID
  --host <hostname> Search servers by hostname to which they are assigned
                        (Admin only).
  --all-tenants [<0|1>]
                        Display information from all tenants (Admin only).
  --tenant [<tenant>] Display information from single tenant (Admin only).
  --deleted Only display deleted servers (Admin only).
  --fields <fields> Comma-separated list of fields to display. Use the
                        show command to see which fields are available.
  --minimal Get only uuid and name.

Revision history for this message
Sahid Orentino (sahid-ferdjaoui) wrote :

This should probably need a blueprint?

Changed in python-novaclient:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Leandro Ignacio Costantino (leandro-i-costantino) wrote :

Sahid, i am not sure about a blueprint for this, there's no feature being added, just remove text from the help.
Unless we consider to inspect and clean every other command, in that case it may be worth.

ZhiQiang Fan (aji-zqfan)
Changed in python-novaclient:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :
Download full text (3.5 KiB)

I can confirm that --ip can be used by normal user
but --ip6 has no effect for normal user
and --instance-name has no effect for both

can you provide reproduce steps? thanks

--
devstack master branch, install openstack environment
# . accrc/demo/demo
# nova boot --image cirros-0.3.1-x86_64-uec --flavor 1 test
# nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| 0aec9545-f211-4d0a-bbf5-ade1d6e574a1 | test | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+
# nova list --ip xx
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
# nova list --ip6 xx
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| 0aec9545-f211-4d0a-bbf5-ade1d6e574a1 | test | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+
# nova list --instance-name xx
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| 0aec9545-f211-4d0a-bbf5-ade1d6e574a1 | test | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+
# . accrc/admin/admin
# nova boot --image cirros-0.3.1-x86_64-uec --flavor 1 test-admin
# nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| cf8e4f95-dbf5-4820-866a-74317a1dd819 | test | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+
# nova list --ip6 xx
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
# nova list --instance-name xx
+--------------------------------------+------+--------+------------+-------------+------------------+
...

Read more...

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

sorry, the previous example has a mistake, the vm created by admin is named test too but described as test-admin
i just use bash-history and accidently use the previous boot command which lead to same vm name

ZhiQiang Fan (aji-zqfan)
Changed in python-novaclient:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Changed in python-novaclient:
assignee: nobody → Verónica Musso (veronica-a-musso)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: Confirmed → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/90754
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=0a1f9c168fe0562ca1e7d5137c015e0975f6173c
Submitter: Jenkins
Branch: master

commit 0a1f9c168fe0562ca1e7d5137c015e0975f6173c
Author: Veronica Musso <email address hidden>
Date: Mon Apr 28 11:30:03 2014 -0300

    Fix for "nova help list" command

    The output of "nova help list" shows several argument as "Admin Only",
    when they are not.
    This patch modifies help notes for --ip, --ip6 and --instance-name,
    which can be used by regular users.

    DocImpact

    Change-Id: Iac541ac8e698a27348b437ad53910bd09ea7f257
    Closes-Bug: #1295126

Changed in python-novaclient:
status: In Progress → Fix Committed
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.18.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
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.