Closed sboschman closed 2 years ago
@sboschman, hi. And thanks for the PR.
Would you mind changing the error checking for other cases in the same file? Or is it not as trivial as 404 code in case of manifest absence?
Good point, might as well fix those other error checks right away. Based on this info I suppose it is indeed as trivial as checking for 401, 403 and 404 statuscodes in case of a HEAD request.
My thanks!
After upgrading from 0.1.17 to 0.2.0 missing images are reported under the 'unknown_error' metric instead of absent==1.
Log:
The
isAbsent
check (image_pull.go) checks theErrors
field (https://github.com/distribution/distribution/blob/main/docs/spec/api.md#errors), after the GET -> HEAD switch this diagnostic errors field is always empty (HEAD responses have no body, use GET for details). The HEAD request will just return a 404, see https://github.com/distribution/distribution/blob/main/docs/spec/api.md#existing-manifests, so I guess checking the http statuscode is enough.Log after change:
Now the image shows up again in the
*_absent
metric with value 1