network handling snap on core16 with base core18 fails to access /var/lib/dhcp

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

Bug Description

snap: 2.43.2
core: 16-2.43.2

network handling snap with network-control interface
base: core18

in context of the snap /var/lib/dhcp directory is not mapped to host's /var/lib/dhcp
Additionally it's read only, so snap cannot use it, even though network-control interface allows so

This bug is not related to any particular project, it's been discovered while debugging networking snap.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

For context, when snapd was first ported from 15.xx releases, that is when 16.04 first shipped, ubuntu-core devices crafted their own mount namespace and that same namespace was reused for snaps running in that environment. When snapd introduced support for bases and subsequently core18 snap was available on devices that otherwise booted with core (core16), this was changed so that snapd always crafts a pristine mount namespace that is not dependent on the initial mount namespace that snapd operates in.

Currently there are two supported execution modes, called legacy, which reuses real /, and is only used for ubuntu-core devices running with core at boot base and running a core-based snap, and normal, used in all classic devices and all core18 devices and core16 devices running snaps with another boot base.

We can add /var/lib/dhcp to the set of directories bridged over from the host. I will let mvo decide on release priority and design though.

Changed in snapd:
status: New → Confirmed
summary: - network handling snap on core16 with base core18 fails to acmes
+ network handling snap on core16 with base core18 fails to access
/var/lib/dhcp
Ondrej Kubik (ondrak)
description: updated
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This directory is described by the network-control test and the fix is simple and obvious. I wrote a regression test and will follow up with a patch tomorrow.

Changed in snapd:
status: Confirmed → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
milestone: none → 2.44
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Zygmunt Krynicki (zyga)
Changed in snapd:
status: In Progress → Fix Committed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This was fixed in snapd 2.44. Marking as such.

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.