Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/1.6] Fix CRI snapshotter root path when not under containerd root #10127

Merged

Conversation

Kern--
Copy link
Contributor

@Kern-- Kern-- commented Apr 24, 2024

Fixes #10095 in 1.6
Related to the release/1.7 backport #10096

This PR backports 4 changes:

  1. Add platform config to proxy plugins #8417 - Allows proxy plugins to have platforms (not strictly necessary to fix the issue, but I thought it would be less weird to keep this than to take a newer change to ProxyPlugins without the older one)
  2. Add exports to proxy plugin config #9253 - Allows proxy plugins to have exports (e.g. root)
  3. Snapshotters: Export the root path #10073 - Exports root paths for a number of snapshotters that didn't already have them
  4. CRI: "Fix" imageFSPath behavior #9216 - Uses exported root key for snapshotter root if present.

The result of this is that you can tell containerd about a remote snapshotter's root like:

[proxy_plugins.soci]
type = "snapshot"
address = "/run/soci-snapshotter-grpc/soci-snapshotter-grpc.sock"
[proxy_plugins.soci.exports]
root = "/var/lib/soci-snapshotter-grpc"

which will be correctly reported by CRI which unblocks the kubelet from enforcing ephemeral-storage limits and doing image garbage collection.

dmcgowan and others added 4 commits April 24, 2024 17:42
Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit 4e56939)
Signed-off-by: Kern Walster <walster@amazon.com>
Allows external plugins to define exports.

Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit e4639ad)
Signed-off-by: Kern Walster <walster@amazon.com>
Some of the snapshotters that allow you to change their root location
were already doing this, this just makes all of them follow the same
pattern.

Signed-off-by: Danny Canter <danny@dcantah.dev>
(cherry picked from commit 32caaee)
Signed-off-by: Kern Walster <walster@amazon.com>
Currently it didn't take into account that certain snapshots can explicitly
have their root directories placed at a different location. This changes
it to use the RootPath method of the snapshotter if it implements it.

Without this change, cadvisor is not able to get filesystem usage
information, which prevents the kubelet from doing image garbage
collection and enforcing ephemeral storage limits.

Signed-off-by: Danny Canter <danny@dcantah.dev>
(cherry picked from commit 6aeec45)
Signed-off-by: Kern Walster <walster@amazon.com>
@k8s-ci-robot
Copy link

Hi @Kern--. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions 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.

@Kern--
Copy link
Contributor Author

Kern-- commented Apr 24, 2024

cc @dcantah

@dcantah
Copy link
Member

dcantah commented Apr 24, 2024

While I think this probably shouldn't cause any issues, for 1.6 (and same for 1.7, but given it's not LTS I think we're generally more lenient) we really only try to backport bug/security fixes. I'm assuming this is hurting someone in production on 1.6 as well is the reason

@Kern--
Copy link
Contributor Author

Kern-- commented Apr 24, 2024

I think this falls under the category of bug fixes. Or do you mean you generally only backport bug fixes related to security issues?

@dcantah
Copy link
Member

dcantah commented Apr 25, 2024

@Kern-- It's a weird one as it's a bug fix enabled by new functionality as proxy plugins get two new fields to play around with. I'm okay with this though

@estesp estesp merged commit e0fe45e into containerd:release/1.6 May 7, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants