Repository navigation
Conversation
|
Hi @skaegi. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Update: This is the approach I'm using in my branch -- change is much smaller and more just moving logic to do content check upfront vs. halfway through. I also removed doFetchFn and am just moving the existing logic to again make the change smaller. Another possibility here is to always do the content check and fetch before the sn.Stat check and then remove the later fetch. e.g. |
ecdf512 to
a84b6dd
Compare
|
Here's a quick problem repeater... This shows a bit more of the problem... -- We have also validated this fix in our clusters where we overlayfs as the default and devmapper being used by a runtimeclass. |
421d4ec to
cc5e3ca
Compare
This patch moves the content check and fetch to the start of doUnpackFn. This means that we "always" will check for content even if the snapshot diffid is unpacked already and download the content if missing. This handles a real world case where image content has a different digest but the same diff id, which result in an incomplete image and then problems exporting images or using the image with a different snapshotter. Signed-off-by: Simon Kaegi <[email protected]>
cc5e3ca to
bb66b6b
Compare
|
Makes sense. Just want to understand any potential impact to GC, since we may end up with multiple contents referencing the same snapshot. If we remove one of the images, will the snapshot remain intact? Is it still possible to start a container for the other image? |
What is this referring to and where is the difference? In your case , is The transfer service configuration is intended to solve the multiple snapshotter unpack issue. In the case here, is the devmapper snapshotter specified during the pull and it still fails? It seems that case would have a better solution than pulling the content even when it is not needed for the configured unpack and the content is to be discarded. |
@henry118 Great question. With this PR patch applied this is what I saw. I first applied the two pods... (the kata pod is using devmapper) nsenter-ing on to the node I see... I then deleted the kata pod -- From what I saw removing the image did not clean up anything until I also did a prune --all. After the |
@dmcgowan When using
This is set to
The unpack via CRI currently does not let us control this (I believe @mikebrow) and so uses the matching platform unpacker which pulls the content and unzips it to overlayfs by default. This just adds overhead!
Definitely! We currently see the content first downloaded and unzipped to overlayfs and then again unzipped to devmapper. |
|
nod.. we are fixing the disconnect in k8s where we lost the annotation that specified the pod runtime handler(from class) on image status and pull from kubelet .. |
|
This change breaks remote snapshotters which rely on the snapshotter being able to return |
Yep. This is why the CRI needs to pass down the snapshotter vs. just using the default snapshotter. If the correct snapshotter had been passed down then the existing logic would have worked. The patch above is a workaround (apparently for people not using a remote snapshotter) for using two snapshotters in 1.7.x. |
Indeed, it seems the PR is not a complete fixup, one possible situation in the real world:
A possible workaround: ensure that The |
AkihiroSuda
left a comment
There was a problem hiding this comment.
Looks good, but needs rebase to pass the CI.
I'd also like to see a test
|
Has @Kern--'s comment been resolved regarding this being a breaking change for remote snapshotters? I see a few follow-on comments but no further changes/discussion. I don't want us to merge this before that concern is resolved. |
|
I agree with @imeoer that the correct solution for the specific error is |
This is a pretty uncommon case that we definitely should have a solution for. Always pulling doesn't make sense for the unpacker though as it would degrade performance for the vast majority of pulls which would not have this issue. I think this was mentioned before but the most ideal solution would be to have the pull target both snapshotters for unpack. This optimized unpacker logic was not designed for breaking apart pull and unpack like |
|
Sorry guys, I left this here as for whatever reason a number of teams started using it. I do not think this is mergeable for both the remote snapshotter and unpack reasons. Although this patch kind of works for our use-case, we still get the extra unpack to the "default" overlay snaphotter which takes both extra disk space and time. We really need the snapshotter passed down and have been using the |
The chain ID lock is valuable to prevent parallel fetch and extracts for the same content. In practice without this lock we saw conflicting parallel extracts that greatly slowed image pulls when multiple pods/containers were pulling the same image.
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
This patch adds an additional check in the unpack logic to "always" fetch the content if not present. This handles a case that can lead to incomplete images (images that have the RootFs in the snapshot but have a different digest in their oci config) and prevent snapshotters other than the default from working.
In terms of code changes...
This patch moves the content check and fetch to the start of doUnpackFn. This means that we "always" will check for content even if the snapshot diffid is unpacked already and download the content if missing.
Fixes #8674
Signed-off-by: Simon Kaegi [email protected]