Stuck on applying package profile for servers running 18.04

Bug #1827857 reported by Anton Jansson
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
landscape-client (Ubuntu)
Fix Committed
Medium
Simon Poirier
python-apt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When I apply a package profile to a server, the activity is stuck on 'in progress'. It only happens for servers running on 18.04 LTS. It works for servers running on 14.04 LTS.

I can verify that this is not a connection issue by:
* Manually installing the packages contained in the package profile
* Installing the package profile directly using apt-get.

The landscape server is hosted on-premise using version 18.01.
The 18.04 server is running:
  * The latest version of landscape-client, 18.01-0ubuntu3.3.
  * Ubuntu Server 18.04.02 LTS using 4.15.x kernel.
  * Python version: 3.6.7

Maybe relevant log files:

package-changer.log
2019-05-06 11:59:55,977 WARNING [MainThread] Package data not yet synchronized with server (...)

package-reporter.log
2019-05-06 12:00:07,581 ERROR [MainThread] None
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 29: invalid start byte

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in landscape-client (Ubuntu):
status: New → Confirmed
Bret Barker (noise)
Changed in landscape-client (Ubuntu):
assignee: nobody → Simon Poirier (simpoir)
Simon Poirier (simpoir)
Changed in landscape-client (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → Medium
Revision history for this message
Simon Poirier (simpoir) wrote :

I've been able to reproduce this bug consistently. It appears python3-apt is at cause. If a non-utf8 locale is configured, apt will returned descriptions in the preferred lang/encoding and python3 fails to interpret them as utf8. Python2.7 did ascii conversion, returning "lossy" unicode conversion but not crashing.

$ grep en_US /etc/locale.gen
en_US ISO-8859-1
# en_US.ISO-8859-15 ISO-8859-15
# en_US.UTF-8 UTF-8

$ LANG=en_US python3
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import apt
>>> apt.Cache().get("gosa").versions[0].description
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/apt/package.py", line 627, in description
    dsc = records.long_desc if records is not None else None
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 236: invalid start byte

Revision history for this message
Simon Poirier (simpoir) wrote :
Simon Poirier (simpoir)
Changed in landscape-client (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Simon Poirier (simpoir) wrote :

The issue was fixed in python-apt =2.0.0

Changed in python-apt (Ubuntu):
status: New → 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.