Documentation
¶
Index ¶
- type FilterComputeCapabilitiesStep
- type FilterCorrectAZStep
- type FilterDisabledStep
- type FilterExternalCustomerStep
- type FilterExternalCustomerStepOpts
- type FilterHasAcceleratorsStep
- type FilterHasEnoughCapacity
- type FilterHasEnoughCapacityOpts
- type FilterHasRequestedTraits
- type FilterHostInstructionsStep
- type FilterPackedVirtqueueStep
- type FilterProjectAggregatesStep
- type ResourceBalancingStep
- type ResourceBalancingStepOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterComputeCapabilitiesStep ¶
type FilterComputeCapabilitiesStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterComputeCapabilitiesStep) Run ¶
func (s *FilterComputeCapabilitiesStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Check the capabilities of each host and if they match the extra spec provided in the request spec flavor.
type FilterCorrectAZStep ¶
type FilterCorrectAZStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterCorrectAZStep) Run ¶
func (s *FilterCorrectAZStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Only get hosts in the requested az.
type FilterDisabledStep ¶
type FilterDisabledStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterDisabledStep) Run ¶
func (s *FilterDisabledStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Only get hosts that are not disabled or down.
type FilterExternalCustomerStep ¶
type FilterExternalCustomerStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, FilterExternalCustomerStepOpts]
}
func (*FilterExternalCustomerStep) Run ¶
func (s *FilterExternalCustomerStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Prefix-match the domain name for external customer domains and filter out hosts that are not intended for external customers.
type FilterExternalCustomerStepOpts ¶
type FilterExternalCustomerStepOpts struct {
CustomerDomainNamePrefixes []string `json:"domainNamePrefixes"`
CustomerIgnoredDomainNames []string `json:"ignoredDomainNames"`
}
func (FilterExternalCustomerStepOpts) Validate ¶
func (opts FilterExternalCustomerStepOpts) Validate() error
type FilterHasAcceleratorsStep ¶
type FilterHasAcceleratorsStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterHasAcceleratorsStep) Run ¶
func (s *FilterHasAcceleratorsStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
If requested, only get hosts with accelerators.
type FilterHasEnoughCapacity ¶
type FilterHasEnoughCapacity struct {
lib.BaseStep[api.ExternalSchedulerRequest, FilterHasEnoughCapacityOpts]
}
func (*FilterHasEnoughCapacity) Run ¶
func (s *FilterHasEnoughCapacity) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Filter hosts that don't have enough capacity to run the requested flavor.
This filter takes the capacity of the hosts and subtracts from it:
- The resources currently used by VMs.
- The resources reserved by active Reservations.
In case the project and flavor match, space reserved is unlocked (slotting).
Please note that, if num_instances is larger than 1, there needs to be enough capacity to place all instances on the same host. This limitation is necessary because we can't spread out instances, as the final set of valid hosts is not known at this point.
Please also note that disk space is currently not considered by this filter.
type FilterHasEnoughCapacityOpts ¶
type FilterHasEnoughCapacityOpts struct {
// If reserved space should be locked even for matching requests.
LockReserved bool `json:"lockReserved"`
}
func (FilterHasEnoughCapacityOpts) Validate ¶
func (FilterHasEnoughCapacityOpts) Validate() error
type FilterHasRequestedTraits ¶
type FilterHasRequestedTraits struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterHasRequestedTraits) Run ¶
func (s *FilterHasRequestedTraits) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Filter hosts that do not have the requested traits given by the extra spec: - "trait:<trait>": "forbidden" means the host must not have the specified trait. - "trait:<trait>": "required" means the host must have the specified trait.
type FilterHostInstructionsStep ¶
type FilterHostInstructionsStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterHostInstructionsStep) Run ¶
func (s *FilterHostInstructionsStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Filter hosts based on instructions given in the request spec. Supported are: - spec.ignore_hosts: Filter out all hosts in this list. - spec.force_hosts: Include only hosts in this list.
type FilterPackedVirtqueueStep ¶
type FilterPackedVirtqueueStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterPackedVirtqueueStep) Run ¶
func (s *FilterPackedVirtqueueStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
If requested, only get hosts with packed virtqueues.
type FilterProjectAggregatesStep ¶
type FilterProjectAggregatesStep struct {
lib.BaseStep[api.ExternalSchedulerRequest, lib.EmptyStepOpts]
}
func (*FilterProjectAggregatesStep) Run ¶
func (s *FilterProjectAggregatesStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*lib.StepResult, error)
Lock certain hosts for certain projects, based on the aggregate metadata. Note that hosts without aggregate tenant filter are still accessible.
type ResourceBalancingStep ¶
type ResourceBalancingStep struct {
// BaseStep is a helper struct that provides common functionality for all steps.
scheduling.BaseStep[api.ExternalSchedulerRequest, ResourceBalancingStepOpts]
}
Step to balance VMs on hosts based on the host's available resources.
func (*ResourceBalancingStep) Run ¶
func (s *ResourceBalancingStep) Run(traceLog *slog.Logger, request api.ExternalSchedulerRequest) (*scheduling.StepResult, error)
Pack VMs on hosts based on their flavor.
type ResourceBalancingStepOpts ¶
type ResourceBalancingStepOpts struct {
CPUEnabled bool `json:"cpuEnabled"`
CPUUtilizedLowerBoundPct float64 `json:"cpuUtilizedLowerBoundPct"` // -> mapped to ActivationLowerBound
CPUUtilizedUpperBoundPct float64 `json:"cpuUtilizedUpperBoundPct"` // -> mapped to ActivationUpperBound
CPUUtilizedActivationLowerBound float64 `json:"cpuUtilizedActivationLowerBound"`
CPUUtilizedActivationUpperBound float64 `json:"cpuUtilizedActivationUpperBound"`
RAMEnabled bool `json:"ramEnabled"`
RAMUtilizedLowerBoundPct float64 `json:"ramUtilizedLowerBoundPct"` // -> mapped to ActivationLowerBound
RAMUtilizedUpperBoundPct float64 `json:"ramUtilizedUpperBoundPct"` // -> mapped to ActivationUpperBound
RAMUtilizedActivationLowerBound float64 `json:"ramUtilizedActivationLowerBound"`
RAMUtilizedActivationUpperBound float64 `json:"ramUtilizedActivationUpperBound"`
DiskEnabled bool `json:"diskEnabled"`
DiskUtilizedLowerBoundPct float64 `json:"diskUtilizedLowerBoundPct"` // -> mapped to ActivationLowerBound
DiskUtilizedUpperBoundPct float64 `json:"diskUtilizedUpperBoundPct"` // -> mapped to ActivationUpperBound
DiskUtilizedActivationLowerBound float64 `json:"diskUtilizedActivationLowerBound"`
DiskUtilizedActivationUpperBound float64 `json:"diskUtilizedActivationUpperBound"`
CPUAfterEnabled bool `json:"cpuAfterEnabled"`
CPUUtilizedAfterLowerBoundPct float64 `json:"cpuUtilizedAfterLowerBoundPct"` // -> mapped to ActivationLowerBound
CPUUtilizedAfterUpperBoundPct float64 `json:"cpuUtilizedAfterUpperBoundPct"` // -> mapped to ActivationUpperBound
CPUUtilizedAfterActivationLowerBound float64 `json:"cpuUtilizedAfterActivationLowerBound"`
CPUUtilizedAfterActivationUpperBound float64 `json:"cpuUtilizedAfterActivationUpperBound"`
RAMAfterEnabled bool `json:"ramAfterEnabled"`
RAMUtilizedAfterLowerBoundPct float64 `json:"ramUtilizedAfterLowerBoundPct"` // -> mapped to ActivationLowerBound
RAMUtilizedAfterUpperBoundPct float64 `json:"ramUtilizedAfterUpperBoundPct"` // -> mapped to ActivationUpperBound
RAMUtilizedAfterActivationLowerBound float64 `json:"ramUtilizedAfterActivationLowerBound"`
RAMUtilizedAfterActivationUpperBound float64 `json:"ramUtilizedAfterActivationUpperBound"`
DiskAfterEnabled bool `json:"diskAfterEnabled"`
DiskUtilizedAfterLowerBoundPct float64 `json:"diskUtilizedAfterLowerBoundPct"` // -> mapped to ActivationLowerBound
DiskUtilizedAfterUpperBoundPct float64 `json:"diskUtilizedAfterUpperBoundPct"` // -> mapped to ActivationUpperBound
DiskUtilizedAfterActivationLowerBound float64 `json:"diskUtilizedAfterActivationLowerBound"`
DiskUtilizedAfterActivationUpperBound float64 `json:"diskUtilizedAfterActivationUpperBound"`
}
Options for the scheduling step, given through the step config in the service yaml file.
func (ResourceBalancingStepOpts) Validate ¶
func (o ResourceBalancingStepOpts) Validate() error