LeastCostScheduler.weigh_hosts() doesn't return enough hosts

Bug #844138 reported by Kevin L. Mitchell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Medium
Unassigned

Bug Description

LeastCostScheduler.weigh_hosts() is supposed to return one host per instance to be booted, but instead only returns a weighted list of the hosts. This means that a request for 10 instances in a zone with 2 compute nodes will only result in 2 instances booted, when all 10 could be booted.

Revision history for this message
Chris Behrens (cbehrens) wrote :

Hm. Wonder if this should be fixed in AbstractScheduler's schedule_run_instance()... vs what was changed in Rev 1534 for BaseScheduler. The fix for 1534 doesn't give us much, because most subclasses from Base will override weigh_hosts (like LeastCost does).

Revision history for this message
Kevin L. Mitchell (klmitch) wrote :

Sandy was of the opinion that this should be addressed in the various weigh_hosts() functions. His basic thesis was that weigh_hosts() in classes other than BaseScheduler are responsible for keeping an updated picture of the available resources for a given host. It wouldn't make sense to get 5 cases of a specific host if that host could only handle having 3 instances.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

I have a fix underway for this: https://github.com/SandyWalsh/nova/tree/flatten_scheduler

Hope to be attempting a merge shortly.

Changed in nova:
assignee: nobody → Sandy Walsh (sandy-walsh)
status: Confirmed → In Progress
Revision history for this message
Thierry Carrez (ttx) wrote :

@Sandy: or not shortly ?

Revision history for this message
Chris Behrens (cbehrens) wrote :

I think this resolved itself. I'll test it shortly.

Revision history for this message
Tom Fifield (fifieldt) wrote :

@cbehrens: or not shortly ? ;)

Revision history for this message
Thierry Carrez (ttx) wrote :

Looks like you're not working on that anymore. Please set back to InProgress and reassign to you if you're working on proposing a change for merging.

Changed in nova:
assignee: Sandy Walsh (sandy-walsh) → nobody
status: In Progress → Confirmed
Revision history for this message
Russell Bryant (russellb) wrote :

Marked this as Invalid because the code has changed _A LOT_ since this report. If you look at the current code and this bug report, it doesn't seem like they're talking about the same code base. :-)

Changed in nova:
status: Confirmed → Invalid
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.