Distinguish resize from offline migrate in scheduler #454
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The scheduler reacts to the scheduler-hint
_nova_check_type
. To be able to have specific filters/weighers for resize, we set this scheduler-hint to "resize" already.Since resizes and offline migrations take the same code path and only differ in having a flavor change or not, we used to set "resize" also for offline migrations.
In the future, we want to be able to distinguish between offline migrations and resizes, because one is triggered by customers and the other can only be triggered by admins. Therefore, we introduce another
_nova_check_type
"migrate". There's also already another_nova_check_type
"live_migrate", so "migrate" does not clash there.To help in finding an offline migration scheduling request in the scheduler, we add the helper function
request_is_migrate()
in the same spirit as the already existing functions for "resize" and "live_migrate".Change-Id: Id8915a2eb52025e31604af8dde53343ab980ca3e