pkg/kube: symlink host-local into PATH for k3s v1.34+ compatibility#5788
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5788 +/- ##
===========================================
+ Coverage 19.52% 29.87% +10.34%
===========================================
Files 19 18 -1
Lines 3021 2417 -604
===========================================
+ Hits 590 722 +132
+ Misses 2310 1549 -761
- Partials 121 146 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cc9d2a6 to
067c35e
Compare
k3s v1.34+ validates CNI plugins via exec.LookPath() during agent init. host-local (used by flannel for IPAM) lives in /opt/cni/bin which is not in the default PATH, causing: failed to find host-local: executable file not found in $PATH This blocks the k3s server from reaching ready state on every boot and prevents cluster-reset from proceeding during etcd restore, leaving the cluster permanently stuck until the symlink is manually placed. Fix: create /usr/bin/host-local -> /opt/cni/bin/host-local before each k3s start in check_start_k3s() and after k3s binary install in update_k3s(). Signed-off-by: Manjunath Ranganathaiah <manjunath@zededa.com>
067c35e to
5dcbcd6
Compare
|
@naiming-zededa can you review this to see nothing is broken for eve-k |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
k3s v1.34+ validates CNI plugins via exec.LookPath() during agent init. host-local (used by flannel for IPAM) lives in /opt/cni/bin which is not in the default PATH, causing:
failed to find host-local: executable file not found in $PATH
This blocks the k3s server from reaching ready state prevents cluster-reset from proceeding during etcd restore, leaving the cluster permanently stuck until the symlink is manually placed.
Fix: create /usr/bin/host-local -> /opt/cni/bin/host-local before each k3s start in check_start_k3s() and after k3s binary install in update_k3s().
How to test and validate this PR
SSH into eve-k cluster node and enter kube using "eve enter kube"
k3s-stop
k3s server --cluster-reset --cluster-reset-restore-path=/var/lib/rancher/k3s/server/db/snapshots/
k3s-start
ls -la /usr/bin/host-local
The link should exist
Changelog notes
pkg/kube: symlink host-local into PATH for k3s v1.34+ compatibility
PR Backports
Checklist
For backport PRs (remove it if it's not a backport):
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.