Interface manager using wrong interface mapper during preseeding

Bug #2044305 reported by Ondrej Kubik
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
Undecided
Samuele Pedroni

Bug Description

When building preseeded images, auto connections defined by the gadget snap are ignored.

At a closer look, this is caused by the wrong slot side mapping. By default "system" slots are mapped to the "core" snap, and on the systems with snapd snap installed, "system" slots are mapped to the snapd snap.
The correct interface mapper is selected at the interface manager start-up by calling m.selectInterfaceMapper(snaps), this inspects the list of the snaps and if any is "snapd" core-snapd mapper is selected instead of the default one.

This logic relies on the fact that the system state already contains the list of the snaps, but this is not the case when building preseeded images, when we start the interface manager before we load the seed, and the snap list is empty.

This results in all the connections to the system slots being mapped to "core" snap, which is not present on the system, so those auto connections defined by the gadget snap are ultimately ignored.

m.selectInterfaceMapper(snaps): https://github.com/snapcore/snapd/blob/master/overlord/ifacestate/ifacemgr.go#L152

Ondrej Kubik (ondrak)
description: updated
description: updated
description: updated
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Thanks for raising this Ondrej

Do you have any workaround for this?

Changed in snapd:
assignee: nobody → Samuele Pedroni (pedronis)
status: New → Triaged
Revision history for this message
Ernest Lotter (ernestl) wrote :

This problem was encountered during demo creation, and the workaround auto connecting all the interfaces through a private store. This workaround is however only suitable for the demo scenario, but it does suggest solving this is not that urgent.

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.