craigcondit commented on code in PR #734:
URL: https://github.com/apache/yunikorn-k8shim/pull/734#discussion_r1441990656


##########
pkg/cache/external/scheduler_cache.go:
##########
@@ -403,21 +484,20 @@ func (cache *SchedulerCache) updatePod(pod *v1.Pod) {
                // assign to node
                nodeInfo, ok := cache.nodesMap[pod.Spec.NodeName]
                if !ok {
-                       // node doesn't exist, create a synthetic one for now
-                       nodeInfo = framework.NewNodeInfo()
-                       cache.nodesMap[pod.Spec.NodeName] = nodeInfo
-                       // work around a crash bug in NodeInfo.RemoveNode() 
when Node is unset
-                       nodeInfo.SetNode(&v1.Node{ObjectMeta: 
metav1.ObjectMeta{Name: pod.Spec.NodeName}})
-               }
-               nodeInfo.AddPod(pod)
-               cache.assignedPods[key] = pod.Spec.NodeName
-               if podWithAffinity(pod) {
-                       cache.nodesInfoPodsWithAffinity = nil
-               }
-               if podWithRequiredAntiAffinity(pod) {
-                       cache.nodesInfoPodsWithReqAntiAffinity = nil
+                       // node doesn't exist, so this is an orphaned pod
+                       cache.orphanedPods[key] = pod

Review Comment:
   Same as above. I'll add logging, hopefully it doesn't generate too much 
noise.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to