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

FUSE enabled kernel needed by some integration tests. #658

Closed
austinvazquez opened this issue May 31, 2022 · 4 comments
Closed

FUSE enabled kernel needed by some integration tests. #658

austinvazquez opened this issue May 31, 2022 · 4 comments
Labels
kind/enhancement New feature or request

Comments

@austinvazquez
Copy link
Contributor

Currently the kernel used for integration testing does not appear to have FUSE enabled.

The remote (in-VM) integration tests need this kernel configuration enabled to successfully mount and start a container instead of relying on the thinpool.

It would be nice to be able to install multiple kernels during integration test container image build time and specify which kernel is used during runtime.

@austinvazquez austinvazquez added the kind/enhancement New feature or request label May 31, 2022
@austinvazquez
Copy link
Contributor Author

Integration test error with default kernel installed in container image.

make -C snapshotter integ-test
make[1]: Entering directory `/home/ec2-user/workspace/firecracker-containerd/snapshotter'
make integ-test-TestLaunchContainerWithRemoteSnapshotter_Isolated integ-test-TestLaunchMultipleContainersWithRemoteSnapshotter_Isolated
make[2]: Entering directory `/home/ec2-user/workspace/firecracker-containerd/snapshotter'
docker run --rm -it \
        --privileged \
        --ipc=host \
        --network=host \
        --volume /dev:/dev \
        --volume /run/udev/control:/run/udev/control \
        --volume /home/ec2-user/workspace/firecracker-containerd/snapshotter/logs:/var/log/firecracker-containerd-test \
        --volume /home/ec2-user/workspace/firecracker-containerd/snapshotter/..:/src \
        --volume gocache:/go \
        --env ENABLE_ISOLATED_TESTS=1 \
        --env GOPROXY=direct \
        --env GOSUMDB=off \
        --env GO111MODULE=on \
        --env NUMBER_OF_VMS= \
        --workdir="/src/snapshotter" \
        --init \
        localhost/firecracker-containerd-test:latest \
        "go test  -run '^TestLaunchContainerWithRemoteSnapshotter_Isolated$'"
--- FAIL: TestLaunchContainerWithRemoteSnapshotter_Isolated (12.34s)
    service_integ_test.go:130: 
                Error Trace:    service_integ_test.go:130
                                                        service_integ_test.go:61
                Error:          Received unexpected error:
                                failed to extract layer sha256:d2742e2df4a4530fada3b8dbea2b65c4b6fc03fc89f250e8077ecd0425e1ab6c: failed to mount /var/lib/containerd/tmpmounts/containerd-mount1463665100: no such file or directory: unknown
                Test:           TestLaunchContainerWithRemoteSnapshotter_Isolated
                Messages:       Failed to pull alpine image for VM: 0
FAIL
exit status 1
FAIL    github.com/firecracker-microvm/firecracker-containerd/snapshotter       12.357s
make[2]: *** [integ-test-TestLaunchContainerWithRemoteSnapshotter_Isolated] Error 1
make[2]: Leaving directory `/home/ec2-user/workspace/firecracker-containerd/snapshotter'
make[1]: *** [integ-test] Error 2
make[1]: Leaving directory `/home/ec2-user/workspace/firecracker-containerd/snapshotter'
make: *** [integ-test-snapshotter] Error 2
[06:31:03 ec2-firecracker-containerd:~/workspace/firecracker-containerd]$ 

@ginglis13
Copy link
Contributor

is it acceptable to just replace install default-vmlinux with make kernel && make install-kernel in Dockerfile.integtest? TBD if this FUSE enabled kernel is viable for use other than for when it is necessary (i.e. demux snapshotter integ tests). If this isn't viable and we do need both kernels, we can either make changes to the install path/name for make kernel, or we could separate building the FUSE enabled kernel into a separate RUN command, specifying DEFAULT_VMLINUX_NAME as something unique.

Additionally, building an image using firecracker 1.1 ('public.ecr.aws/firecracker/fcuvm:v35') introduces new kernel configuration options. Here are some options I see building 4.14 for x86:

  • Siemens R3964 line discipline (R3964) (NEW)
  • kmemcheck: trap use of uninitialized memory (KMEMCHECK) (NEW)
  • Salsa20 stream cipher algorithm (x86_64) (CRYPTO_SALSA20_X86_64) (NEW)
  • Choose kernel unwinder
    \1. Frame pointer unwinder (FRAME_POINTER_UNWINDER) (NEW)
    \2. ORC unwinder (ORC_UNWINDER) (NEW)
    choice[1-2?]:

@ginglis13
Copy link
Contributor

ginglis13 commented May 31, 2022

We can update kernel configs to include

# CONFIG_R3964 is not set
# CONFIG_KMEMCHECK is not set
# CONFIG_CRYPTO_SALSA20_X86_64 is not set
# CONFIG_FRAME_POINTER_UNWINDER is not set
# CONFIG_ORC_UNWINDER is not set

to avoid being prompted for these configuration options.

e: looks like for some, the names have changed, e.g.:

# CONFIG_UNWINDER_ORC is not set
CONFIG_UNWINDER_FRAME_POINTER=y

@ginglis13
Copy link
Contributor

closing. opened #660 to track having a prebuilt kernel available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants