Skip to content

Commit

Permalink
telemetry: do not return an error when identify hash file is malformed
Browse files Browse the repository at this point in the history
  • Loading branch information
redbeam authored and gbraad committed Mar 28, 2024
1 parent 37b3ee1 commit 0cd39c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/crc/segment/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ func readIdentifyHash(identifyHashPath string) (uint64, error) {
}

if length := len(cachedHashBytes); length != 8 {
return 0, fmt.Errorf("Got %d bytes hash, expected 8", length)
logging.Warnf("Got %d bytes hash (expected 8), identify hash file will be regenerated", length)
return 0, nil
}

return binary.LittleEndian.Uint64(cachedHashBytes), nil
Expand Down

0 comments on commit 0cd39c4

Please sign in to comment.