Merge lp://qastaging/~cerberus/nova/lp820658 into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Matt Dietz
Status: Work in progress
Proposed branch: lp://qastaging/~cerberus/nova/lp820658
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 602 lines (+124/-56)
4 files modified
nova/compute/api.py (+20/-5)
nova/scheduler/host_filter.py (+29/-19)
nova/scheduler/zone_aware_scheduler.py (+34/-14)
nova/tests/scheduler/test_host_filter.py (+41/-18)
To merge this branch: bzr merge lp://qastaging/~cerberus/nova/lp820658
Reviewer Review Type Date Requested Status
Trey Morris (community) Approve
Brian Waldon (community) Needs Information
Sandy Walsh (community) Approve
Review via email: mp+70940@code.qastaging.launchpad.net

Description of the change

Fixes lp820658

Adds a new filter to the host_filter scheduler that allows the scheduler to properly schedule the resizing/migrating instance to a host that is *not* the originating host.

To post a comment you must log in.
Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

Generally seems fine, but now the host filters should have their instance_type_to_filter() methods renamed to request_spec_to_filter().

Should the span_zones flag be part of the request spec or should it just be a boolean param on select()? I think I prefer the latter?

Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

whoops, should be ...

review: Needs Fixing
1396. By Matt Dietz

merge from trunk

1397. By Matt Dietz

Feedback changes

1398. By Matt Dietz

Merge from upstream

Revision history for this message
Matt Dietz (cerberus) wrote :

Updated with sandy's changes. Talked him out of making the latter change on the grounds that the request_spec represents the entire context for the desired results, and that attaching an additional parameter external to that context is confusing.

Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

s/talked him out of/bribed with beer/

review: Approve
Revision history for this message
Brian Waldon (bcwaldon) wrote :

Does/can this branch address this as well: https://bugs.launchpad.net/nova/+bug/821252

Revision history for this message
Matt Dietz (cerberus) wrote :

@Brian: I don't believe so, as this is only a fix for the HostFilter scheduler, and even then, only forces the scheduler to ignore the host that the instance is already on. The rationale being that we need to do a lot more work to actually get the schedulers to a point where they're intelligent about choosing a destination by instance_type, so this is just the first stage in getting resize to work a bit more consistently.

If you were to go with the LeastCostScheduler, which doesn't let you specify the filter currently, then it wouldn't buy you anything. With that said, we could of course adapt any of the schedulers to work.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Okay, I just wanted to check that we couldn't hit two birds with one stone, here.

I'm not very up to speed on schedulers, so please correct me if I'm wrong: would it make sense to implement this as just a HostExclusionFilter and use that in conjunction with an InstanceTypeFilter when needed?

review: Needs Information
Revision history for this message
Matt Dietz (cerberus) wrote :

Brian, it's not currently possible to stack filters WSGI-style. Take a gander at the "choose_host_filter" method in host_filter.py. It instantiates the first filter it finds based on the name requested. I think that sounds like a pretty good use-case, but I'd rather we file a blueprint or bug for implementing that rather than trying to shoehorn that functionality in this patch.

Does that work for you?

1399. By Matt Dietz

Merge from trunk

Revision history for this message
Trey Morris (tr3buchet) wrote :

I agree with dietz. That's not in the realm of a bugfix, that's blueprint world!

Revision history for this message
Trey Morris (tr3buchet) wrote :

161 + _, query = host_filter.request_spec_to_filter(request_spec)

not a fan of _

would it make sense to have span_zones=True in the request spec in the test?

review: Approve
1400. By Matt Dietz

More clear name

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Attempt to merge into lp:nova failed due to conflicts:

text conflict in nova/scheduler/host_filter.py

Unmerged revisions

1400. By Matt Dietz

More clear name

1399. By Matt Dietz

Merge from trunk

1398. By Matt Dietz

Merge from upstream

1397. By Matt Dietz

Feedback changes

1396. By Matt Dietz

merge from trunk

1395. By Matt Dietz

Duplicate test modules make me sad

1394. By Matt Dietz

Yanked the metaclass back out

1393. By Matt Dietz

A more interesting refactoring

1392. By Matt Dietz

Added request spec to the filter calls, but I am not at all happy with this refactoring

1391. By Matt Dietz

Merge from trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.