install_packages seems to be excluding a lot of pakcages
Justin Cattle
j at ocado.com
Fri Mar 8 14:34:52 CET 2019
Hi Thomas,
So, this was the issue. It was very hard to track down, as there was
nothing in the FAI logs to indicate were the problem was, but eventually I
found it :)
Someone had uploaded a package with bad control data into one of our
repos. That is what the parsing of the available packages. I'm guessing
that the packages that did manage to get included still, where before the
bad control data for the package [ in the file that's parsed ].
I think I found the code that add all the available packages to the dpkg
file as well:
commit 8963c7268a68dc3ed29aa4208d3d7e800b5d2eb4
Author: Thomas Lange <lange at informatik.uni-koeln.de>
Date: Mon Dec 12 09:19:23 2016 +0100
create /var/lib/dpkg/available during packge installation
diff --git a/bin/fai-make-nfsroot b/bin/fai-make-nfsroot
index 5321d54d..8aebd6da 100755
--- a/bin/fai-make-nfsroot
+++ b/bin/fai-make-nfsroot
@@ -474,6 +474,7 @@ add_packages_nfsroot() {
local err
setclasses
+ $ROOTCMD apt-cache dumpavail > $NFSROOT/var/lib/dpkg/available
install_packages -l -p$cfdir > $NFSROOT/var/tmp/packages.nfsroot
echo "Adding additional packages to $NFSROOT:"
cat $NFSROOT/var/tmp/packages.nfsroot
@@ -483,6 +484,7 @@ add_packages_nfsroot() {
if [ $err -ne 0 ]; then
die 12 "install_packages had exit code: $err"
fi
+ rm $NFSROOT/var/lib/dpkg/available
set -e
}
I presume fai-make-nfsroot is called during FAI build at some point ?
That's what I was missing, because whenever I
check $NFSROOT/var/lib/dpkg/available it only had about 200 packages in it
anyway.
I added a hack to a class for insoft to do:
chroot /target/ apt-cache dumpavail > $NFSROOT/var/lib/dpkg/available
..and that fixed the included packages, but I then found that aptitude was
failing, due to an error on some control data in
$NFSROOT/var/lib/dpkg/available
That's how I found the package with bad control data.
I removed it from the repos, and removed my hacks, and everything was back
to normal :)
Would it be possible to somehow pass any errors through to fai.log if the
process to a that parses the available packages errors?
Or do you think it was just failing silently anyway?
Cheers,
Just
On Fri, 8 Mar 2019 at 11:25, Justin Cattle <j at ocado.com> wrote:
> I think I have found the cause, so please don't check anything Thomas.
> I'll update with my findings soon :)
> Hopefully you can help me understand the issue I've found.
>
>
> Cheers,
> Just
>
>
> On Fri, 8 Mar 2019 at 09:02, Justin Cattle <j at ocado.com> wrote:
>
>> I've also just tried the latest version of install_packages from git,
>> Same thing.
>>
>>
>> Like I said, I'm not a perl guy, but it seems like this is happening:
>>
>> The hash pname is built from packages listed in
>> $FAI_ROOT/var/lib/dpkg/available , using the function create_debian_pkg_list
>>
>> clean_pkg_list parses all the files, using insert_pkg. If insert_pkg
>> doesn't find the file in pmap, it will return 0 and package falls
>> into @unknown.
>>
>>
>> So, I think this can be summarised as, if the package isn't declared in
>> $FAI_ROOT/var/lib/dpkg/available, it will be removed from the installation
>> list.
>>
>> If that's correct, then I'm slightly confused, because
>> /var/lib/dpkg/available isn't a full list of packages available for
>> installation via apt.
>> Is there something I'm missing in FAI that normally populates that file
>> with more of the packages from apt sources?
>>
>>
>> Cheers,
>> Just
>>
>>
>> On Fri, 8 Mar 2019 at 08:02, Justin Cattle <j at ocado.com> wrote:
>>
>>> Apologies, forgot to add that info.
>>>
>>> FAI 5.3.6
>>> nfsroot is debian squeeze, and building ubuntu trusty in this case
>>>
>>>
>>> Cheers,
>>> Just
>>>
>>>
>>> On Thu, 7 Mar 2019 at 22:37, Thomas Lange <lange at informatik.uni-koeln.de>
>>> wrote:
>>>
>>>> >>>>> On Thu, 7 Mar 2019 21:59:09 +0000, Justin Cattle <j at ocado.com>
>>>> said:
>>>>
>>>> > This is a FAI system that I haven't used for a while, and I'm not
>>>> 100% how the config has changed if at all.
>>>>
>>>> > When it get to task instsoft, it fails to include most of the
>>>> packages from the package_config files. It includes just a few.
>>>> Which FAI version are you using?
>>>>
>>>> --
>>>> regards Thomas
>>>>
>>>
--
Notice: This email is confidential and may contain copyright material of
members of the Ocado Group. Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the members of the
Ocado Group.
If you are not the intended recipient, please notify us
immediately and delete all copies of this message. Please note that it is
your responsibility to scan this message for viruses.
Fetch and Sizzle
are trading names of Speciality Stores Limited and Fabled is a trading name
of Marie Claire Beauty Limited, both members of the Ocado Group.
References to the “Ocado Group” are to Ocado Group plc (registered in
England and Wales with number 7098618) and its subsidiary undertakings (as
that expression is defined in the Companies Act 2006) from time to time.
The registered office of Ocado Group plc is Buildings One & Two, Trident
Place, Mosquito Way, Hatfield, Hertfordshire, AL10 9UL.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20190308/29b45b12/attachment.html>
More information about the linux-fai
mailing list