Bug 1086814 - VMWARE: datastore selection is incorrect if token is being used
Summary: VMWARE: datastore selection is incorrect if token is being used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 5.0 (RHEL 7)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: async
: 4.0
Assignee: Matthew Booth
QA Contact: Jaroslav Henner
URL:
Whiteboard:
Depends On: 1080622
Blocks: 1055536
TreeView+ depends on / blocked
 
Reported: 2014-04-11 14:55 UTC by Scott Lewis
Modified: 2022-07-09 06:52 UTC (History)
8 users (show)

Fixed In Version: openstack-nova-2013.2.3-9.el6ost
Doc Type: Bug Fix
Doc Text:
Previously, Compute did not take account of vSphere returning multiple result sets when querying datastores. As a consequence, if a cluster contained more than [maximum objects] datastores, as defined in the vmware section of the Compute configuration, only those returned in the first result set would be considered when selecting a datastore for a new instance. As [maximum objects] defaults to 100, it is unlikely that most users would be affected by this change. This has been fixed so that Compute now takes account of all result sets returned by vSphere when querying datastores for a cluster. Now, Compute will always select the datastore with the greatest available space, regardless of the number of datastores in a cluster.
Clone Of: 1080622
Environment:
Last Closed: 2014-08-21 00:40:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1245564 0 None None None Never
OpenStack gerrit 54361 0 None None None Never
Red Hat Issue Tracker OSP-16457 0 None None None 2022-07-09 06:52:05 UTC
Red Hat Product Errata RHSA-2014:1084 0 normal SHIPPED_LIVE Moderate: openstack-nova security, bug fix, and enhancement update 2014-08-21 04:34:32 UTC

Description Scott Lewis 2014-04-11 14:55:02 UTC
+++ This bug was initially created as a clone of Bug #1080622 +++

Description of problem:

If the number of datastores is greater than the maximum, the PropertyCollector returns a token value that should be used to iterate over the entire result set. The get_datastore_ref_and_name function in vm_util.py is aware of tokens but it stops on the first found datastore (line 942) instead searching for the best match over the entire set.

We should improve get_datastore_ref_and_name to:
1) clearly specify how the datastore is selected (the current pydoc is wrong)
2) select the best match by iterating the whole result set

Comment 5 Jaroslav Henner 2014-07-21 20:25:32 UTC
I am not sure I did correct test:
I have set the `maximum_objects=1` in nova.conf and I was then changing the datastore_regex= to select the datastore. I have two datastores and this way, I was able to select the one the VM should be booted on.

Comment 6 Scott Lewis 2014-07-21 20:29:28 UTC
(In reply to Jaroslav Henner from comment #5)
> I am not sure I did correct test:
> I have set the `maximum_objects=1` in nova.conf and I was then changing the
> datastore_regex= to select the datastore. I have two datastores and this
> way, I was able to select the one the VM should be booted on.

yaniv, can you help out here?

Comment 7 Matthew Booth 2014-08-05 10:13:54 UTC
(In reply to Jaroslav Henner from comment #5)
> I am not sure I did correct test:
> I have set the `maximum_objects=1` in nova.conf and I was then changing the
> datastore_regex= to select the datastore. I have two datastores and this
> way, I was able to select the one the VM should be booted on.

I've looked at the code, and this looks like a valid test to me.

Comment 9 errata-xmlrpc 2014-08-21 00:40:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-1084.html


Note You need to log in before you can comment on or make changes to this bug.