Skip to content

Commit

Permalink
do not warn about subresource count mismatch when no subresources are…
Browse files Browse the repository at this point in the history
… reported
  • Loading branch information
majewsky committed Oct 25, 2023
1 parent 05bb169 commit b0d7bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/collector/scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (c *Collector) writeResourceScrapeResult(dbDomain db.Domain, dbProject db.P
azRes.PhysicalUsage = data.PhysicalUsage

//warn when the backend is inconsistent with itself
if uint64(len(data.Subresources)) != data.Usage {
if data.Subresources != nil && uint64(len(data.Subresources)) != data.Usage {
logg.Info("resource quantity mismatch in project %s, resource %s/%s, AZ %s: usage = %d, but found %d subresources",
dbProject.UUID, srv.Type, res.Name, azRes.AvailabilityZone,
data.Usage, len(data.Subresources),
Expand Down

0 comments on commit b0d7bbb

Please sign in to comment.