Conversation
After each successful CRI PullImage, use the containerd native client API to set io.cri-containerd.pinned=pinned on the image. This tells kubelet's image GC to skip the image. The CRI API doesn't support setting image labels, so we connect to containerd directly (same socket) using the containerd client library in the k8s.io namespace. The pinning happens immediately after each successful pull, before GC has a chance to evict the image. This is a proof-of-concept to test if pinning at pull time (via the containerd API) works better than post-hoc pinning via ctr CLI, which has known bugs (containerd#9328, #10270). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@porridge could you take a look at this problem? Example nightlies qa-e2e on gke-latest: https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/branch-ci-stackrox-stackrox-nightlies-gke-latest-qa-e2e-tests |
|
Since pinning still doesn't work around the problem, I'm wondering if we need to do something else to keep refreshing the images (periodic run of prefetcher?) or just change the tests to load the images if they're not present. |
|
@davdhacs I'm not sure it's about garbage collection. It seems this image is being pulled using a different pull spec than the one with which it's being used. Namely this query only shows |
|
I've added the digest-qualified pull spec in stackrox/stackrox#19287, let's see if it helps. |
Hm, it didn't. Let me try again together with the disk bump piece. |
On gke-latest nightly runs, we've started to see images deleted from the registry before all tests using them have run.
attempt: pin images to prevent gc
result: doesn't seem to be strictly honored. Images still get deleted.
See the stackrox PR using this branch image: stackrox/stackrox#19218
and gke-latest test run: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/stackrox_stackrox/19218/pull-ci-stackrox-stackrox-master-gke-latest-qa-e2e-tests/2028915923859017728