[Bug 1930901] [NEW] ubuntu upgrade tool silently exits if snapd is not running
Kokil
1930901 at bugs.launchpad.net
Fri Jun 4 15:03:28 UTC 2021
Public bug reported:
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.
** Affects: ubuntu-release-upgrader (Ubuntu)
Importance: Undecided
Status: New
--
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:
New
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