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

kernel-module-injector can't install drbd #514

Open
Icedroid opened this issue Aug 2, 2023 · 5 comments
Open

kernel-module-injector can't install drbd #514

Icedroid opened this issue Aug 2, 2023 · 5 comments

Comments

@Icedroid
Copy link

Icedroid commented Aug 2, 2023

In CentOS 7 I have already installed elfutils-libelf-devel, but I meet the error:

Need a git checkout to regenerate drbd/.drbd_git_revision
make[1]: Entering directory `/tmp/pkg/drbd-9.1.15/drbd'

    Calling toplevel makefile of kernel source tree, which I believe is in
    KDIR=/lib/modules/4.18.0-3.3.el7.x86_64/build

make -C /lib/modules/4.18.0-3.3.el7.x86_64/build   M=/tmp/pkg/drbd-9.1.15/drbd  modules
Makefile:978: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.
make[1]: *** [kbuild] Error 2
make[1]: Leaving directory `/tmp/pkg/drbd-9.1.15/drbd'
make: *** [module] Error 22023-08-02T16:21:19.397830136+08:00 

Could not find the expexted *.ko, see stderr for more details
@WanzenBug
Copy link
Member

In CentOS 7

Whatever you have there, it's not the standard CentOS 7 kernel. Maybe try the CentOS 8/ AlmaLinux 8 injector instead, as that at least also runs on kernel 4.18.0?

@tuupola
Copy link

tuupola commented Aug 16, 2023

Same problem with fresh install on Rocky Linux 8 which has elfutils-libelf-devel is installed.

Need a git checkout to regenerate drbd/.drbd_git_revision
2023-08-16T16:51:59.828799519+03:00 make[1]: Entering directory '/tmp/pkg/drbd-9.2.4/drbd'
2023-08-16T16:51:59.831456829+03:00 
2023-08-16T16:51:59.831463688+03:00     Calling toplevel makefile of kernel source tree, which I believe is in
2023-08-16T16:51:59.831466093+03:00     KDIR=/lib/modules/4.18.0-477.21.1.el8_8.x86_64/build
2023-08-16T16:51:59.831470987+03:00 
2023-08-16T16:51:59.833659046+03:00 make -C /lib/modules/4.18.0-477.21.1.el8_8.x86_64/build   M=/tmp/pkg/drbd-9.2.4/drbd  modules
2023-08-16T16:52:00.133613673+03:00 Makefile:1006: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  Stop.
2023-08-16T16:52:00.133727303+03:00 make[1]: *** [Makefile:134: kbuild] Error 2
2023-08-16T16:52:00.133745626+03:00 make[1]: Leaving directory '/tmp/pkg/drbd-9.2.4/drbd'
2023-08-16T16:52:00.133759171+03:00 make: *** [Makefile:126: module] Error 2
2023-08-16T16:52:00.135616591+03:00 
2023-08-16T16:52:00.135622118+03:00 Could not find the expexted *.ko, see stderr for more details

@WanzenBug
Copy link
Member

WanzenBug commented Aug 16, 2023

You are using the wrong loader image. The dockerfile already includes that package: https://github.com/piraeusdatastore/piraeus/blob/master/dockerfiles/drbd-driver-loader/Dockerfile.almalinux8#L7C56-L7C56

@tuupola
Copy link

tuupola commented Aug 16, 2023

It would be nice if also Rocky Linux was autodetected in the configmap. I was able to make it work by changing the fallback image to drbd9-centos8. I am using the Kustomize deploy.

        image: drbd9-centos8 # Fallback image: chose a fairly recent kernel, which can hopefully compile whatever config is actually in use
        match:
          - osImage: CentOS Linux 7
            image: drbd9-centos7
          - osImage: CentOS Linux 8
            image: drbd9-centos8

After above I still had the following problem.

2023-08-16T18:40:33.222598958+03:00 insmod: ERROR: could not insert module ./drbd.ko: Required key not available
2023-08-16T18:40:33.227236563+03:00 insmod: ERROR: could not insert module ./drbd_transport_tcp.ko: Required key not available

This was fixed by disabling secure boot from BIOS. Everything ok now.

@WanzenBug
Copy link
Member

Feel free to open a pull request, adding new entries to the match: section. The osImage value is used to match against the nodes' osImage value. You can check that by running:

kubectl get nodes -ocustom-columns=osImage:'.status.nodeInfo.osImage'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants