issue with install_packages in FAI 5.0.3

Andrew Ruthven andrew at etc.gen.nz
Fri Apr 15 01:49:50 CEST 2016


On Tue, 2016-04-12 at 10:10 +0200, Thomas Lange wrote:
> > 
> > > 
> > > > 
> > > > > 
> > > > > > 
> > > > > > On Tue, 12 Apr 2016 12:04:57 +1200, Andrew Ruthven <andrew@
> > > > > > etc.gen.nz> said:
>     > Could not open file /var/lib/dpkg/status - open (2: No such
> file or
>     > directory)
> Another cause could be, that you machine does not have much RAM. FAI
> is putting a ramdisk (tmpfs) on top of /var/lib/dpkg. If this gets
> overcrowded, a process may not be able to write the status file, and
> therefore it may be missing. How much RAM does your client have?

I was doing a test build in a KVM instance with 1GB of RAM. I've also
tried it on a server with 384GB, looking in the logs we have:

Calling task_extrbase
Unpacking distro base archive
ftar: extracting /var/lib/fai/config/basefiles/TRUSTY_AMD64.tar.gz to
/target/
Ramdisk mounted onto /target/var/lib/dpkg

I've checked on the real box, and /var/lib/dpkg is still empty, and
install_packages fails in the same fashion.

The basefile is extracted into /target as expected and
/target/var/lib/dpkg looks sane to me.

> You can disable the ramdisk by setting
> FAI_RAMDISK=/doesnotexist
> in class/*.var

I've put this into LAST.var and now I can complete installs without
hacking /usr/lib/fai/subroutines to add -N to install_packages. ;)

Perhaps install_packages could check to make sure that
/var/lib/dpkg/status exists before trying to use Apt::Pkg?

Cheers,
Andrew

-- 
Andrew Ruthven, Wellington, New Zealand
andrew at etc.gen.nz             |     linux.conf.au 2016 
  New Zealand's only Cloud:   | LCA By the Bay, Geelong, AU
https://catalyst.net.nz/cloud | http://lca2016.linux.org.au






More information about the linux-fai mailing list