core snap 2.43 introduces `host` line in snap version breaking charms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Layer |
Fix Released
|
Undecided
|
Unassigned | ||
snapd |
Fix Released
|
Critical
|
Samuele Pedroni |
Bug Description
If upgrading to core snap 16-2.43 a new line is introduced in snap version:
π adam@adam-
snap 2.42.5
snapd 2.42.5
series 16
ubuntu 19.10
kernel 5.4.7-050407-
ubuntu@
snap 2.43
snapd 2.43
series 16
ubuntu 18.04
kernel 4.15.0-1054-aws
host amd64 kvm
def _get_snapd_
stdout = subprocess.
['snap', 'version'],
)
version_info = dict(line.split() for line in stdout.
return LooseVersion(
The code will then break due to the host line containing multiple items. This is critical as we are currently blocking snapd team from releasing their next update.
Related branches
- Stuart Bishop: Approve
-
Diff: 11 lines (+1/-1)1 file modifiedreactive/snap.py (+1/-1)
Changed in snapd: | |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in snapd: | |
status: | Triaged → In Progress |
Changed in snapd: | |
status: | In Progress → Fix Committed |
Changed in snapd: | |
assignee: | nobody → Samuele Pedroni (pedronis) |
Changed in snapd: | |
status: | Fix Committed → Fix Released |
The consequence of this change will be that every charm using the snap layer will break when snapd on the host updates to 2.43. The patch will fix the problem for newly built charms, but any charm that's already deployed and doesn't get upgraded to a version with the patch will break.
I think we should apply the patch for future-proofing, but I'd also like to propose that that format of the "host amd64 kvm" line be changed to "host amd64,kvm" (or anything else that results in two "words" per line).