Please sign in to comment.
overlord/ifacestate: support implicit slots on snapd
This patch changes the interface manager to support using "snapd" snap as a host for implicit slots. The way this works is as follows. On startup snapd inspects the state and if it sees that the "snapd" snap is installed it chooses it as a host of implicit slots for the lifetime of the snapd process. This is done by setting the snap mapper, early in the interface manager startup code, to CoreSnapdSystemMapper which, as the name suggests, uses "core" in the state, "snapd" in memory and "system" in the API layer. The mapper is the interrogated when adding implicit slots so it is never the case that both core and snapd have implicit slots and contend for auto-connection candidates. This is a simple reuse of the existing mapper and, as the mapper itself, can be re-factored to be a field on the interface manager if we so require. I didn't choose to do this as it would require large and boring changes across the stack, to call various interacting methods on the interface manager instance. Signed-off-by: Zygmunt Krynicki <firstname.lastname@example.org>
- Loading branch information...
Showing with 24 additions and 2 deletions.