crashes if admin is not on the system and it can not be added

Bug #241723 reported by Michael Vogt on 2008-06-20
6
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

Binary package hint: update-manager

Update-manager adds the "admin" group if it is not on the system. If that fails, update-manager will crash:

TEST CASE:
1. use dapper (server so that the upgrade is quicker)
2. run "sudo do-release-upgrade -d"
3. wait for it to finish running and wait for cleanup, do *not* continue with the cleanup just yet
4.do "chattr +i /etc/group" to simulate unwritable group file
5. procceed with the cleanup and watch it fails

6. repeat steps 1-4 but run "sudo do-release-upgrade -d --proposed" this time
7. watch it work

2008-06-20 17:53:12,564 WARNING System has no admin group ('getgrnam(): name not found: admin')
2008-06-20 17:53:12,725 ERROR not handled expection:
Traceback (most recent call last):

  File "./dist-upgrade.py", line 60, in ?
    app.run()

  File "/tmp/tmpuqMuL-/DistUpgradeController.py", line 1580, in run
    self.fullUpgrade()

  File "/tmp/tmpuqMuL-/DistUpgradeController.py", line 1568, in fullUpgrade
    self.doPostUpgrade()

  File "/tmp/tmpuqMuL-/DistUpgradeController.py", line 998, in doPostUpgrade
    func()

  File "/tmp/tmpuqMuL-/DistUpgradeController.py", line 1153, in from_dapperQuirks
    self._checkAdminGroup()

  File "/tmp/tmpuqMuL-/DistUpgradeController.py", line 1136, in _checkAdminGroup
    admin_group = grp.getgrnam("admin").gr_mem

KeyError: 'getgrnam(): name not found: admin'

Michael Vogt (mvo) on 2008-06-20
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.91.5

---------------
update-manager (1:0.91.5) intrepid; urgency=low

  * DistUpgrade/DistUpgradeController.py:
    - support "old-releases.ubuntu.com" as a valid mirror and
      auto transition from that to the regular archive
      (LP: #235527)
    - add extra paraonoia when adding a missing admin group
      (thanks to LaMont Jones) LP: #241723
  * UpdateManager/ChangelogViewer.py:
    - support "exo-open" (xfce) too (LP: #240473)
  * DistUpgrade/mirrors.cfg:
    - remove ftp.caliu.info (LP: #231966)
  * DistUpgrade/DistUpgradeController.py:
    - fix typo and unfuzzy translations (LP: #220505)
  * UpdateManager/UpdateManager.py, data/update-manager.schemas.in:
    - provide a gconf key /apps/update-manager/autoclose_install_window
      to make it possible to prevent automatic closing of the installation
      window (LP: #183209)
  * DistUpgrade/DistUpgrade.cfg.dapper:
    - remove ports.ubuntu.com from powerpc, it is not available on
      ports.ubuntu.com but on archive.ubuntu.com (LP: #241729)

 -- Michael Vogt <email address hidden> Fri, 20 Jun 2008 20:02:50 +0200

Changed in update-manager:
status: New → Fix Released
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in update-manager:
status: New → Fix Committed
Martin Pitt (pitti) wrote :

Copied to hardy-updates. It has been verified that the new update-manager can successfully upgrade 7.10 to 8.04 without noticeable regressions. Unfortunately it could not be verified from a third party that this bug is really fixed, but we strongly believe it is. If you still have problems, please report back here. Thank you!

Changed in update-manager:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers