Dist upgrade from 9.10 to 10.04 LTS fails: apt post-installation failure - getent returns a non-existent admin user when external authentication is used (i.e LDAP)

Bug #579647 reported by Pekka Hämäläinen
148
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Critical
Jean-Baptiste Lallement
Lucid
Fix Released
Undecided
Unassigned

Bug Description

TEST CASE:
This bug is only triggered on e.g. LDAP systems. So we need a regression test to ensure that nothing breaks with it from the
SRU testers:
1. enabled karmic-proposed
2. setup a proxy
3. run update-manager -d
4. upgrade to lucid
5. verify that nothing breaks

- If you have a setup with external authentication, please test the fix in luicd-proposed.
- If you do not have a setup with external authentication, add a non-existent user as 1rst member of the admin group. The /etc/group file must have an entry looking like:
admin:x:111:nonexistentuser,adminuser

**WARNING** do not remove your admin user name from the admin group.

=====
Binary package hint: update-manager

I tried to upgrade my laptop (Acer WLMi5003), running Ubuntu 9.10 to Ubuntu 10.10. I tried to this two times but both times upgrade fails with following information:
___________________________________________________________________
Could not install the upgrades

The upgrade is now aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a).

Please report this bug against the 'update-manager' package and include the files in /var/log/dist-upgrade/ in the bug report.
E:Sub-process /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error code (1)
____________________________________________________________________

All files in the above mentioned directory are in the attached file, upgradeLogs.tar.bz2

Note1: My upgrade path is: 8.10-->9.04-->9.10-->10.10LTS

Br Pekka

Revision history for this message
Pekka Hämäläinen (pekka-hamalainen) wrote :
Revision history for this message
Pekka Hämäläinen (pekka-hamalainen) wrote :

Njah, target is of course 10.04 LTS ... sorry about confusion.

Br Pekka

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

Could you please open a terminal and run:
$ sudo sh -x /var/lib/dpkg/info/apt.postinst configure 0.7.25.3ubuntu7

And attach the output to this report.

Thanks.

affects: update-manager (Ubuntu) → apt (Ubuntu)
Changed in apt (Ubuntu):
status: New → Incomplete
summary: - Dist upgrade from 9.10 to 10.10 LTS fails
+ Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failed
+ with exit status 1
Revision history for this message
Pekka Hämäläinen (pekka-hamalainen) wrote : Re: Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failed with exit status 1

Ok, although bit hard as the laptop doesnt boot normally. I am running now in emergency console. When I give the command I can see the following in screen

+ set -e
+ test -f /etc/apt/trusted.gpg
+ dpkg --compare-versions 0.7.5.3ubuntu7 lt-nl 0.7.5.3ubuntu2
+ set_apt_proxy_from_gconf
+ cut -d, f1
+ cut -d, f4
+ getent group admin
+ admin_user=÷
÷ [ -n + ]
÷ [ -x /usr/bin/sudo ]
÷ [ -z ]
÷ [ -x /usr/bin/gconftool ]
÷ sudo -u + gconftool --get /system/http_proxy/use_http_proxy
+ use=

Thats it. Br Pekka

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I'm really sorry about this bad experience. I have one more request. Could you please provide the output of:
$ getent group admin

The fix is trivial but I'd like to know why the command returns a non-existent user.
I'm turning on the privacy flag.
Thanks in advance.

Changed in apt (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
importance: Undecided → Critical
summary: - Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failed
- with exit status 1
+ Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failure
+ - getent returns a non-existent admin user
visibility: public → private
Revision history for this message
Pekka Hämäläinen (pekka-hamalainen) wrote : Re: Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failure - getent returns a non-existent admin user

Ok. Getent returns
admin:x:115:+

That reminds me that I have ldap in use and all user exept root should come from server. So far ldap installation has worked i.e. in older distros and upgrades, no changes here by me specifally for this 9.10 --> 10.04 upgrade.

Br Pekka

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

That makes sense. Thanks for the information.

Changed in apt (Ubuntu):
status: Incomplete → Triaged
summary: Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failure
- - getent returns a non-existent admin user
+ - getent returns a non-existent admin user when external authentication
+ is used (i.e LDAP)
visibility: private → public
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failure - getent returns a non-existent admin user when external authentication is used (i.e LDAP)

fix committed to ~jibel/apt/bug.579647 : revno 1764

Changed in apt (Ubuntu):
assignee: Michael Vogt (mvo) → Jean-Baptiste Lallement (jibel)
status: Triaged → Fix Committed
tags: added: patch
Michael Vogt (mvo)
Changed in apt (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

I close the maverick task, this only applies on upgrades to lucid.

Changed in apt (Ubuntu Lucid):
status: New → In Progress
Changed in apt (Ubuntu):
status: In Progress → Invalid
Michael Vogt (mvo)
description: updated
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted apt into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in apt (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
summary: - Dist upgrade from 9.10 to 10.10 LTS fails: apt post-installation failure
+ Dist upgrade from 9.10 to 10.04 LTS fails: apt post-installation failure
- getent returns a non-existent admin user when external authentication
is used (i.e LDAP)
Revision history for this message
Pekka Hämäläinen (pekka-hamalainen) wrote :

So farthe fix is Ok.

- I took the karmic backup dump (from which the initial upgrade to lucid failed) and rolled back to that
- I added karmic-proposed to updates
- I selected python-apt, update-manager-core and update-manager from karmic-proposed
- I updated the above
- then I selected upgrade to lucid, no problems related to apt / update-manager any more

More testing info or testing needed by me?

BTW - is the same problem also in upgrade paths like 8.04 --> 10.04??

Br Pekka

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for testing Pekka, that's much appreciated. Yes the same problem exists when upgrading from LTS -> LTS. The new version in Lucid fixes the upgrade from karmic or hardy to lucid.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.7.25.3ubuntu9

---------------
apt (0.7.25.3ubuntu9) lucid-proposed; urgency=low

  * debian/apt.postinst:
    - do not fail if getent returns nothing useful (LP: #579647)
      thanks to Jean-Baptiste Lallement
 -- Michael Vogt <email address hidden> Fri, 14 May 2010 09:40:50 +0200

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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