nova usage list to show tenant name.

Bug #1318770 reported by Ritesh Paiboina
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Wishlist
Sravan Kumar
python-novaclient
In Progress
Wishlist
Sravan Kumar

Bug Description

$nova --version
2.17.0.75

When I issue nova usage list command , I get the following details.

$ nova usage-list
Usage from 2014-04-11 to 2014-05-10:
+----------------------------------+---------+--------------+-----------+---------------+
| Tenant ID | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+---------+--------------+-----------+---------------+
| 41a0db24bc8940b6a2f3297bef5f6cee | 3 | 1478.70 | 23.10 | 0.00 |
| 0dceee00627f44838174cccb6bf29421 | 3 | 172.36 | 1.36 | 0.00 |
+----------------------------------+---------+--------------+-----------+---------------+

From the Tenant ID, I cannot able to know what tenant name it is . I want to know the tenant name. Because tenant ID is long to remember. To get tenant name , we have to use keystone tenant list.

My proposal is to include tenant name in the current columns of nova usage list.
So that user can easily recognize its tenant name. As the same thing is available in Horizon Dashboard.

Is their any problems or dependices so that we are not including tenant name. If yes, please share the details for it.

 I would like to do the code executions for this.

Thank you

RITESH.

Tags: api
Revision history for this message
Shraddha Pandhe (shraddha-pandhe) wrote :

Hi,

I have a bluepring: https://review.openstack.org/#/c/91697/

I am currently planning to cover 'nova list' case, but it can be easily expanded to fix this bug as well.

Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

Hi Shraddha,

Here nova list and nova usage list case are different. One more thing, when I give nova list command. I get the following output.

+--------------------------------------+--------+--------+------------+-------------+-------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------+--------+------------+-------------+-------------------+
| f058d03a-de2d-4eba-b3f4-8c074e76e17b | RITESH | ACTIVE | - | Running | public=172.24.4.3 |
+--------------------------------------+--------+--------+------------+-------------+-------------------+

Here I am getting the name. But nova usage list case is different with respect to the VM user.

+----------------------------------+---------+--------------+-----------+---------------+
| Tenant ID | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+---------+--------------+-----------+---------------+
| 41a0db24bc8940b6a2f3297bef5f6cee | 3 | 1478.70 | 23.10 | 0.00 |
| 0dceee00627f44838174cccb6bf29421 | 3 | 172.36 | 1.36 | 0.00 |
+----------------------------------+---------+--------------+-----------+---------------+

I am looking to fix this by adding tenant name over there. If I am wrong please tell me.

Changed in nova:
assignee: nobody → Ritesh (rsritesh)
Revision history for this message
Shraddha Pandhe (shraddha-pandhe) wrote : Re: [Bug 1318770] Re: nova usage list to show tenant name.

Hi Ritesh,

The 'Name' that you are talking about in 'nova list', is that a display name of the VM? Because there is no support for that in openstack to display username/ VM owner name right now. (as evident from the comments on my blueprint)

Our use cases are similar in the sense that, we both are trying to convert UUID to Display name.

It works for VM UUID <-> VM display name right now, because, nova-client does a servers/detail call to the nova-api, and api returns all the information about al the VMs. After that, its just json parsing at the client side, that fetches the mapping from the json. Currently there is no call to nova-api that returns both, user uuid and username (or tenant uuid/tenant name). Its mainly because that information is maintained by keystone rather than nova-api.

Does that make sense?

Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

Hi Shraddha

The name I am talking about is TENANT NAME and in a TENANT there are mulitple vm's . In nova list command , the command gives me about VM details.

To be more clear,
Here we are talking two different commands.

1. List instances:
    $ nova list

2. Get summary statistics for each tenant:
    $ nova usage-list

I am talking about the second command above. I am talking about the each tenant statistics. Not about the VM's.

I want to know on which command you are talking about.

Revision history for this message
Shraddha Pandhe (shraddha-pandhe) wrote :

What I am trying to say is, irrespective of whether its nova list or nova usage-list, the novaclient part is common. So you would need to call keystone client somehow to get the actual name for the tenant ID. I am doing the same thing but just for username, and not for tenant name.

On Wednesday, May 14, 2014 2:45 AM, Ritesh <email address hidden> wrote:

Hi Shraddha

The name I am talking about is TENANT NAME and in a TENANT there are
mulitple vm's . In  nova list command , the command  gives me about  VM
details.

To be more clear,
Here we are talking two different commands.

1. List instances:
    $ nova list

2. Get summary statistics for each tenant:
    $ nova usage-list

I am talking about the second command above. I am talking about the each tenant statistics. Not about the VM's.

I want to know on which command you are talking about.

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1318770

Title:
  nova usage list to show tenant name.

Status in OpenStack Compute (Nova):
  New

Bug description:
  $nova --version
  2.17.0.75

  When I issue nova usage list command , I get the following details.

  $ nova usage-list
  Usage from 2014-04-11 to 2014-05-10:
  +----------------------------------+---------+--------------+-----------+---------------+
  | Tenant ID                        | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
  +----------------------------------+---------+--------------+-----------+---------------+
  | 41a0db24bc8940b6a2f3297bef5f6cee | 3      | 1478.70      | 23.10    | 0.00          |
  | 0dceee00627f44838174cccb6bf29421 | 3      | 172.36      | 1.36      | 0.00          |
  +----------------------------------+---------+--------------+-----------+---------------+

  From the Tenant ID, I cannot  able to know what tenant name it is . I
  want to know the tenant name. Because tenant ID is long to remember.
  To get tenant name , we have to use keystone tenant list.

  My proposal is to include tenant name in the current columns of nova usage list.
  So that user can easily recognize its tenant name. As the same thing is available in Horizon Dashboard.

  Is their any problems  or dependices so that we are not including
  tenant name. If yes, please share the details for it.

   I would like to  do the code executions for this.

  Thank you

  RITESH.

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

Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

For nova list, anyway you are getting the username of the each instance with it ID. You don't have to do any thing else.

Check Below :

ritesh@ritesh-ThinkCentre-M92p:~/devstack$ nova list
+--------------------------------------+--------+--------+------------+-------------+-------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------+--------+------------+-------------+-------------------+
| f058d03a-de2d-4eba-b3f4-8c074e76e17b | RITESH | ACTIVE | - | Running | public=172.24.4.3 |
+--------------------------------------+--------+--------+------------+-------------+-------------------+

The flow of calling api for nova list and nova usage list is different.

What username you want to put in which command . For a tenant , there are mulitpile users. So tenant is defined by tenant's name , not by any username.

Please check the openstach dasboard , overview usage.

Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

In openstack dashboard, when you click on admin -->overview. It gives you overview usage summary page.
In that page. if you observe, you are getting project name ( i.e tenant name ).
But in nova usage list command , I am getting tenant id not tenant name.
So my point is that along with tenant id , tenant name should also be added as similar as in GUI page.

Tracy Jones (tjones-i)
tags: added: api
Changed in nova:
importance: Undecided → Wishlist
Changed in nova:
assignee: Ritesh (rsritesh) → nobody
Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

This is a novaclient feature, not a nova one

Changed in nova:
status: New → Invalid
Changed in python-novaclient:
importance: Undecided → Wishlist
melanie witt (melwitt)
Changed in python-novaclient:
status: New → Confirmed
Revision history for this message
Sayaji Patil (sayaji15) wrote :

Hey Christopher,
                               The current tenant-usage api does not return the "tenant name". So if we want to display tenant name, it can be done in two ways

1) Once the tenant-usage api returns, make an extra call to get the tenant name
2) Modify the api to return the tenant name alongwith other parameters displayed in the o/p

In case of #2, changes are required in the nova-api

Changed in python-novaclient:
assignee: nobody → Sayaji Patil (sayaji15)
Changed in python-novaclient:
assignee: Sayaji Patil (sayaji15) → Amandeep (rattenpal-amandeep)
Changed in python-novaclient:
status: Confirmed → In Progress
Changed in python-novaclient:
assignee: Amandeep (rattenpal-amandeep) → nobody
Changed in python-novaclient:
status: In Progress → Confirmed
Changed in python-novaclient:
assignee: nobody → Amandeep (rattenpal-amandeep)
Revision history for this message
Amandeep (rattenpal-amandeep) wrote :

Hi all,
I think we should go with step 1 given by sayaji : Once the tenant-usage api returns, make an extra call to get the tenant name.
because step 2 will degrade the performance of nova-api too.
For that first we need to change in the server side then novaclient.

Changed in python-novaclient:
assignee: Amandeep (rattenpal-amandeep) → Sravan Kumar (dommarajusravan)
Changed in python-novaclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/349952
Reason: This patch has been sitting unchanged for more than 12 weeks. I am therefore going to abandon it to keep the nova review queue sane. Please feel free to restore the change if you're still working on it.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-novaclient (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/349955
Reason: This review is > 6 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in nova:
assignee: nobody → Sravan Kumar (dommarajusravan)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.