-
Notifications
You must be signed in to change notification settings - Fork 166
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
Missing header error while trying to run a trace #76
Comments
Hi @achanda thanks for opening this! Can you provide the OS info for the node running this? |
@leodido sorry, forgot that bit 😅 Update now. I got the same error when I ran the cli from MacOS, I assumed that it will work only on Linux. |
Ok, thanks. Will take a look. The target k8s cluster should be running on Linux. The client machine can be anything. I'm not sure if it works on docker for mac to be honest (because of this). If you want to share any other details (e.g, the minimal steps to recreate a similar cluster with kops would be really helpful) please do! :) |
I ran this from a master node, so all other nodes in the cluster should have the same kernel and Linux version. We do, however, use our own custom AMI that adds a bunch of other tools on top of Kops' AMI. I can try this on a vanilla kops cluster. |
Same here. Running master and nodes with ubuntu 19.04. Trying installing the build-essentials in all of them, but the error still happens. The cluster is running with Cilium correctly, so it might be some other thing. The same happens while running against Node or Pod, as the following:
Tks |
So I've digging a little bit and found another error:
So I've mounted the /usr/src from the host and worked fine
Don't know if this is an Ubuntu issue or general one, but I'll keep digging to see if just mounting /usr/src (and putting linux-headers as a dependency to kubectl-trace) is all we need. |
It seems I've to force the --fetch-headers to kubectl-trace run, but it still doesn't work. I've recompiled kubectl-trace to force the container mount/map between host /usr/src and container's /usr/src and this did worked fine, but don't know if this is the right path to follow. Waiting for further directions :) |
@rikatz oh good catch! Can you give the output of:
I'm curious to see the symlinks there. Maybe we need to change the strategy to detect headers in different distros. |
@fntlnz for sure!
It seems that the symlink there created by Ubuntu might be an issue. |
Ensure that /usr/src is mounted, since several common distributions link /lib/modules/$(uname -r)/build to /usr/src/kernels/$(uname -r) or /usr/src/linux-headers-$(uname -r). Fixes: iovisor#76 Signed-off-by: Joe Stringer <[email protected]>
Tks for the fix @fntlnz and @joestringer :) |
I just encountered this as well on a vanilla GKE cluster. I haven't done any significant exploring to be clear, just bringing it up if it's a recurring issue.
|
Also fails on
|
@stafot I think you also need to install the |
@joestringer thanks I will let you know if this fixes the issue. |
@joestringer Unfortunately it doesn't work.
And the error remains the same. |
For anyone in the future having the same problem on
Thanks, @joestringer for the initial advice that help me to find the fix for my use case. |
Similarly, |
For me it's still not working. I need to append the |
@tuannvm on what node type are you running out of interest? |
Any guy had luck with CentOS? WARNING: Cannot find distro-specific headers for "CentOS Linux". Fetching generic headers.
+ BUILD_DIR=/linux-generic-5.15.4-1.el7.elrepo.x86_64
+ SOURCES_DIR=/usr/src/linux-generic-5.15.4-1.el7.elrepo.x86_64
+ [[ ! -e /usr/src/linux-generic-5.15.4-1.el7.elrepo.x86_64/.installed ]]
+ echo 'Installing kernel headers for generic kernel'
Installing kernel headers for generic kernel
+ fetch_generic_linux_sources
++ awk '-vFS=[-+]' '{ print $1 }'
++ echo 5.15.4-1.el7.elrepo.x86_64
+ kernel_version=5.15.4
++ echo 5.15.4-1.el7.elrepo.x86_64
++ awk -vFS=. '{ print $1 }'
+ major_version=5
+ [[ 5.15.4 == *.0 ]]
+ echo 'Fetching upstream kernel sources for 5.15.4.'
Fetching upstream kernel sources for 5.15.4.
+ mkdir -p /linux-generic-5.15.4-1.el7.elrepo.x86_64
+ curl -sL https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.4.tar.gz
+ tar --strip-components=1 -xzf - -C /linux-generic-5.15.4-1.el7.elrepo.x86_64
tar: invalid magic
tar: short read
real 0m1.344s
user 0m0.035s
sys 0m0.017s |
I can confirm that I have already install header and devel on my node, why should I |
I tried to run a trace on a cluster built with kops, here is what I see in trace logs
Relevant info
The text was updated successfully, but these errors were encountered: