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 configurable kernel modules list #13

Open
d4s opened this Issue Nov 8, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@d4s
Copy link
Contributor

d4s commented Nov 8, 2017

Some distros have compiled-in kernel modules like ubuntu: CONFIG_VIRTIO=y

Fakemachine crashes with following log:

2017/11/08 16:30:47 open failed: /lib/modules/4.10.0-38-generic/kernel/drivers/virtio/virtio.ko - open /lib/modules/4.10.0-38-generic/kernel/drivers/virtio/virtio.ko: no such file or directory
--- FAIL: TestSuccessfullCommand (0.00s)
panic: open failed: /lib/modules/4.10.0-38-generic/kernel/drivers/virtio/virtio.ko - open /lib/modules/4.10.0-38-generic/kernel/drivers/virtio/virtio.ko: no such file or directory [recovered]
    panic: open failed: /lib/modules/4.10.0-38-generic/kernel/drivers/virtio/virtio.ko - open /lib/modules/4.10.0-38-generic/kernel/drivers/virtio/virtio.ko: no such file or directory

goroutine 5 [running]:
panic(0x64b6a0, 0xc4200f52e0)
    /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1
testing.tRunner.func1(0xc420094180)
    /usr/lib/go-1.7/src/testing/testing.go:579 +0x25d
panic(0x64b6a0, 0xc4200f52e0)
    /usr/lib/go-1.7/src/runtime/panic.go:458 +0x243
log.Panicf(0x6ac7ed, 0x14, 0xc420053800, 0x2, 0x2)
    /usr/lib/go-1.7/src/log/log.go:327 +0xe3
github.com/go-debos/fakemachine/cpio.(*WriterHelper).CopyFileTo(0xc42000d5b0, 0xc420016d00, 0x3e, 0xc420016d00, 0x3e, 0x0, 0x0)
    /home/fredo/Documents/bos0009/go/src/github.com/go-debos/fakemachine/cpio/writerhelper.go:126 +0x1b1
github.com/go-debos/fakemachine/cpio.(*WriterHelper).CopyFile(0xc42000d5b0, 0xc420016d00, 0x3e, 0xc420016d00, 0x3e)
    /home/fredo/Documents/bos0009/go/src/github.com/go-debos/fakemachine/cpio/writerhelper.go:150 +0x49
github.com/go-debos/fakemachine.(*Machine).writerKernelModules(0xc420096400, 0xc42000d5b0, 0x2a, 0x6b64fc)
    /home/fredo/Documents/bos0009/go/src/github.com/go-debos/fakemachine/machine.go:326 +0x185
github.com/go-debos/fakemachine.(*Machine).startup(0xc420096400, 0x6a7933, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/fredo/Documents/bos0009/go/src/github.com/go-debos/fakemachine/machine.go:461 +0xae2
github.com/go-debos/fakemachine.(*Machine).Run(0xc420096400, 0x6a7933, 0x4, 0x5a032327, 0x10ad05ac, 0xc42002ff78)
    /home/fredo/Documents/bos0009/go/src/github.com/go-debos/fakemachine/machine.go:539 +0x5a
github.com/go-debos/fakemachine.TestSuccessfullCommand(0xc420094180)
    /home/fredo/Documents/bos0009/go/src/github.com/go-debos/fakemachine/machine_test.go:16 +0x48
testing.tRunner(0xc420094180, 0x6cacc0)
    /usr/lib/go-1.7/src/testing/testing.go:610 +0x81
created by testing.(*T).Run
    /usr/lib/go-1.7/src/testing/testing.go:646 +0x2ec
exit status 2
FAIL    github.com/go-debos/fakemachine    0.009s

@d4s d4s closed this Nov 8, 2017

@d4s d4s reopened this Nov 15, 2017

@d4s

This comment has been minimized.

Copy link
Contributor

d4s commented Nov 15, 2017

The same thing for hardcoded libraries. On ALTLinux I have:

$ ./debos test.yaml 
2017/11/15 16:22:07 open failed: /lib/x86_64-linux-gnu/libc.so.6 - open /lib/x86_64-linux-gnu/libc.so.6: no such file or directory
@sjoerdsimons

This comment has been minimized.

Copy link
Collaborator

sjoerdsimons commented Nov 17, 2017

That's a seperate issue right ;)

@johnp

This comment has been minimized.

Copy link

johnp commented Jun 27, 2018

Similar problem on Arch Linux, but it has the modules xz compressed:

$ debos simple.yaml
2018/06/27 22:44:21 open failed: /usr/lib/modules/4.16.16-1-ck-haswell/kernel/drivers/virtio/virtio.ko - open /usr/lib/modules/4.16.16-1-ck-haswell/kernel/drivers/virtio/virtio.ko: no such file or directory
$ la /usr/lib/modules/4.16.16-1-ck-haswell/kernel/drivers/virtio/virtio.ko.xz
.rw-r--r-- 4.5k root root 16 Jun 14:24 /usr/lib/modules/4.16.16-1-ck-haswell/kernel/drivers/virtio/virtio.ko.xz

edit: ran into half a dozen other problems after unzipping; for any other non-debian users: best to just run this in a vm for now. Too many debianisms.
edit2: fakemachine does not run in a vm either.

@andrewshadura

This comment has been minimized.

Copy link

andrewshadura commented Oct 21, 2018

Probably it should consult the running kernel to check if it has the module compiled in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment