apport_pkgfailure fails to run in python3

Bug #1357034 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray
Trusty
Fix Released
High
Brian Murray

Bug Description

Impact:

apport package failures are not being received during distribution upgrades to Trusty from Precise or Saucy.

Test Case:

1) start the distribution upgrade to trusty (do-release-upgrade)
2) stop the upgrade and change to directory /tmp/ubunut-release-upgrader-xyz
3) start ipython3 or python3

$ ipython3
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: from DistUpgrade import DistUpgradeApport

In [2]: DistUpgradeApport.apport_pkgfailure("whoopsie", "it failed")
WARNING:root:Failed to run apport ('str' does not support the buffer interface)
Out[2]: False

With the version of the ubuntu-release-upgrader from trusty-proposed apport should not fail to run.

I've seen the same error message in some distribution upgrade failures e.g. bug 1350416.

2014-07-30 09:15:35,305 DEBUG running apport_pkgfailure() cgmanager: subprocess installed post-installation script returned error exit status 1
2014-07-30 09:15:36,352 WARNING Failed to run apport ('str' does not support the buffer interface)

This has to do with the log files DistUpgradeApport is adding to the bug report.

Related branches

tags: added: trusty
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

The problem exists with writing the error message to apport's stdin.

Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote :

This should be SRU'ed to Trusty so that upgrades to it produce the package install failures.

Changed in ubuntu-release-upgrader (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:14.10.6

---------------
ubuntu-release-upgrader (1:14.10.6) utopic; urgency=medium

  [ Martin Pitt ]
  * check-new-release-gtk: Fix deprecated Gio.Settings constructor invocation.

  [ Brian Murray ]
  * Fix test failure with DistUpgradeFetcherCore test by switching from
    precise to trusty.
  * DistUpgrade/DistUpgradeApport.py:
    - log that dependency problems are not reported.
    - all apport versions support --tags now so just add dist-upgrade tag
    - remove redundant ErrorMessage string
    - modify Popen call to set universal_newlines=True (LP: #1357034)
 -- Brian Murray <email address hidden> Thu, 14 Aug 2014 15:40:19 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu Trusty):
assignee: nobody → Brian Murray (brian-murray)
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted ubuntu-release-upgrader into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:0.220.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubuntu-release-upgrader (Ubuntu Trusty):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

I've tested the version of the ubuntu-release-upgrader from -proposed (using do-release-upgrade -p) and confirm that with python3 it is possible to run apport_pkgfailure.

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

This bug was fixed in the package ubuntu-release-upgrader - 1:0.220.5

---------------
ubuntu-release-upgrader (1:0.220.5) trusty-proposed; urgency=medium

  * DistUpgrade/DistUpgradeApport.py:
    - modify Popen call to set universal_newlines=True (LP: #1357034)
    - log that dependency problems are not reported.
    - all apport versions support --tags now so just add dist-upgrade tag
    - remove redundant ErrorMessage string
 -- Brian Murray <email address hidden> Fri, 29 Aug 2014 13:09:31 -0700

Changed in ubuntu-release-upgrader (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for ubuntu-release-upgrader has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.