-
Notifications
You must be signed in to change notification settings - Fork 2
Implement external scheduler call #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stable/2023.1-m3
Are you sure you want to change the base?
Conversation
5e34d65 to
a11d44d
Compare
a11d44d to
cd13b27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather not have any changes to the cinder scheduler code proper. This should all be self contained in a weigher class.
| # Note: the result can also be empty. | ||
| weighed_backends = call_external_scheduler_api( | ||
| context, weighed_backends, request_spec) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not modify the cinder scheduler. This should be in an external weigher that can be enabled/disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The external scheduler call can do both: weighing and filtering. It can be enabled/disabled by setting/unsetting the external scheduler url.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proper way is to create a new weigher and add it to the list of scheduler_default_weighers. Do not modify the cinder scheduler code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a weigher class to implement this. do not modify the scheduler to add hooks, when there is a proper mechanism to add a new weigher.
Provides support for an external service that can perform advanced scheduling
decisions. FilterScheduler now calls a function call_external_scheduler_api
after executing filters and weighers. This function sends the hosts and their
current weights to an external scheduling service. This service then performs
advanced scheduling decisions and returns the sorted list of host names, from
highest priority to lowest priority. To toggle this feature, provide
external_scheduler_api_url to Cinder's configuration.
Also implemented for Nova: sapcc/nova#502
And for Manila: sapcc/manila#263