-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add snapcraft script to package up bcc as a snap #835
Conversation
[buildbot, ok to test] |
It builds and installs ok (different version number than in the README, but that's ok), but the tools don't run. I don't know where I should be running them from, here?:
(I couldn't find the snap command to list what it had installed.) That directory does exist. Is this doing a chroot or openat or something? |
On 01/12/16 22:22, Brendan Gregg wrote:
It builds and installs ok (different version number than in the README,
but that's ok), but the tools don't run. I don't know where I should be
running them from, here?:
|# /snap/bin/bcc.opensnoop chdir(/lib/modules/4.9.0-rc5-virtual/build):
No such file or directory Traceback (most recent call last): File
"/snap/bcc/100001/usr/share/bcc/tools/opensnoop", line 126, in <module>
b = BPF(text=bpf_text) File
"/snap/bcc/100001/usr/lib/python2.7/dist-packages/bcc/__init__.py", line
240, in __init__ raise Exception("Failed to compile BPF module %s" %
src_file) Exception: Failed to compile BPF module |
(I couldn't find the snap command to list what it had installed.)
That directory does exist. Is this doing a chroot or openat or something?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#835 (comment)>, or
mute the thread
<https://github.com/notifications/unsubscribe-auth/AI4or6a3s3KF6XVFiDGbD3KVGoan_bCgks5rD0imgaJpZM4LBsMd>.
please try the following:
$ sudo snap connect bcc:mount-observe
$ sudo snap connect bcc:system-observe
$ sudo snap connect bcc:system-trace
and then run opensnoop using:
bcc.opensnoop
|
Commands don't work. Am I on an old snap version? Just did an apt-get...
|
I tried again on a more stock Xenial 4.4, with the same errors. |
This is from a clean 64 bit xenial, updated with:
I installed the snap using the --devmode switch to snap install too. |
Ok, after the "sudo apt-get update && sudo apt-get dist-upgrade", it works on my stock 4.4. It's not working on my 4.9-rc5 kernel. |
OK, I'll look at that 4.9 issue first thing on Tuesday (it's EOD UK time and I'm out on Monday). |
I've tried out 4.9-rc8 mainline kernel and also the latest pre-release Zesty 4.9-rc8 kernel with bcc generated from the bcc git repo using the snapcraft script and it works OK on the zesty development release. I'll now re-test this on Xenial and Yakkety releases with these two 4.9 kernels and see if I can reproduce the problem you are seeing. |
I've now tested Xenial, Yakkety and Zesty releases using their current kernels and the 4.9-rc8 mainline kernel with a snap of today's bcc and they all work fine. I've put the mainline 4.9-rc8 kernel debs here: http:https://kernel.ubuntu.com/~cking/kernel-4.9-rc8 if you could re-test using that kernel. If you can report where it is failing perhaps I can figure out whats wrong. |
I'll test, but my guess is that it was failing because I was building and installing my own kernel. ie, make, make modules_install, make install, make headers_install. Maybe that misses something? Maybe we don't care so much, as if you're building your own kernel, you should be on the lookout for breakage? |
I'm suspect it maybe because of the different environment, not sure really. Anyhow, will this be tested and merged at some point Brendan? |
We can merge it; just was wondering what will happen for people who build their own kernel. If it's expected not to work, could we put a note in the README? |
OK good idea. shall I re-submit with an updated README? |
If you just push a commit, it should auto-join onto the existing PR. Makes it easier. |
This supports packaging using snapcraft; to create a snap install snapcraft and in the snapcraft directory run make to generate a snap. This script was originally written by Evan Dandrea and updated by Colin King. Signed-off-by: Colin Ian King <[email protected]>
Hi Brendan, I've re-worked the README file, and to make life easier with the versioning, building and installation I've added a simple Makefile too. No major changes. 96875c5 |
Thanks, LGTM. @drzaeus77 might want to take a look. |
Hi there, any news on this commit? It would be great to get it accepted if possible. Thanks! |
This supports packaging using snapcraft; to create a snap
install snapcraft and in the snapcraft directory run
snapcraft to generate a snap. This script was originally
written by Evan Dandrea and updated by Colin King.
Signed-off-by: Colin Ian King [email protected]