Skip to content

Commit

Permalink
Merge pull request #891 from payall4u/bugfix/avoid-panic-with-ext-memory
Browse files Browse the repository at this point in the history
Fix crane agent panic when handling ext memory pods.
  • Loading branch information
mfanjie committed Jan 22, 2024
2 parents 5c18026 + ea20086 commit ed43bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ensurance/collector/cadvisor/cadvisor_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (c *CadvisorCollector) Collect() (map[string][]common.TimeSeries, error) {
continue
}

if hasExtMemRes {
if hasExtMemRes && v.Stats[0].Memory != nil {
extResMemUse += float64(v.Stats[0].Memory.WorkingSet)
}

Expand Down

0 comments on commit ed43bd2

Please sign in to comment.