Sfoglia il codice sorgente

Fix warn log message for pv

When this condition is reached I am getting the following error message: 
``` CostModel.ComputeAllocation: pv bytes result for missing pv: %!s(<nil>) ```
Which is not really helpful! :-) 

I believe this was meant to be the pv key, but because of a typo and pattern with go it ended up being used err.

Can someone check if I am correct on my assumption and merge if this is the case ? 

Signed-off-by: Leonardo Rodrigues de Mello <lrodriguesdemello@zendesk.com>
Leonardo Rodrigues de Mello 1 anno fa
parent
commit
3180cc7b95
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      pkg/costmodel/allocation_helpers.go

+ 1 - 1
pkg/costmodel/allocation_helpers.go

@@ -1913,7 +1913,7 @@ func applyPVBytes(pvMap map[pvKey]*pv, resPVBytes []*prom.QueryResult) {
 		}
 
 		if _, ok := pvMap[key]; !ok {
-			log.Warnf("CostModel.ComputeAllocation: pv bytes result for missing pv: %s", err)
+			log.Warnf("CostModel.ComputeAllocation: pv bytes result for missing pv: %s", key)
 			continue
 		}