You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2020/10/07 10:41:14 UTC
[GitHub] [incubator-yunikorn-core] adamantal commented on a change in pull request #190: [YUNIKORN-332] Add events for reserved pods
adamantal commented on a change in pull request #190:
URL: https://github.com/apache/incubator-yunikorn-core/pull/190#discussion_r500912000
##########
File path: pkg/scheduler/scheduling_application.go
##########
@@ -624,13 +663,43 @@ func (sa *SchedulingApplication) tryNodes(ask *schedulingAllocationAsk, nodeIter
}
// return allocation proposal and mark it as a reservation
alloc := newSchedulingAllocation(ask, nodeToReserve.NodeID)
+ err := events.EmitReserveEvent(ask.AskProto.AllocationKey, ask.ApplicationID, nodeToReserve.NodeID)
+ if err != nil {
+ log.Logger().Debug("could not emit reserve events to shim",
+ zap.String("allocationKey", ask.AskProto.AllocationKey),
+ zap.String("appID", ask.ApplicationID),
+ zap.String("nodeID", nodeToReserve.NodeID),
+ zap.Error(err))
+ }
alloc.result = reserved
return alloc
}
// ask does not fit, skip to next ask
return nil
}
+func EmitAllocatedReservedEvents(allocKey, appID, nodeID string) {
+ err := events.EmitAllocatedReservedEvent(allocKey, appID, nodeID)
+ if err != nil {
+ log.Logger().Warn("could not emit allocatedReserved events to shim",
Review comment:
You're right. Changed the WARNs to DEBUGs.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org