Merge pull request #5612 from wangxf1987/fix/improve-log

Show more debug logs when failed to build resource model due to `getIndex` fails
This commit is contained in:
karmada-bot 2024-09-27 14:56:11 +08:00 committed by GitHub
commit e4c6f54c7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ func (rs *ResourceSummary) clusterResourceNodeComparator(a, b interface{}) int {
func (rs *ResourceSummary) AddToResourceSummary(crn ClusterResourceNode) {
index := rs.getIndex(crn)
if index == -1 {
klog.Error("ClusterResource can not add to resource summary: index is invalid.")
klog.Errorf("Failed to add node to resource summary due to no appropriate grade. ClusterResourceNode:%v", crn)
return
}
modeling := &(*rs).RMs[index]