CA DRA: process unschedulable Pods through ClusterSnapshot #7686
Labels
area/cluster-autoscaler
area/core-autoscaler
Denotes an issue that is related to the core autoscaler and is not specific to any provider.
kind/feature
Categorizes issue or PR as related to a new feature.
wg/device-management
Categorizes an issue or PR as relevant to WG Device Management.
Which component are you using?:
/area cluster-autoscaler
/area core-autoscaler
/wg device-management
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
ClusterSnapshot
was extended significantly for the DRA autoscaling MVP. In addition to tracking just Nodes and scheduled Pods, it now tracks the state of all DRA objects in the cluster. Some of these DRA objects are owned by unschedulable Pods. At the same time, the unschedulable Pods themselves are still tracked and processed outside ClusterSnapshot.So we basically have the state for unschedulable Pods in two places:
StaticAutoscaler.RunOnce()
that gets processed byPodListProcessor
and then passed toScaleUp
.dynamicresources.Snapshot
insideClusterSnapshot
.As pointed out by @MaciekPytel during the MVP review, this leaves us with a risk of the two data sources diverging quite easily. For example, a
PodListProcessor
could inject a "fake" unschedulable Pod to the list, but not inject the Pod's ResourceClaims to theClusterSnapshot
.Describe the solution you'd like.:
ClusterSnapshot
.ClusterSnapshot.SetClusterState()
take all Pods in the cluster and divide them into scheduled and unschedulable internally.Fork()/Commit()/Revert()
) pretty easily by putting the unschedulable Pods on a special meta-NodeInfo in the existingClusterSnapshotStore
implementations.SchedulePod()/UnschedulePod()
calls.ClusterSnapshot
. We need at leastListUnschedulablePods()
,AddUnschedulablePod(pod *framework.PodInfo)
,RemoveUnschedulablePod(name, namespace string)
.ClusterSnapshot.IgnoreUnschedulablePod(name, namespace string)
, but it might also fit better in the ScaleUp code itself.ScaleUp
to take the unschedulable Pods fromClusterSnapshot.ListUnschedulablePods()
instead of a method parameter.PodListProcessor
and its implementations to modify the unschedulable Pods via the newClusterSnapshot
methods instead of modifying and returning a method parameter.Additional context.:
This is a part of Dynamic Resource Allocation (DRA) support in Cluster Autoscaler. An MVP of the support was implemented in #7530 (with the whole implementation tracked in kubernetes/kubernetes#118612). There are a number of post-MVP follow-ups to be addressed before DRA autoscaling is ready for production use - this is one of them.
The text was updated successfully, but these errors were encountered: