You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Aditya Maheshwari (Jira)" <ji...@apache.org> on 2026/10/28 09:37:00 UTC

[jira] [Created] (YUNIKORN-3531) Populate Preemption Policy & Non-Preemptable Status for Foreign Pods

Aditya Maheshwari created YUNIKORN-3531:
-------------------------------------------

             Summary: Populate Preemption Policy & Non-Preemptable Status for Foreign Pods 
                 Key: YUNIKORN-3531
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-3531
             Project: Apache YuniKorn
          Issue Type: Sub-task
          Components: core - scheduler
            Reporter: Aditya Maheshwari
            Assignee: Aditya Maheshwari


Currently, when {{yunikorn-k8shim}} registers a foreign pod in {{{}CreateAllocationForForeignPod{}}}:
 * It already calls {{{}CreateTagsForTask(pod){}}}, which inspects {{pod.GetOwnerReferences()}} for {{Kind == "DaemonSet"}} and sets {{tags["yunikorn.apache.org/requiredNode"]}} (from {{{}nodeAffinity{}}}), and sets {{tags[common.Foreign] = common.AllocTypeStatic}} if {{OwnerReferences}} has {{Kind == "Node"}} (static mirror pods, which sets {{alloc.preemptable = false}} in core).
 * {*}Gap 1 (PreemptionPolicy is nil){*}: {{CreateAllocationForForeignPod}} does *not* set {{PreemptionPolicy}} on the {{{}si.Allocation{}}}, so {{alloc.IsAllowPreemptSelf()}} is always {{false}} in {{{}yunikorn-core{}}}.
 * {*}Gap 2 (DaemonSet detection on Foreign Pods){*}: If a foreign DaemonSet pod was scheduled directly via {{pod.Spec.NodeName}} (rather than {{NodeAffinity}} field selectors), {{CreateTagsForTask}} might not populate the {{requiredNode}} tag.

*Required Changes in {{{}si_helper.go{}}}:*
 # Ensure DaemonSet foreign pods are always marked non-preemptable (either by setting {{podType = common.AllocTypeStatic}} when {{ref.Kind == constants.DaemonSetType}} so {{alloc.IsPreemptable()}} becomes {{{}false{}}}, or by ensuring {{tags[common.DomainYuniKorn+common.KeyRequiredNode] = pod.Spec.NodeName}} whenever {{{}ref.Kind == constants.DaemonSetType{}}}).
 # Populate {{PreemptionPolicy}} on the foreign {{si.Allocation}} (respecting the {{yunikorn.apache.org/allow-preemption}} annotation on the Pod or its {{{}PriorityClass{}}}, defaulting {{AllowPreemptSelf}} to {{true}} for non-static/non-DaemonSet pods).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org