vmware code is using deprecated API that may not handle inventories over 100 items properly

Bug #1183654 reported by Shawn Hartsock
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Gary Kotton

Bug Description

Several VMwareAPI methods used to return an array of all results which could cause problems on extremely large inventories. New replacement API use scrollable results that return chunks of managed object results to be scrolled through. These new methods end in "Ex" and should be used in place of the previous methods when available.

The following code is using deprecated API that should be rewritten to use newer API

https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vim_util.py#L146
https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vim_util.py#L175
https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vim_util.py#L220

See:
http://pubs.vmware.com/vsphere-51/topic/com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.html?path=7_0_0_2_5_17_2#retrieveContents
... reference RetrieveProperties and RetrievePropertiesEX

Tags: vmware
Revision history for this message
Shawn Hartsock (hartsock) wrote :

Could someone else confirm this for me?

Changed in nova:
importance: Undecided → Wishlist
Changed in nova:
status: New → Confirmed
Revision history for this message
Shawn Hartsock (hartsock) wrote :

I've moved this up in priority as some people are talking about inventories of 1,000 virtual machines. This will cause issues with inventory sizes that big.

Changed in nova:
importance: Wishlist → Medium
milestone: none → havana-3
Gary Kotton (garyk)
Changed in nova:
assignee: nobody → Gary Kotton (garyk)
Revision history for this message
Gary Kotton (garyk) wrote :
Changed in nova:
status: Confirmed → In Progress
tags: added: grizzly-backport-potential
Revision history for this message
Shawn Hartsock (hartsock) wrote :

These have been deprecated since vSphere API (vCenter + ESX API combined) version 4.1 was released back in 2010 so I would love to see these deprecated API killed off completely.

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

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

commit e331287cdd1300878bfb9bbb3630889370e5fa72
Author: Gary Kotton <email address hidden>
Date: Tue Jul 9 23:55:32 2013 -0700

    Use RetrievePropertiesEx instead of RetrieveProperties

    Fixes bug 1183654

    The fix also adds a configuration variable enabling the user to
    configure the maximum amount of objects that can be retrieved by
    the aforementioned function.

    When using RetrievePropertiesEx the server may allocate resources
    in case additional calls are made. These are addressed by reading the
    extra resources using ContinueRetrievePropertiesEx (if necessary)
    or CancelRetrievePropertiesEx (when the necessary result has been found).

    DocImpact

    Change-Id: I894d9698461b0ce22b01211fd196f6c32899a8fd

Changed in nova:
status: In Progress → Fix Committed
Tracy Jones (tjones-i)
tags: added: vmware-co-preferred
tags: removed: vmware-co-preferred
Tracy Jones (tjones-i)
Changed in openstack-vmwareapi-team:
status: New → Fix Committed
Tracy Jones (tjones-i)
Changed in openstack-vmwareapi-team:
importance: Undecided → Medium
Changed in openstack-vmwareapi-team:
importance: Medium → Low
importance: Low → Wishlist
no longer affects: openstack-vmwareapi-team
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/45203

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
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.