Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1000572: fai-cd: Support TMPDIR being redirected

0 views
Skip to first unread message

Mike Gabriel

unread,
Nov 25, 2021, 4:20:04 AM11/25/21
to
Package: fai-server
Severity: normal
Version: 5.10.3
Tags: patch

Hi Thomas,

I have played with fai-cd these days and had a situation where the to
be created ISO image exceeded my storage in /tmp by far.

So, I used the POSIX way of redirecting $TMPDIR and ran this command:


TMPDIR=/srv/fai/tmp/ fai-cd -f -C /etc/fai.deb11/ -n
/srv/fai/nfsroot.deb11/ -m /srv/mirror-deb11/ -g
/etc/fai.deb11/grub.cfg.<customer>
/srv/iso-images/fai-installer-20211124.iso

This resulted in problems during the chroot calls used in the fai-cd
script. The TMPDIR variable is propagated into the chroot calls and
there, /srv/fai/tmp did not exist.

My approach to amend this then was to forcefully set TMPDIR to /tmp
for the chroot calls.

See attached patch.

Mike

--

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31
mail: mike.g...@das-netzwerkteam.de, http://das-netzwerkteam.de

fai-cd-tmpdir-patch.patch

Thomas Lange

unread,
Dec 3, 2021, 4:40:03 PM12/3/21
to
Hi Mike,

instead of using "chroot $NFSROOT bash -c TMPDIR=/tmp ..."
in your code I propose to use

TMPDIR=/tmp chroot ........

IMO this is better, because we do not use another subshell. It also
set TMPDIR for the command inside the chroot.

What do you think? Any comments?
--
viele Grüße Thomas

Mike Gabriel

unread,
Dec 3, 2021, 6:10:03 PM12/3/21
to
Hi Thomas,
Yeah, sounds good to me...

Thomas Lange

unread,
Jan 2, 2022, 3:00:03 PM1/2/22
to
This is now fixed in the master branch

https://github.com/faiproject/fai/commit/2726525da7fbcd73ff5e949516890fa80ffb6783

--
viele Grüße Thomas
0 new messages