LXC natty guest failing to configure properly

Bug #740167 reported by Ahmed Kamal
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc
Fix Released
Undecided
Unassigned
debootstrap (Ubuntu)
Fix Released
High
Colin Watson
netbase (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: lxc

Errors were encountered while processing:
 inetutils-ping
dpkg: dependency problems prevent configuration of inetutils-ping:
 inetutils-ping depends on netbase; however:
  Package netbase is not installed.
dpkg: error processing inetutils-ping (--configure):
 dependency problems - leaving unconfigured

It seems package "netbase" needs to be added to the minimal install, it doesn't need any extra dependencies

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: lxc 0.7.4-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-7.36-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Mar 22 14:43:14 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100620)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: Upgraded to natty on 2011-01-10 (70 days ago)

Revision history for this message
Ahmed Kamal (kim0) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

When exactly do you see this? I'm not getting that error...

Though maybe my caches are not new enough. Recaching.

Revision history for this message
Ahmed Kamal (kim0) wrote :

I debootstrapped a fresh natty (outside of lxc) and got the same behaviour. Command used:

sudo debootstrap --verbose --variant=minbase --components=main,universe --arch=amd64 --include=$packages natty deboot/

$packages is the same from lxc script

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

So what sort of system is this? Is it some flavour which doesn't include netbase by default?

Changed in lxc (Ubuntu):
status: New → Incomplete
importance: Undecided → High
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Guess the question doesn't quite make sense. But I'm still not seeing that issue anywhere. Weird.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Is this actually a bug in debootstrap, as it seems to be not installing dependencies?

Revision history for this message
Ahmed Kamal (kim0) wrote :

Not sure why you're not able to reproduce it .. I'm hitting this every time .. Here's a full log
http://paste.ubuntu.com/585503/
my host OS is Natty x64 updated to latest

Once I sudo chroot inside, apt-get -f install .. wants to install netbase

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

It is my understanding that any 'Depends:' for --include=alpha,beta packages should be automatically resolved by debootstrap UNLESS --no-resolve-deps is given. So I think what Ahmed has here is a bug in debootstrap.

If I'm off base with that, please feel free to reassign the bug to package 'lxc', with me as owner, and I"ll take Ahmed's patch. I just worry that I'll be papering over a real bug if I do that.

affects: lxc (Ubuntu) → debootstrap (Ubuntu)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Interesting, I'm now getting

W: Failure while configuring base packages. This will be re-attempted up to five times.
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: Failure while configuring base packages. This will be re-attempted up to five times.
W: Failure while configuring base packages. This will be re-attempted up to five times.

But that is immediately followed by

I: Base system installed successfully.

and the resulting container is good.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ah, and booted into the container,

dpkg -l | grep netbase

returns nothing.

tags: added: server-nrs
Revision history for this message
Chuck Short (zulcss) wrote :

This is fixed in natty.

Changed in lxc:
status: New → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Note - this is fixed in natty for lxc. That is a workaround for what I believe is a real bug in debootstrap.

I don't know why the debootstrap bug is marked 'incomplete'. I'm going to mark it 'confirmed'. Please reset if I'm wrong on that, and, if you do, re-ask for whatever info you wanted.

Changed in debootstrap (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

No bug in debootstrap. Rather, netbase's priority has changed from 'required' to 'important'. That makes the difference between minbase pulling it in.

I don't know if this should be deemed a bug in netbase or not.

Changed in debootstrap (Ubuntu):
status: Confirmed → Invalid
Changed in netbase (Ubuntu):
status: New → Incomplete
status: Incomplete → Invalid
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Guess it's actually a dup of bug 86536.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ok, basically resolve_deps() is broken. It gets called once with the $additional (--include=) package list. It calls 'PKGS=$PKGDETAILS GETDEPS $PKGS", in a loop while $PKGS is not empty. But pkgdetails only looks at the first package on the list at a time.

So after the first call to pkgdetails, only the first package in $PKGS was ever looked up, and all others are gone.

Which means only the first package listed ever gets its dependencies looked up.

It's worth seeing if debian's debootstrap has a fix for this. If not, I think the best fix is to change that loop so that we call pkgdetails GETDEPS for one package out of $PKGS at a time (making sure to weed out duplicates at every step of course, but this time by simply using 'without' at the end of each loop against a list of already-looked-up packages) instead of trying to overload $PKGS as it currently does.

Changed in debootstrap (Ubuntu):
status: Invalid → In Progress
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Colin Watson (cjwatson) wrote :

We have exactly the same version of debootstrap as Debian.

Revision history for this message
Colin Watson (cjwatson) wrote :

I'm still working on reproducing this, but I'm not sure I agree with your analysis of what pkgdetails is doing. The relevant bit of code is:

        $in = 1 if (/^Package: (.*)$/ && grep {$_ eq $1} @ARGV);

and that condition is true if the text after "Package: " is equal to any element of @ARGV.

Revision history for this message
Colin Watson (cjwatson) wrote :

The problem is actually that it's running pkgdetails_perl GETDEPS only on the Packages file for main, but inetutils-ping is in universe so it fails to notice its dependencies.

Changed in debootstrap (Ubuntu):
assignee: Serge Hallyn (serge-hallyn) → Colin Watson (cjwatson)
Revision history for this message
Colin Watson (cjwatson) wrote :

In fact, there's a to-do comment for this very thing:

        # XXX: I can't think how to deal well with dependency resolution and
        # lots of Packages files. -- aj 2005/06/12

Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

This is in the queue for after beta-2.

Changed in debootstrap (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, the fix looks sensible to me. I'll test as soon as it hits natty.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Actually, I went ahead and tested on natty. All dependencies were installed.

Revision history for this message
Colin Watson (cjwatson) wrote :

Perfect, thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package debootstrap - 1.0.29ubuntu1

---------------
debootstrap (1.0.29ubuntu1) natty; urgency=low

  * Cherry-pick from trunk:
    - Resolve dependencies from all requested components (LP: #740167).
 -- Colin Watson <email address hidden> Wed, 13 Apr 2011 18:48:24 +0100

Changed in debootstrap (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.