piraeusdatastore / piraeus-operator

The Piraeus Operator manages LINSTOR clusters in Kubernetes.
https://piraeus.io/
Apache License 2.0
394 stars 63 forks source link

jammy kernel module injector image fails to find gcc-12 on kernel 6.5 #594

Closed mtb-xt closed 7 months ago

mtb-xt commented 8 months ago

Hi everyone.

I have ubuntu 22.04 with linux-hwe kernel installed - it install kernel version 6.5.0-15-generic.

kernel module builder image then fails with this error:

patching file drbd_actlog.c
patching file drbd-headers/linux/genl_magic_func.h
Hunk #1 succeeded at 254 (offset 1 line).
Hunk #2 succeeded at 311 (offset 1 line).
  CC [M]  /tmp/pkg/drbd-9.1.18/drbd/drbd_dax_pmem.o
/bin/bash: line 1: gcc-12: command not found
make[3]: *** [scripts/Makefile.build:251: /tmp/pkg/drbd-9.1.18/drbd/drbd_dax_pmem.o] Error 127
make[2]: *** [Makefile:2037: /tmp/pkg/drbd-9.1.18/drbd] Error 2
make[1]: Leaving directory '/tmp/pkg/drbd-9.1.18/drbd'
make[1]: *** [Makefile:134: kbuild] Error 2
make: *** [Makefile:126: module] Error 2

I've tried both drbd-9.1.17 and drbd-9.1.18. Downgrading the kernel to 6.2 fixes this.

WanzenBug commented 8 months ago

I guess we need to install a different toolchain for the HWE kernels.

See the docker files here: https://github.com/piraeusdatastore/piraeus/tree/master/dockerfiles/drbd-driver-loader

WanzenBug commented 8 months ago

Looks like we could install the dkms package in the container, which pulls in all the necessary dependencies.

WanzenBug commented 7 months ago

Fixed in https://github.com/piraeusdatastore/piraeus/pull/174