[Bug 1930901] Re: ubuntu upgrade tool silently exits if snapd is not running
Launchpad Bug Tracker
1930901 at bugs.launchpad.net
Thu Jul 1 03:39:01 UTC 2021
This bug was fixed in the package ubuntu-release-upgrader - 1:21.10.4
---------------
ubuntu-release-upgrader (1:21.10.4) impish; urgency=medium
* DistUpgrade/DistUpgradeQuirks.py: log a message when we encounter an
unhandled error checking for snap store connectivity. (LP: #1930901)
* tests/test_sources_list.py: use distro_info to set releases when
performing some upgrade tests.
* DistUpgrade/DistUpgradeQuirks.py: disable the python is python2 quirk.
* DistUpgrade/DistUpgradeCache.py: switch to use finally in distUpgrade so
that error messages in some quirks will be able to work.
-- Brian Murray <brian at ubuntu.com> Wed, 30 Jun 2021 16:24:08 -0700
** Changed in: ubuntu-release-upgrader (Ubuntu)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1930901
Title:
ubuntu upgrade tool silently exits if snapd is not running
Status in ubuntu-release-upgrader package in Ubuntu:
Fix Released
Bug description:
While doing upgrade from 18.04 to 20.04, the upgrade tool (both GUI and do-release-upgrade) was terminating in the middle without any errors.
In /var/log/dist-upgrade/main.log, the only message I could find was "abort called".
I debugged the issue and located the problem in:
DistUpgrade/DistUpgradeQuirks.py:
def _checkStoreConnectivity(self):
""" check for connectivity to the snap store to install snaps"""
res = False
snap_env = os.environ.copy()
snap_env["LANG"] = "C.UTF-8"
connected = Popen(["snap", "debug", "connectivity"], stdout=PIPE,
stderr=PIPE, env=snap_env,
universal_newlines=True).communicate()
When I manually ran:
# snap debug connectivity
The output I got:
error: cannot communicate with server: Get http://localhost/v2/debug?aspect=connectivity: dial unix /run/snapd.socket: connect: no such file or directory
That is because I had snapd disabled.
In _checkStoreConnectivity() code, there is matching condition for
this error. The existing re.search() patterns don't match.
So finally, it does:
if not res:
self.controller.abort() <--- no info for abort
Please add some logging.error() message just before this abort() call.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1930901/+subscriptions
More information about the foundations-bugs
mailing list