update-manager unusable due to TimeoutError in uaclient
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Undecided
|
Unassigned | ||
update-manager (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
[ Impact ]
`pro api u.pro.packages.
[ Test Plan ]
Recreate the bug:
In a container
```
truncate -s 0 /var/log/
pro api u.pro.packages.
cat /var/log/
# See logs about network requests
```
To see the fix, install the new version (currently in staging PPA, but for SRU verification it will be in -proposed) and try again
```
add-apt-repository ppa:ua-
apt install ubuntu-
truncate -s 0 /var/log/
pro api u.pro.packages.
cat /var/log/
# No logs about network requests
```
[ Where problems could occur ]
This involves a refactor to the implementation of this API function. If there was an error, it could bubble up to any callers of the function.
[ Original Description ]
On a fairly standard installation of lunar (ie no Ubuntu Pro linked etc), the update-manager can become a non-functional window when uaclient isn't behaving. This manifests itself in a greyed-out 'checking for updates' window which doesn't respond to any clicks and can only be closed by ending the process in the system-monitor.
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
update_result = updates()
File "/usr/lib/
return _updates(
File "/usr/lib/
ua_info = get_ua_info(cfg)
File "/usr/lib/
status_dict = status(cfg=cfg, show_all=True)
File "/usr/lib/
response = _unattached_
File "/usr/lib/
resources = get_available_
File "/usr/lib/
resources = client.
File "/usr/lib/
resource_
File "/usr/lib/
response, headers = util.readurl(
File "/usr/lib/
resp = request.
File "/usr/lib/
return opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
result = self._call_
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
r = h.getresponse()
File "/usr/lib/
response.
File "/usr/lib/
version, status, reason = self._read_status()
File "/usr/lib/
line = str(self.
File "/usr/lib/
return self._sock.
File "/usr/lib/
return self.read(nbytes, buffer)
File "/usr/lib/
return self._sslobj.
TimeoutError: The read operation timed out
In my opinion any misbehaving of the Ubuntu Pro integration in update-manager (in this specific case probably a 'temporary' server issue) shouldn't cause update-manager to become dysfunctional, especially to those not subscribed to Ubuntu Pro.
I have recently seen:
- update-manager unable to install updates for over a month ( LP: #2008280 )
- this issue,
- if you turn wi-fi off and open update-manager, then after clicking ok the update-manager window becomes unresponsive ( LP: #2015113 )
- and undoubtedly there are others to come as this is all without uaclient needing to do anything (ie I have no subscription and lunar is not yet released)
Please consider how you might make the integration of Ubuntu Pro into update-manager more robust, so that any issues in uaclient don't stop update-manager from functioning correctly. (ie presumably using a try/except around the uaclient call is not unreasonable - you might loose track of any errors that are occurring, but keeping update-manager working (aka allowing people to install their system updates) is a much higher priority)
Thanks
Related branches
- Julian Andres Klode: Pending requested
- Todd: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 111 lines (+62/-0) (has conflicts)3 files modified.bzrignore (+11/-0)
UpdateManager/UpdatesAvailable.py (+42/-0)
po/update-manager.pot (+9/-0)
- Benjamin Drung (community): Approve
- Julian Andres Klode (community): Approve
- Robert Ancell: Pending requested
-
Diff: 36 lines (+12/-2)2 files modifiedUpdateManager/UpdateManager.py (+5/-2)
debian/changelog (+7/-0)
Changed in update-manager (Ubuntu): | |
importance: | Undecided → High |
status: | New → Fix Committed |
description: | updated |
This bug was fixed in the package update-manager - 1:23.04.2
---------------
update-manager (1:23.04.2) lunar; urgency=medium
[ Benjamin Drung ]
* Update Vcs-* links to git
* Run nosetests in verbose mode
[ Grant Orndorff ]
* Tolerate errors from uaclient updates function (LP: #2015113, #2015286)
* Fix package name field for uaclient updates
-- Benjamin Drung <email address hidden> Thu, 13 Apr 2023 19:25:57 +0200