Open paulaldridge opened 2 years ago
Just recording that I've noticed this again with another layer. In all but one of our environments an image was showing as having no distro from the index report. The one environment that was working correctly identified the distro from the FROM alpine:latest
layer. Querying against a specific layer hash (as alpine:latest isn't a fixed layer) I can see that the working environment has a distro marked for that layer, however other environments have no distro listed for the layer hash.
This seems to support the theory that an error during distro recognition on initial scan could incorrectly mark a layer as having no distro.
Not sure if this is an issue or not but found an interesting situation which I thought was worth sharing:
layer_scanned
records from the database, and re-pushed an image, and clair correctly found the distroSo what was happening was that the layer (
FROM debian:stretch-slim
) was being skipped each time, as clair had already scanned it, which meant it was fixed in it’s decision that there was no recognisable repo. I’m not sure what caused clair to mess up the initial scan, but it’s concerning that it might be able to happen. I’m not sure how we’d know when it does, or even how we’d sensibly trigger a rescan if we do know - think you’d need to clear the relatedlayer_scanned
andmanifest_scanned
records and then re-push the manifest to clair again for each effected image.Onto how/whether it could happen, I have 2 hunches: