Skip to content

Conversation

@PhilippMatthes
Copy link
Member

@PhilippMatthes PhilippMatthes commented Aug 15, 2025

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

@PhilippMatthes PhilippMatthes marked this pull request as ready for review August 15, 2025 07:01
@PhilippMatthes PhilippMatthes force-pushed the external-scheduler-call branch from 5e34d65 to a11d44d Compare August 15, 2025 07:17
@PhilippMatthes PhilippMatthes force-pushed the external-scheduler-call branch from a11d44d to cd13b27 Compare August 15, 2025 07:33
Copy link

@hemna hemna left a 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)

Copy link

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.

Copy link
Member Author

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.

Copy link

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.

Copy link

@hemna hemna left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants