containers / qm

QM is a containerized environment for running Functional Safety qm (Quality Management) software
https://github.com/containers/qm
GNU General Public License v2.0
20 stars 20 forks source link

Kernel module inside ffi-tools:latest container in qm environment while running test. #452

Closed weiwang-linda closed 1 month ago

weiwang-linda commented 1 month ago

While running below command in test environment.

podman run -d --rm --replace -d --name ffi-asil quay.io/centos-sig-automotive/ffi-tools:latest  > /dev/null"

podman push ${ffi-tools_image_id} dir:/var/lib/containers/registry/ffi-tools:latest

podman exec -it qm /bin/bash -c "podman run  --replace --name ffi-qm  dir:/var/lib/containers/registry/ffi-tools:latest ./modprobe_module 2>&1"
Getting image source signatures
Copying blob 87a1067ceb62 skipped: already exists  
Copying blob f29065cba43b skipped: already exists  
Copying config 4d3044c8b2 done   | 
Writing manifest to image destination
This folder should be empty, any modules cannot load via modprobe

It failed at https://github.com/containers/qm/blob/3d491af0c835c579ee1f1b283b25486ff2176bd2/tests/e2e/tools/FFI/module/modprobe_module#L8

Then going in the qm contarner to check what has happened.

bash-5.1# podman run -d --replace --name ffi-tools  dir:/var/lib/containers/registry/ffi-tools\:latest/  tail -f /dev/null
Getting image source signatures
Copying blob 87a1067ceb62 skipped: already exists  
Copying blob f29065cba43b skipped: already exists  
Copying config 4d3044c8b2 done   | 
Writing manifest to image destination

bash-5.1# podman ps
CONTAINER ID  IMAGE                                                             COMMAND            CREATED         STATUS         PORTS       NAMES
8d4f63e21fcc  4d3044c8b2f562e7502f0961eefa61a8b6ec3798c1909f40cc97d9a7f1494a1e  tail -f /dev/null  20 seconds ago  Up 20 seconds              ffi-tools

bash-5.1# podman exec -it ffi-tools bash
[root@270e4f6f019f bin]# ls -lrt /lib/modules
total 4
drwxr-xr-x. 7 root root 4096 May 29 23:19 5.14.0-452.el9.x86_64

It shouldn't any modules in /lib/modules folder inside qm.

Yarboa commented 1 month ago

https://gitlab.com/CentOS/automotive/container-images/ffi-tools/-/blob/main/Containerfile?ref_type=heads#L36-L37

I think this is the issue, I will move it out of shortbuild argument

https://gitlab.com/CentOS/automotive/container-images/ffi-tools/-/merge_requests/29

Yarboa commented 1 month ago

@weiwang-linda should work

podman run quay.io/centos-sig-automotive/ffi-tools bash -c "ls -A /lib/modules"