Namespaces for failed snap installations are not discarded

Bug #1815722 reported by glancr team
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Medium
Zygmunt Krynicki

Bug Description

When a snap installation fails e. g. due to errors in the `install` hook, and this snap uses the layouts feature, namespaces that were created for this snap are not discarded after snapd aborts the installation process.

Subsequent attempts to install a snap with the same name, i. e. a new fixed revision, will throw “No such file or directory” when the snap tries to access layout-mapped paths.

Installation works fine after rebooting the system, which presumably discards namespaces.

Reference: https://forum.snapcraft.io/t/snap-layouts/7207/15?u=tobias

Zygmunt Krynicki (zyga)
affects: snapcraft → snapd
Changed in snapd:
status: New → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I wrote a regression test for this issue. Working on a fix now.

Changed in snapd:
importance: Undecided → Medium
milestone: none → 2.37.3
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Zygmunt Krynicki (zyga)
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.