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

Fix: Use containerd binary from path in Flatcar #3040

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

4ch3los
Copy link
Contributor

@4ch3los 4ch3los commented Feb 14, 2024

What this PR does / why we need it:
With the latest stable release of flatcar(https://www.flatcar.org/releases#release-3815.2.0), they removed the old containerd installation with torcx and moved to the upstream gentoo builds. This results in a broken containerd.service, because the kubeone dropin refers to the torcx path. Both old(LTS) and new versions PATH var contains the binary, so we are safe to just use the binary from PATH.

Which issue(s) this PR fixes:
NONE

What type of PR is this?

/kind bug

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

fixed support for flatcar stable channel 3815.2.0

Documentation:

NONE

@kubermatic-bot kubermatic-bot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 14, 2024
@kubermatic-bot
Copy link
Contributor

Hi @4ch3los. Thanks for your PR.

I'm waiting for a kubermatic 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.

@kubermatic-bot kubermatic-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 14, 2024
…t release and the binary path has changed

Signed-off-by: Kai Fink <kai.fink@yahoo.de>
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). and removed dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Feb 14, 2024
@kron4eg
Copy link
Member

kron4eg commented Feb 14, 2024

Thank you @4ch3los!

You will need to update fixtures too. Please run hack/update-fixtures.sh and commit the results.

@ahmedwaleedmalik I think we need same change for the OSM, don't we?

@kron4eg
Copy link
Member

kron4eg commented Feb 14, 2024

/test pull-kubeone-test

Signed-off-by: Kai Fink <kai.fink@yahoo.de>
@kubermatic-bot kubermatic-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 14, 2024
@kron4eg
Copy link
Member

kron4eg commented Feb 14, 2024

I wonder if we can make it compatible with the previous flatcar versions (some people run outdated images).

Since containerd already is in the ${TORCX_BINDIR}, and ${TORCX_BINDIR} is in the PATH, we can simply do this, that supposedly would make it forward and backward compatible.

diff --git pkg/scripts/render.go pkg/scripts/render.go
index c1d3f76c..3576bb9f 100644
--- pkg/scripts/render.go
+++ pkg/scripts/render.go
@@ -122,7 +122,7 @@ var containerRuntimeTemplates = map[string]string{
                        Restart=always
                        Environment=CONTAINERD_CONFIG=/etc/containerd/config.toml
                        ExecStart=
-                       ExecStart=/usr/bin/env PATH=\${TORCX_BINDIR}:\${PATH} \${TORCX_BINDIR}/containerd --config \${CONTAINERD_CONFIG}
+                       ExecStart=/usr/bin/env PATH=\${TORCX_BINDIR}:\${PATH} containerd --config \${CONTAINERD_CONFIG}
                        EOF
                `),
 }

Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small suggestion

pkg/scripts/render.go Outdated Show resolved Hide resolved
@kron4eg
Copy link
Member

kron4eg commented Feb 15, 2024

/cherry-pick release/v1.7

@kubermatic-bot
Copy link
Contributor

@kron4eg: once the present PR merges, I will cherry-pick it on top of release/v1.7 in a new PR and assign it to you.

In response to this:

/cherry-pick release/v1.7

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.

@kron4eg
Copy link
Member

kron4eg commented Feb 15, 2024

/cherry-pick release/v1.6

@kubermatic-bot
Copy link
Contributor

@kron4eg: once the present PR merges, I will cherry-pick it on top of release/v1.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release/v1.6

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.

Signed-off-by: Kai Fink <kai.fink@yahoo.de>
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2024
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 107fc7724136dca21299dc53cd4bbd3dce538c4f

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 15, 2024
@kubermatic-bot kubermatic-bot merged commit 22e7cd2 into kubermatic:main Feb 15, 2024
14 checks passed
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.8 milestone Feb 15, 2024
@kubermatic-bot
Copy link
Contributor

@kron4eg: #3040 failed to apply on top of branch "release/v1.7":

Applying: Use containerd binary from path, as flat removed torcx in their newest release and the binary path has changed
Using index info to reconstruct a base tree...
M	pkg/scripts/render.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/scripts/render.go
Applying: Updated fixtures
Using index info to reconstruct a base tree...
M	pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-overwrite_registry.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd_with_insecure_registry.golden
Falling back to patching base and 3-way merge...
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd_with_insecure_registry.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
CONFLICT (content): Merge conflict in pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-overwrite_registry.golden
CONFLICT (content): Merge conflict in pkg/scripts/testdata/TestKubeadmFlatcar-overwrite_registry.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
CONFLICT (content): Merge conflict in pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Updated fixtures
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release/v1.7

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.

@kubermatic-bot
Copy link
Contributor

@kron4eg: #3040 failed to apply on top of branch "release/v1.6":

Applying: Use containerd binary from path, as flat removed torcx in their newest release and the binary path has changed
Using index info to reconstruct a base tree...
M	pkg/scripts/render.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/scripts/render.go
Applying: Updated fixtures
Using index info to reconstruct a base tree...
M	pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-overwrite_registry.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd.golden
M	pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd_with_insecure_registry.golden
M	pkg/scripts/testdata/TestMigrateToContainerd-flatcar.golden
M	pkg/scripts/testdata/TestUpgradeKubeadmAndCNIFlatcar.golden
M	pkg/scripts/testdata/TestUpgradeKubeletAndKubectlFlatcar.golden
Falling back to patching base and 3-way merge...
Auto-merging pkg/scripts/testdata/TestUpgradeKubeletAndKubectlFlatcar.golden
Auto-merging pkg/scripts/testdata/TestUpgradeKubeadmAndCNIFlatcar.golden
Auto-merging pkg/scripts/testdata/TestMigrateToContainerd-flatcar.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd_with_insecure_registry.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-with_containerd.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
CONFLICT (content): Merge conflict in pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-overwrite_registry.golden
CONFLICT (content): Merge conflict in pkg/scripts/testdata/TestKubeadmFlatcar-overwrite_registry.golden
Auto-merging pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
CONFLICT (content): Merge conflict in pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Updated fixtures
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release/v1.6

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.

@kron4eg
Copy link
Member

kron4eg commented Feb 15, 2024

Okey, I'll create manual cherrypicks

kron4eg pushed a commit to kron4eg/kubeone that referenced this pull request Feb 15, 2024
* Use containerd binary from path, as flat removed torcx in their newest release and the binary path has changed

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Secured more backwards compatibility and updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

---------

Signed-off-by: Kai Fink <kai.fink@yahoo.de>
kron4eg pushed a commit to kron4eg/kubeone that referenced this pull request Feb 15, 2024
* Use containerd binary from path, as flat removed torcx in their newest release and the binary path has changed

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Secured more backwards compatibility and updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

---------

Signed-off-by: Kai Fink <kai.fink@yahoo.de>
kubermatic-bot pushed a commit that referenced this pull request Feb 15, 2024
* Fix: Use containerd binary from path in Flatcar (#3040)

* Use containerd binary from path, as flat removed torcx in their newest release and the binary path has changed

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Secured more backwards compatibility and updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

---------

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Update OSM to v1.3.4

Signed-off-by: Artiom Diomin <artiom@kubermatic.com>

* Fix flatcar containerd version detection

Signed-off-by: Artiom Diomin <artiom@kubermatic.com>

---------

Signed-off-by: Kai Fink <kai.fink@yahoo.de>
Signed-off-by: Artiom Diomin <artiom@kubermatic.com>
Co-authored-by: Kai Fink <kai.fink@yahoo.de>
kubermatic-bot pushed a commit that referenced this pull request Feb 15, 2024
* Fix: Use containerd binary from path in Flatcar (#3040)

* Use containerd binary from path, as flat removed torcx in their newest release and the binary path has changed

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Secured more backwards compatibility and updated fixtures

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

---------

Signed-off-by: Kai Fink <kai.fink@yahoo.de>

* Update OSM to v1.2.4

Signed-off-by: Artiom Diomin <artiom@kubermatic.com>

* Fix flatcar containerd version detection

Signed-off-by: Artiom Diomin <artiom@kubermatic.com>

---------

Signed-off-by: Kai Fink <kai.fink@yahoo.de>
Signed-off-by: Artiom Diomin <artiom@kubermatic.com>
Co-authored-by: Kai Fink <kai.fink@yahoo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants