-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.21
Description of problem:
When the ImagePruner encounters an error while trying to inspect or delete an image, we inspect the errors in order to determine whether it is an access-denied error or the image does not exist.
How reproducible:
Pretty often in CI. See:
- https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_machine-config-operator/5318/pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl/1991118957066588160
- https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_machine-config-operator/5400/pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl/1988895242765471744
- https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_machine-config-operator/5279/pull-ci-openshift-machine-config-operator-main-e2e-gcp-op-ocl/1987894292969951232
Actual results:
The e2e-gcp-op-ocl jobs fail. In particular, the TestImagePrunerOnCluster and TestMissingImageIsRebuilt make use of this error path.
Expected results:
The aforementioned tests should pass.
Additional info:
Previously, we were wrapping the errors in an ErrImage type that we were then inspecting. Some refactoring introduced additional points where we should have been wrapping errors with this specific type. Instead of doing that, we should wrap all errors in ErrImage and only use that to get the image pullspec, if needed elsewhere.