nova diagnostics doesn't work with libvirt/qemu,kvm

Bug #986200 reported by Lorin Hochstein
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Leander Beernaert

Bug Description

The "nova diagnostics" command does not currently work with qemu and kvm.

Revision history for this message
Lorin Hochstein (lorinh) wrote :

Leander Bessa mentioned working on this bug in the mailing list:

https://lists.launchpad.net/openstack/msg10303.html

Changed in nova:
assignee: nobody → Leander Bessa (leanderbb)
Revision history for this message
Leander Beernaert (leanderbb) wrote :

So far, whit what i've put together i can get:

- CPU utilization, although it requires a minimum sample time of 1 second
- IO read and write for disks, volumes and network interfaces

I am still unable to retrieve the memory usage. However, i think that might be a libvirt issue, since i can't seem to get the value through the virsh command as well.

How can i submit the code i've made this far?

Revision history for this message
Lorin Hochstein (lorinh) wrote :

Leander:

See http://wiki.openstack.org/HowToContribute for how to submit your code.

In a nutshell: you'll need to sign the Contributor Licnse Agreement (CLA), add your name to http://wiki.openstack.org/Contributors and join the https://launchpad.net/~openstack-cla team on Launchpad, then you'll be able to submit your code to Gerrit using the git-review tool.

Revision history for this message
Lorin Hochstein (lorinh) wrote :

James Penick from Yahoo said on the mailing list “In the interim, tell those people that code is comin' Real Soon Now.”

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

any progress on this so far?

Changed in nova:
status: New → Confirmed
Revision history for this message
Leander Beernaert (leanderbb) wrote :

I'm sorry this is taking so long, but i'm still waiting for some on to sign the CCLA before i can submit my code.

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
Revision history for this message
Leander Beernaert (leanderbb) wrote :

Small update: The CCLA should be signed by the end of the day, and i hope to submit the code by the end of the week :)

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/8839

Changed in nova:
status: Confirmed → In Progress
Sean Dague (sdague)
Changed in nova:
importance: Wishlist → Low
milestone: none → folsom-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/8839
Committed: http://github.com/openstack/nova/commit/ad54ed53cf6a475ad0f8042f8b95454a8c0b35a4
Submitter: Jenkins
Branch: master

commit ad54ed53cf6a475ad0f8042f8b95454a8c0b35a4
Author: Leander Bessa Beernaert <email address hidden>
Date: Fri Jun 22 12:08:08 2012 +0100

    Adds diagnostics command for the libvirt driver.

    This code provides an implementation of the get_diagnostics
    API for the libvirt driver. This API is invoked by the
    'nova diagnostic' command.

    There is no existing formal specification for what data items
    to expose from the 'get_diagnostics' API, so the XenAPI driver
    is used as an informal guide. The Xen implementation currently
    produces the following output:

    +----------------+-----------------+
    | Property | Value |
    +----------------+-----------------+
    | cpu0 | 4.3627 |
    | memory | 1171088064.0000 |
    | memory_target | 1171088064.0000 |
    | vbd_xvda_read | 0.0 |
    | vbd_xvda_write | 0.0 |
    | vif_0_rx | 3223.6870 |
    | vif_0_tx | 0.0 |
    | vif_1_rx | 104.4955 |
    | vif_1_tx | 0.0 |
    +----------------+-----------------+

    The new libvirt implementation will return a similar set of stats
    for guest CPUs, memory, disks and network interfaces, resulting
    in the following output:

    +------------------+------------+
    | Property | Value |
    +------------------+------------+
    | cpu0_time | 2870000000 |
    | memory | 524288 |
    | vda_errors | -1 |
    | vda_read | 262144 |
    | vda_read_req | 112 |
    | vda_write | 5606400 |
    | vda_write_req | 376 |
    | vnet0_rx | 63343 |
    | vnet0_rx_drop | 0 |
    | vnet0_rx_errors | 0 |
    | vnet0_rx_packets | 431 |
    | vnet0_tx | 4905 |
    | vnet0_tx_drop | 0 |
    | vnet0_tx_errors | 0 |
    | vnet0_tx_packets | 45 |
    +------------------+------------+

    The implementation has only been tested with the libvirt KVM
    driver.

    In a future a formal specification for the required data
    format should be written and all virt drivers made to comply.

    Finally, the fakelibvirt driver has been updated in order to
    support the methods required by the get_diagnostics method.

    For those interested, below is the formula to extract the
    CPU usage based on the CPU time. I've added it here for reference
    since it's not used at the moment and it took quite a while
    to locate it in the libvirt documentation.

      usage = 100 * (current_cpu_time - last_cpu_time) /
              (measurement_interval * (10 ** 9))

    Fixes bug 986200.
    Change-Id: I92da392f43d0840ed31cfd88f54570ea5830bb4a

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
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.