base core16->core18 migration

Bug #1819875 reported by Ondrej Kubik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Zygmunt Krynicki

Bug Description

snapd: 2.37.2
Ubuntu 18.04
core snap: 6405
kernel: 4.15.0-29-generic

Preconditions:
 Snap updated base from core16 to core18
 Snap has one or more services

Expected result:
 snap refreshes to new revision using new core18 base

Actual result:
 snap refresh to new revision fails as it is using still core16 base
 post-refresh hook fails as executables from snap package fail to run against wrong glibc
 if there is no post-refresh hook snap refreshes to new revision, but services do not start for same reason of glibs mismatch

Closer look revealed that service forked additional long running process which was dangling around and was preventing successful namespace unmount.
While best is to define additional process as service to provide better way to control its lifecycle, we probably still need more aggressive process control/kill when moving between snap revisions so we are not leaking dangling processes from previous revisions

Tags: lxd
Ondrej Kubik (ondrak)
description: updated
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I would add that any snap refresh that changes base snap name must be handled with dedicated logic that we currently don't have a design for. It is unacceptable to run a snap against different base snap than a snap has declared to use.

Changed in snappy:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Ondrej Kubik (ondrak) wrote :
Zygmunt Krynicki (zyga)
affects: snappy → snapd
Zygmunt Krynicki (zyga)
Changed in snapd:
status: Confirmed → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
milestone: none → 2.39
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've closed 6671 and re-opened as https://github.com/snapcore/snapd/pull/6673

Revision history for this message
Stéphane Graber (stgraber) wrote :

This is preventing LXD from moving to core16 to core18 (roadmap item).

tags: added: lxd
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Zygmunt Krynicki (zyga)
Changed in snapd:
milestone: 2.39 → 2.40
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This has just landed into master. The 2.40 backport will be released separately by mvo as a part of the 2.40 cycle.

Changed in snapd:
status: In Progress → Fix Committed
Zygmunt Krynicki (zyga)
Changed in snapd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.