Skip to content

Commit 0cd39c4

Browse files
redbeamgbraad
authored andcommitted
telemetry: do not return an error when identify hash file is malformed
1 parent 37b3ee1 commit 0cd39c4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/crc/segment/segment.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ func readIdentifyHash(identifyHashPath string) (uint64, error) {
140140
}
141141

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

146147
return binary.LittleEndian.Uint64(cachedHashBytes), nil

0 commit comments

Comments
 (0)