Activity log for bug #2015286

Date Who What changed Old value New value Message
2023-04-04 17:46:08 Kiwinote bug added bug
2023-04-04 17:47:09 Kiwinote bug task added ubuntu-advantage-tools (Ubuntu)
2023-04-06 16:50:45 Launchpad Janitor merge proposal linked https://code.launchpad.net/~orndorffgrant/ubuntu/+source/update-manager/+git/update-manager/+merge/440532
2023-04-13 17:39:38 Benjamin Drung update-manager (Ubuntu): importance Undecided High
2023-04-13 17:39:44 Benjamin Drung update-manager (Ubuntu): status New Fix Committed
2023-04-13 21:17:36 Launchpad Janitor update-manager (Ubuntu): status Fix Committed Fix Released
2023-05-18 13:45:06 Renan Rodrigo bug watch added https://github.com/canonical/ubuntu-pro-client/issues/2536
2023-05-18 13:45:13 Renan Rodrigo ubuntu-advantage-tools (Ubuntu): status New Triaged
2023-05-31 17:52:54 Grant Orndorff 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/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 529, in _on_finished self._action_done( File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 414, in _action_done self.window_main.start_available() File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 244, in start_available self.refresh_cache() File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 456, in refresh_cache self._get_ua_security_status() File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 280, in _get_ua_security_status update_result = updates() ^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/updates/v1.py", line 84, in updates return _updates(UAConfig()) ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/updates/v1.py", line 88, in _updates ua_info = get_ua_info(cfg) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/security_status.py", line 195, in get_ua_info status_dict = status(cfg=cfg, show_all=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/status.py", line 380, in status response = _unattached_status(cfg) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/status.py", line 246, in _unattached_status resources = get_available_resources(cfg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 624, in get_available_resources resources = client.request_resources() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 71, in request_resources resource_response, headers = self.request_url( ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/serviceclient.py", line 73, in request_url response, headers = util.readurl( ^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uaclient/util.py", line 322, in readurl resp = request.urlopen(req, timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 519, in open response = self._open(req, data) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain result = func(*args) ^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/urllib/request.py", line 1352, in do_open r = h.getresponse() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse response.begin() File "/usr/lib/python3.11/http/client.py", line 318, in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/http/client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/socket.py", line 706, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/ssl.py", line 1278, in recv_into return self.read(nbytes, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/ssl.py", line 1134, in read return self._sslobj.read(len, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 [ Impact ] `pro api u.pro.packages.updates.v1` was making a network request to contracts.canonical.com to check for an updated list of available services. This could occasionally timeout or fail, causing issues for any program relying on it. The network request itself is unnecessary for the functionality of that api call, so the fix is to not make the network request anymore. [ Test Plan ] Recreate the bug: In a container ``` truncate -s 0 /var/log/ubuntu-advantage.log pro api u.pro.packages.updates.v1 cat /var/log/ubuntu-advantage.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-client/staging apt install ubuntu-advantage-tools truncate -s 0 /var/log/ubuntu-advantage.log pro api u.pro.packages.updates.v1 cat /var/log/ubuntu-advantage.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/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 529, in _on_finished     self._action_done(   File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 414, in _action_done     self.window_main.start_available()   File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 244, in start_available     self.refresh_cache()   File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 456, in refresh_cache     self._get_ua_security_status()   File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 280, in _get_ua_security_status     update_result = updates()                     ^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/updates/v1.py", line 84, in updates     return _updates(UAConfig())            ^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/api/u/pro/packages/updates/v1.py", line 88, in _updates     ua_info = get_ua_info(cfg)               ^^^^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/security_status.py", line 195, in get_ua_info     status_dict = status(cfg=cfg, show_all=True)                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/status.py", line 380, in status     response = _unattached_status(cfg)                ^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/status.py", line 246, in _unattached_status     resources = get_available_resources(cfg)                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 624, in get_available_resources     resources = client.request_resources()                 ^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 71, in request_resources     resource_response, headers = self.request_url(                                  ^^^^^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/serviceclient.py", line 73, in request_url     response, headers = util.readurl(                         ^^^^^^^^^^^^^   File "/usr/lib/python3/dist-packages/uaclient/util.py", line 322, in readurl     resp = request.urlopen(req, timeout=timeout)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen     return opener.open(url, data, timeout)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/urllib/request.py", line 519, in open     response = self._open(req, data)                ^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/urllib/request.py", line 536, in _open     result = self._call_chain(self.handle_open, protocol, protocol +              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain     result = func(*args)              ^^^^^^^^^^^   File "/usr/lib/python3.11/urllib/request.py", line 1391, in https_open     return self.do_open(http.client.HTTPSConnection, req,            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/urllib/request.py", line 1352, in do_open     r = h.getresponse()         ^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse     response.begin()   File "/usr/lib/python3.11/http/client.py", line 318, in begin     version, status, reason = self._read_status()                               ^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/http/client.py", line 279, in _read_status     line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/socket.py", line 706, in readinto     return self._sock.recv_into(b)            ^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/ssl.py", line 1278, in recv_into     return self.read(nbytes, buffer)            ^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/lib/python3.11/ssl.py", line 1134, in read     return self._sslobj.read(len, buffer)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
2023-06-23 03:43:09 Ubuntu Archive Robot bug added subscriber Lucas Kanashiro
2023-06-23 11:41:10 Robie Basak ubuntu-advantage-tools (Ubuntu Lunar): status New Fix Committed
2023-06-23 11:41:11 Robie Basak bug added subscriber Ubuntu Stable Release Updates Team
2023-06-23 11:41:23 Robie Basak bug added subscriber SRU Verification
2023-06-23 11:41:25 Robie Basak tags verification-needed verification-needed-lunar
2023-06-23 11:41:59 Robie Basak ubuntu-advantage-tools (Ubuntu Kinetic): status New Fix Committed
2023-06-23 11:42:02 Robie Basak tags verification-needed verification-needed-lunar verification-needed verification-needed-kinetic verification-needed-lunar
2023-06-23 11:42:28 Robie Basak ubuntu-advantage-tools (Ubuntu Jammy): status New Fix Committed
2023-06-23 11:42:30 Robie Basak tags verification-needed verification-needed-kinetic verification-needed-lunar verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar
2023-06-23 11:42:51 Robie Basak ubuntu-advantage-tools (Ubuntu Focal): status New Fix Committed
2023-06-23 11:42:53 Robie Basak tags verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar
2023-06-23 11:43:20 Robie Basak ubuntu-advantage-tools (Ubuntu Bionic): status New Fix Committed
2023-06-23 11:43:23 Robie Basak tags verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar
2023-06-23 11:43:46 Robie Basak ubuntu-advantage-tools (Ubuntu Xenial): status New Fix Committed
2023-06-23 11:43:48 Robie Basak tags verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar verification-needed-xenial
2023-06-28 07:55:31 Launchpad Janitor ubuntu-advantage-tools (Ubuntu): status Triaged Fix Released
2023-07-03 14:03:31 Grant Orndorff attachment added verification-2015286.tar.gz https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/2015286/+attachment/5683564/+files/verification-2015286.tar.gz
2023-07-03 14:03:52 Grant Orndorff tags verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar verification-needed-xenial verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic verification-done-lunar verification-done-xenial
2023-07-11 01:44:07 Launchpad Janitor ubuntu-advantage-tools (Ubuntu Xenial): status Fix Committed Fix Released
2023-07-11 01:44:19 Chris Halse Rogers removed subscriber Ubuntu Stable Release Updates Team
2023-07-11 01:44:37 Launchpad Janitor ubuntu-advantage-tools (Ubuntu Bionic): status Fix Committed Fix Released
2023-07-11 01:44:54 Launchpad Janitor ubuntu-advantage-tools (Ubuntu Focal): status Fix Committed Fix Released
2023-07-11 01:45:10 Launchpad Janitor ubuntu-advantage-tools (Ubuntu Jammy): status Fix Committed Fix Released
2023-07-11 01:45:33 Launchpad Janitor ubuntu-advantage-tools (Ubuntu Kinetic): status Fix Committed Fix Released
2023-07-11 01:45:43 Launchpad Janitor ubuntu-advantage-tools (Ubuntu Lunar): status Fix Committed Fix Released
2023-08-02 13:27:52 Launchpad Janitor merge proposal linked https://code.launchpad.net/~anthonywong/ubuntu/+source/update-manager/+git/update-manager/+merge/448264