chenya-zhang commented on a change in pull request #305:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/305#discussion_r715095786
##########
File path: pkg/cache/nodes.go
##########
@@ -100,10 +101,18 @@ func (nc *schedulerNodes) addAndReportNode(node *v1.Node,
reportNode bool) {
// add node to nodes map
if _, ok := nc.nodesMap[node.Name]; !ok {
+ nodeLabels, err := json.Marshal(node.Labels)
+ if err != nil {
+ log.Logger().Error("failed to marshall node labels to
json", zap.Error(err))
+ return
Review comment:
Yeah, good catch.
Since we are only using node labels to support node affinity with a
_preferred_ scheduling policy, it makes sense to not skip this node even if
labels can't be marshaled.
--
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]