piraeus-operator
piraeus-operator copied to clipboard
kernel-module-injector can't install drbd
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
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?
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
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
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.
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'
I've just installed on ROS8 4.18.0-513.24.1.el8_9.x86_64 with operator 2.5.2
"dnf install kernel-headers-$(uname -r)" is all I've ever had to run on my nodes to install the operator, substituting YUM for dnf on CentOS7.
I'll close this for now, as the original issue seems to be related to a custom CentOS 7 kernel, and Rocky Linux is now recognized and thus a "supported" platform.