datastore selection is incorrect if token is being used

Bug #1245564 reported by Radoslav Gerganov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Radoslav Gerganov
VMwareAPI-Team
In Progress
Medium
Unassigned

Bug Description

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

Changed in nova:
assignee: nobody → Radoslav Gerganov (rgerganov)
Revision history for this message
Shawn Hartsock (hartsock) wrote :

We should break each of these points into separate bugs (since you can list them independently). Hopefully that will make the changes smaller, easier to digest, and faster to get approved.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Radoslav Gerganov (rgerganov) wrote :

The pydoc change is really trivial and I thought it will be fine to fix both problems with one patch. If you believe this is not the case (I am still getting started with the dev process here), then I will split it. Thanks!

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

In the case of patches, the smaller the patch the more probable it is to be accepted. That's just a function of having fewer points to object to. You could have a perfectly valid patch fixing two problems held up because of a discussion related to only one of the solutions... and the result could be that neither problem gets fixed. So it's in everyone's best interest to deal with smaller patches that do one thing at a time.

Changed in nova:
milestone: none → icehouse-2
Tracy Jones (tjones-i)
Changed in openstack-vmwareapi-team:
importance: Undecided → Medium
Tracy Jones (tjones-i)
Changed in openstack-vmwareapi-team:
status: New → In Progress
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → icehouse-3
Revision history for this message
dan wendlandt (danwent) wrote :

https://review.openstack.org/#/c/54361/

Looks like jenkins missed the tag on this one.

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

Reviewed: https://review.openstack.org/54361
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b7bf623d79608df8ff5bf8040dc3590da7eeb236
Submitter: Jenkins
Branch: master

commit b7bf623d79608df8ff5bf8040dc3590da7eeb236
Author: Radoslav Gerganov <email address hidden>
Date: Tue Oct 29 17:41:52 2013 +0200

    VMware: fix datastore selection when token is returned

    Use the token returned by the PropertyCollector to iterate
    over the complete set of datastores and select the best
    match based on the regular expression and the free space on
    the datastore.

    Closes-Bug: #1245564
    Change-Id: If24c37a41bfa994a990aaa4a3e21d16b33aad42f

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: icehouse-3 → 2014.1
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.