Skip to content

Commit

Permalink
Add log to analyze the root cause of panic
Browse files Browse the repository at this point in the history
  • Loading branch information
halfrost committed Apr 26, 2023
1 parent 90829e8 commit ed7174e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/modeling/modeling.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func InitSummary(resourceModels []clusterapis.ResourceModel) (ResourceSummary, e
modelSortings = make([][]resource.Quantity, len(rsList))
for index := 0; index < len(rsList); index++ {
for i, name := range rsName {
if _, ok := rsList[index][name]; !ok {
klog.Error("The name in ResourceList does not exist: name is %v, resourceList is %v", name, rsList)
continue
}
modelSortings[i] = append(modelSortings[i], rsList[index][name])
}
}
Expand Down

0 comments on commit ed7174e

Please sign in to comment.