DevHeads.net

module load inside rpmbuild inside docker

Hi,

I wanted to bump the legion package to 19.04.0
(<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1705033" title="https://bugzilla.redhat.com/show_bug.cgi?id=1705033">https://bugzilla.redhat.com/show_bug.cgi?id=1705033</a>), however for
some reason all tests segfault with openmpi
(<a href="https://koji.fedoraproject.org/koji/taskinfo?taskID=34577005" title="https://koji.fedoraproject.org/koji/taskinfo?taskID=34577005">https://koji.fedoraproject.org/koji/taskinfo?taskID=34577005</a>), so I
reported this upstream
(<a href="https://github.com/StanfordLegion/legion/issues/533" title="https://github.com/StanfordLegion/legion/issues/533">https://github.com/StanfordLegion/legion/issues/533</a>) and included a
minimal dockerfile to reproduce this issue:

FROM fedora:rawhide
RUN dnf install -y spectool wget rpm-build dnf-plugins-core
RUN wget <a href="https://src.fedoraproject.org/fork/junghans/rpms/legion/raw/master/f/legion.spec" title="https://src.fedoraproject.org/fork/junghans/rpms/legion/raw/master/f/legion.spec">https://src.fedoraproject.org/fork/junghans/rpms/legion/raw/master/f/leg...</a>
RUN spectool -g legion.spec
RUN dnf builddep -y legion.spec
RUN dnf install -y make
RUN rpmbuild -D"_sourcedir ${PWD}" -D"_srcrpmdir ${PWD}" -ba legion.spec

This worked fine on Thursday(?) to reproduce the failing tests in
%check, but now rpmbuild fails at an earlier stage with:
+ module load mpi/mpich-x86_64
++ /usr/share/lmod/lmod/libexec/lmod sh load mpi/mpich-x86_64
Lmod has detected the following error: The following module(s) are unknown:
"mpi/mpich-x86_64"

If I jump into the container interactively (docker run -it ..
/bin/bash), "module load" as well as rpmbuild (and "module load"
inside) works.

If know this is a convoluted case, but any ideas how fix this?

Christoph

Comments

Re: module load inside rpmbuild inside docker

By Orion Poplawski at 05/04/2019 - 16:52

On 5/3/19 4:00 PM, Christoph Junghans wrote:
We depend on /etc/profile.d/00-modulepath.sh (from Lmod) to add
/etc/modulefiles to MODULEPATH. Perhaps this doesn't get sourced in
during the sequence of docker RUN commands?

Re: module load inside rpmbuild inside docker

By Daniel J Walsh at 05/04/2019 - 07:25

On 5/3/19 6:00 PM, Christoph Junghans wrote:

BTW Have you tried this with Podman?

Re: module load inside rpmbuild inside docker

By King InuYasha at 05/04/2019 - 07:28

On Sat, May 4, 2019 at 7:26 AM Daniel Walsh < ... at redhat dot com> wrote:
I'm pretty sure these aren't kernel modules, but environment modules
for OpenMPI and such...

Re: module load inside rpmbuild inside docker

By Christoph Junghans at 05/04/2019 - 10:41

On Sat, May 4, 2019 at 5:30 AM Neal Gompa < ... at gmail dot com> wrote:
I am thinking there is something missing in the default environment in
the container, that gets loaded in the interactive mode.

Christoph