← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1398329] Re: Wrong filtering during "nova list --tenant <non admin tenant>"

 

This requires a change to the Nova API, so move to a feature

** Changed in: nova
       Status: In Progress => Opinion

** Changed in: nova
   Importance: Medium => Wishlist

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1398329

Title:
  Wrong filtering during "nova list  --tenant <non admin tenant>"

Status in OpenStack Compute (nova):
  Opinion

Bug description:
  I am using DevStack development environment.
  I have sourced admin user and admin tenant using command - ''source openrc admin admin"

  Again I have booted two servers - 
  test-server-1
  test-server-2

  During "nova list", I have used tenant filtering here. 
  1. admin tenant
  2. demo tenant

  In case of admin all both servers get listed (Correct behavior)
  But in case of demo tenant, Ideally no instace should be reflected in the list.
  But here I see all  servers get listed irrespective to tenant filter. 

  
  Please see below operations  -

  [raies@localhost devstack]$ nova list
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | ID                                   | Name          | Status | Task State | Power State | Networks         |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | 299e99f7-ed33-4a17-8755-18be1cbe46b9 | test-server-1 | ACTIVE | -          | Running     | private=10.0.0.2 |
  | 0f9c1b84-0d5d-474a-9705-c9defbb8ec2b | test-server-2 | ACTIVE | -          | Running     | private=10.0.0.5 |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+

  
  [raies@localhost devstack]$ nova list --all-tenant
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | ID                                   | Name          | Status | Task State | Power State | Networks         |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | 299e99f7-ed33-4a17-8755-18be1cbe46b9 | test-server-1 | ACTIVE | -          | Running     | private=10.0.0.2 |
  | 0f9c1b84-0d5d-474a-9705-c9defbb8ec2b | test-server-2 | ACTIVE | -          | Running     | private=10.0.0.5 |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+

  
  [raies@localhost devstack]$ nova list --tenant admin
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | ID                                   | Name          | Status | Task State | Power State | Networks         |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | 299e99f7-ed33-4a17-8755-18be1cbe46b9 | test-server-1 | ACTIVE | -          | Running     | private=10.0.0.2 |
  | 0f9c1b84-0d5d-474a-9705-c9defbb8ec2b | test-server-2 | ACTIVE | -          | Running     | private=10.0.0.5 |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+


  
  <Now here it seems problem>

  
  [raies@localhost devstack]$ nova list --tenant demo
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | ID                                   | Name          | Status | Task State | Power State | Networks         |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | 299e99f7-ed33-4a17-8755-18be1cbe46b9 | test-server-1 | ACTIVE | -          | Running     | private=10.0.0.2 |
  | 0f9c1b84-0d5d-474a-9705-c9defbb8ec2b | test-server-2 | ACTIVE | -          | Running     | private=10.0.0.5 |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+

  
  [raies@localhost devstack]$ keystone tenant-list
  +----------------------------------+--------------------+---------+
  |                id                |        name        | enabled |
  +----------------------------------+--------------------+---------+
  | 7ada46b6530147daa4c2138d03ea75ba |       admin        |   True  |
  | 3861ef986db14c888a6d0167b0bb3cee |      alt_demo      |   True  |
  | 4931442604ef4368b5d9134e79c00c27 |        demo        |   True  |
  | 8cd01cd392ed441298a80240024f2cd2 | invisible_to_admin |   True  |
  | f509d7c57bef4554bcdd2322697cd3cd |      service       |   True  |
  +----------------------------------+--------------------+---------+

  
  [raies@localhost devstack]$ nova list --tenant 4931442604ef4368b5d9134e79c00c27
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | ID                                   | Name          | Status | Task State | Power State | Networks         |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+
  | 299e99f7-ed33-4a17-8755-18be1cbe46b9 | test-server-1 | ACTIVE | -          | Running     | private=10.0.0.2 |
  | 0f9c1b84-0d5d-474a-9705-c9defbb8ec2b | test-server-2 | ACTIVE | -          | Running     | private=10.0.0.5 |
  +--------------------------------------+---------------+--------+------------+-------------+------------------+

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1398329/+subscriptions


References