ufw crashes in trigger on intrepid->jaunty upgrade

Bug #337705 reported by Michael Vogt on 2009-03-04
32
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
Undecided
Unassigned
ufw (Ubuntu)
Undecided
Jamie Strandboge

Bug Description

Binary package hint: ufw

While doing a upgrade from intrepid to jaunty with a stock ubuntu-desktop install ufw crashed in
the trigger processing. I attach the full logs, but it seems like the relveant lines are:

term.log:
-----------
Processing triggers for ufw ...
 ...
Traceback (most recent call last):
  File "/usr/sbin/ufw", line 25, in <module>
    import ufw.frontend
ImportError: No module named ufw.frontend
dpkg: subprocess post-installation script returned error exit status 1

_usr_sbin_ufw.0.crash:
----------------------------
Traceback:
 Traceback (most recent call last):
   File "/usr/sbin/ufw", line 25, in <module>
     import ufw.frontend
 ImportError: No module named ufw.frontend

Michael Vogt (mvo) wrote :
Michael Vogt (mvo) wrote :
Michael Vogt (mvo) wrote :

It seem like the problem is that our default python packaging makes it difficult to have stuff available during upgrade.

The attached branch should fix this (its against lp:ufw, I also checked lp:ufw/ufw-0.27-jaunty but that seems to not have any a different debian/changelog than in lp:ufw). I also attach it as a patch file (just in case I picked the wrong tree).

I have not yet tested the upgrade with the fix, but it will do no harm to add it even if it is not sufficient (but I think it is).

Changed in ufw:
assignee: nobody → jdstrand
status: New → In Progress
Jamie Strandboge (jdstrand) wrote :

Thanks for the patch Michael! I have committed the fix and uploaded to Jaunty.

Changed in ufw:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ufw - 0.27~r416-0ubuntu3

---------------
ufw (0.27~r416-0ubuntu3) jaunty; urgency=low

  * debian/rules: adjust dh_pycentral call to make sure dist-package symlinks
    are available at dpkg unpack. Patch thanks to Michael Vogt (LP: #337705)

 -- Jamie Strandboge <email address hidden> Wed, 04 Mar 2009 09:20:11 -0600

Changed in ufw:
status: Fix Committed → Fix Released
Michael Vogt (mvo) wrote :

Unfortunately this needs to be reopend. The patch is not enough to fix the problem:

In line 2066 at in the terminal log the crash happens:
Processing triggers for ufw ...
 ...
Traceback (most recent call last):
  File "/usr/sbin/ufw", line 25, in <module>
    import ufw.frontend
ImportError: No module named ufw.frontend
dpkg: subprocess post-installation script returned error exit status 1

At this point ufw is still the intrepid version (ufw gets upgraded in line 2481).

The default python version gets upgraded in line 1238 so python2.6 is the new
default but ufw has no modules for that yet.

Changed in ufw:
status: Fix Released → Triaged
Matthias Klose (doko) wrote :

> It seem like the problem is that our default python packaging makes
> it difficult to have stuff available during upgrade.

I don't see this. could you elaborate?

some issues:

 - the postinst script tries to restart ufw, before the symlinks are created, however this should not be an issue, now that the symlinks are included in the 2.6 version. the intrepid package has a problem with this, afaics.

 - Is there a need for placing ufw's library files in sys.path?

Matthias Klose (doko) wrote :

one more:

 - doesn't ufw need a restart, when the python runtime is updated?
   it doesn't have .rtupdate scripts like hplip has.

Michael Vogt (mvo) wrote :

This is a ordering problem and a bit tricky. One way is to have the intrepid version have a dependency like:
"Depends: ..., python (<< 2.6), ..."
This is bad because it we can not force people to have this update in intrepid available (e.g. people with
just the intrepid CD but no network).

A alternative solution is to make python (in jaunty) conflict with ufw (<< 0.26) (or 0.27 when its released).
I tested both solutions with "apt-get dist-upgrade -s" and the ordering looks ok now. I run a upgrade test with it
now and it looks ok ask doko to consider it as a workaround.

Jamie Strandboge (jdstrand) wrote :

Mathias:
 - Is there a need for placing ufw's library files in sys.path? Other packages besides ufw use the ufw library files, which is why I put them there. If there is a more appropriate place, I am open to moving them.

 - doesn't ufw need a restart, when the python runtime is updated? Perhaps I do not understand the question, but ufw is not a daemon, it is a script that loads iptables rules, among other things, so there is nothing to 'restart'. I am not familiar with .rtupdate scripts-- is this something I should look at?

Jamie Strandboge (jdstrand) wrote :

I looked at the rtupdate scripts, and http://wiki.debian.org/DebianPython/NewPolicy states I should only need them if I don't use python-central (which I do) or python-support.

Michael Vogt (mvo) wrote :

The workaround with the python conflicts works, it gives us the right ordering now. Another alternative would be to make update-manager kill the triggers file in /var/lib/dpkg/info/ufw.triggers - but that is even more of a hack than the conflict in python IMO.

Michael Vogt (mvo) on 2009-03-04
Changed in python-defaults:
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-defaults - 2.6.1-0ubuntu3

---------------
python-defaults (2.6.1-0ubuntu3) jaunty; urgency=low

  * add versionized conflict against ufw for lower version than jaunty
    to ensure that the new versin of ufw (with python2.6 modules)
    is avaialble when the new python2.6 gets installed. this works
    around a trigger failure in intrepid->jaunty upgrade (LP: #337705)

 -- Michael Vogt <email address hidden> Wed, 04 Mar 2009 21:37:16 +0100

Changed in python-defaults:
status: In Progress → Fix Released
Changed in ufw:
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ufw - 0.27~r416-0ubuntu5

---------------
ufw (0.27~r416-0ubuntu5) jaunty; urgency=low

  * Don't traceback when ufw modules aren't available (LP: #337705)

 -- Jamie Strandboge <email address hidden> Wed, 04 Mar 2009 15:10:13 -0600

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

Duplicates of this bug

Other bug subscribers