piraeus-operator icon indicating copy to clipboard operation
piraeus-operator copied to clipboard

`drbd-module-loader` fails to compile drbd kernel modules on flatcar host due to missing elfutils

Open rauanmayemir opened this issue 2 years ago • 2 comments

There was a fix for all the OSes that added missing package for elfutils, except for flatcar. In case people stumble upon this issue, here's a patched Dockerfile.flatcar version that helps resolve the issue:

FROM gentoo/portage AS portage
FROM gentoo/stage3

MAINTAINER Roland Kammerer <[email protected]>

COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo

RUN emerge -qv dev-libs/elfutils

ARG DRBD_VERSION=9.2.4

RUN wget https://pkg.linbit.com/downloads/drbd/9/drbd-${DRBD_VERSION}.tar.gz -O /drbd.tar.gz && \
    wget https://raw.githubusercontent.com/LINBIT/drbd/master/docker/entry.sh -O /entry.sh && chmod +x /entry.sh

ENV LB_HOW compile

ENTRYPOINT /entry.sh

This is too casual to suggest for upstream, we might not want to have the whole portage repo in the runtime, so this will need some tweaks to be PR worthy.

Flatcar already includes a drbd kernel module, but it's v8.4.1 and it won't work with piraeus as it will use drbd-utils v9, so you'll have to disable bundled modules.

rauanmayemir avatar Aug 06 '23 14:08 rauanmayemir

Flatcar is a tricky distribution to work with, and also one we do not have much experience with. We'd be happy to accept improvements by users.

WanzenBug avatar Aug 10 '23 06:08 WanzenBug

Yes, currently I am moving blind and just learning things about gentoo. I will try to come up with a polished PR once we finalize our setup.

rauanmayemir avatar Aug 10 '23 07:08 rauanmayemir