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

nodeinstaller: ignore absence of containerd config template #1206

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

burgerdev
Copy link
Contributor

Commit ff6bfe1 introduced an os.ReadFile operation for the containerd config template used by k3s, assuming that the template file would always be present. However, a fresh installation of k3s does not come with a template file:
https://docs.k3s.io/advanced#configuring-containerd.

On a fresh k3s installation, the nodeinstaller will not find the template file, (falsely) assume that there is no config and use an embedded default, which happens to be incompatible with k3s.

Going forward, the nodeinstaller will treat an absent template like an empty template.

Commit ff6bfe1 introduced an os.ReadFile operation for the containerd
config template used by k3s, assuming that the template file would
always be present. However, a fresh installation of k3s does not come
with a template file:
https://docs.k3s.io/advanced#configuring-containerd.

On a fresh k3s installation, the nodeinstaller will not find the
template file, (falsely) assume that there is no config and use an
embedded default, which happens to be incompatible with k3s.

Going forward, the nodeinstaller will treat an absent template like an
empty template.
@burgerdev burgerdev added bug fix Fixing a user facing bug backport release/v1.4 labels Feb 3, 2025
@msanft
Copy link
Contributor

msanft commented Feb 4, 2025

Diff looks reasonable to me. Did you test it by removing the template file on e.g. discovery?

@burgerdev
Copy link
Contributor Author

I tested it on a VM with a new k3s installation.

@burgerdev burgerdev merged commit 0ae81e5 into main Feb 4, 2025
14 checks passed
@burgerdev burgerdev deleted the burgerdev/k3s branch February 4, 2025 08:18
@edgelessci
Copy link
Contributor

Successfully created backport PR for release/v1.4:

@katexochen
Copy link
Member

I think this actually changed with newer k3s versions. I remember it would always create that template, that's also the reason we had to build the handling for it.

@burgerdev
Copy link
Contributor Author

I tested with 1.31.5 and 1.30.5, both don't create the template on first install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release/v1.4 bug fix Fixing a user facing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants