vmware driver is not actually implementing get_diagnostics

Bug #1237622 reported by Matt Riedemann
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Matt Riedemann

Bug Description

According to the hypervisor support matrix the vmware driver doesn't support the diagnostics API:

https://wiki.openstack.org/wiki/HypervisorSupportMatrix

But the code suggests otherwise:

https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/driver.py#L268

https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L1263

There is an unused get_diagnostics method in vmwareapi.vmops though:

https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L1284

i'm guessing that was stubbed out before the get_info method was added and someone connected the dots to the vmwareapi driver code to use it.

We should remove the unused get_diagnostics method.

Note that there aren't actually really any unit tests associated with the vmwareapi diagnostics API support though so we should add that in when we remove the unused method.

Tags: vmware
Revision history for this message
Matt Riedemann (mriedem) wrote :

Actually it looks like the vmwareapi.driver code is calling get_info for both the get_info API and the get_diagnostics API but they are supposed to return different information, so the vmware driver is actually not supporting the diagnostics API and should be fixed to raise the NotImplementedError.

summary: - Remove unused vmwareapi.vmops.get_diagnostics method
+ vmware driver is not actually implementing get_diagnostics
Changed in nova:
status: New → In Progress
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/50761

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit db68dc8670fc8943dfc142ebb0f3f1f405c04e4b
Author: Matt Riedemann <email address hidden>
Date: Wed Oct 9 14:38:25 2013 -0700

    Fix vmwareapi driver get_diagnostics calls

    The vmware driver is calling vmops.get_info for both the get_info and
    get_diagnostics APIs which is wrong since they should be returning
    different information. Given the hypervisor support matrix doesn't list
    the vmware driver as supporting the nova diagnostics API, it seems this
    was just an oversight.

    This patch changes the driver code to call the vmops.get_diagnostics
    method which raises NotImplementedError. It also fixes the tests to
    actually ensure covers get_diagnostics for both the ESX driver and the
    VC driver.

    Closes-Bug: #1237622

    Change-Id: I0c9015f1f7d5dd219548196de479e87e878ea0fd

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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