Scheduling¶
The scheduling of services spawned by Yaook is handled by the Kubernetes Scheduler using Affinities and Tolerations. All services come with a set of Affinities and Tolerations which allows fine-grained control over the placement of the components.
To each scheduleable component a Scheduling Key is assigned. The Key is used as
key for both tolerations and labels. If a component has the key foo/bar, it
will tolerate both NoExecute and NoSchedule taints with that key and
it will only run on nodes with that as label.
A notable exception is the Neutron Layer 2 Agent, which will schedule itself based on other criteria (see Neutron OVN Agent below).
In addition, a component may also listen to a Scheduling Group Key. In that case, it will tolerate that key and it will also run on nodes which just have a label matching that key.
Note
This means that, on a fresh Kubernetes cluster, no services will be scheduled at all.
For details on the specific scheduling keys, please see
yaook.op.scheduling_keys.SchedulingKey.
There is also a special downscale label used by YAOOK interally that should never be directly assigned to any node (see Downscale label below).
Neutron OVN Agent¶
Neutron’s OVN Agent is a strict dependency of NovaComputeNode and OVNBGPAgent.
It will tolerate all the keys of the following services (in addition to
the SchedulingKey.NETWORK_NEUTRON_OVN_AGENT) and
it will be spawned on all nodes matching any of their keys:
Nova Compute:
SchedulingKey.COMPUTE_HYPERVISORNeutron OVN BGP Agent:
SchedulingKey.NETWORK_NEUTRON_BGP_AGENT
Agents needing Neutron OVN (bgp, compute)¶
Besides the Scheduling Key each component has (see
yaook.op.scheduling_keys.SchedulingKey)
components that depend on OVN agent have another scheduling dependency.
The neutron_ovn operator sets an label to the node, that no OVN maintenance is required. If this label is missing or set to maintenance required, the agents/services won’t be scheduled on or will be deleted from the node.
More details about this: .. _concepts.safe-eviction.implementation.neutron-ovn-agent:
Neutron OVN BGP Agent¶
This agent is optional, just like Neutron BGP DR Agent. To schedule it, the neutron deployment needs to have the spec.ovn.bgp section defined with a configname (will be used for naming the agent) and configTemplate (can be empty nodeSelector).
Downscale label¶
YAOOK uses a specially reserved label called
state.yaook.cloud/forced-downscale to downscale DaemonSets and
ConfiguredDaemonSets. It is used as a nodeSelector which matches no nodes
and will lead to the removal of all Pods until removed.
This is used by YAOOK internally for cold upgrade procedures where entire
services need to be stopped temporarily during OpenStack release upgrades.
Note
The state.yaook.cloud/forced-downscale label must never be attached
as a node label directly to nodes! It should never match any node.