Interface logs from snap change is confusing about connection order

Bug #2063111 reported by Guillaume Beuzeboc

This bug report will be marked for expiration in 47 days if no further activity occurs. (find out why)

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Incomplete
Undecided
Unassigned

Bug Description

I have a snap with two interfaces: network and home. When I install the snap, the "snap change" command give me the following logs:

Done Ensure prerequisites for "test-app" are available
Done Prepare snap "/var/lib/snapd/snaps/.local-install-2303218270.snap" (unset)
Done Mount snap "test-app" (unset)
Done Copy snap "test-app" data
Done Setup snap "test-app" (unset) security profiles
Done Make snap "test-app" (unset) available to the system
Done Automatically connect eligible plugs and slots of snap "test-app" # here it says it connects the interfaces
Done Set automatic aliases for snap "test-app" # now starts doing stuff unrelated to interfaces
Done Setup snap "test-app" aliases
Done Run install hook of "test-app" snap if present
Done Run default-configure hook of "test-app" snap if present
Done Start snap "test-app" (unset) services
Done Run configure hook of "test-app" snap if present
Done Run health check of "test-app" snap
Done Connect test-app:network to snapd:network # only really connecting now the eligible plus and slots
Done Run hook connect-plug-network of snap "test-app"
Done Connect test-app:home to snapd:home
Done Run hook connect-plug-home of snap "test-app"
Done Setup snap "test-app" (x1) security profiles for auto-connections

In the above change we see that it says that it "automatically connect eligible plugs and slot" but only after setting aliases, running install hook, running default-configure hook, running configure hook, running health check it logs the actual connection of the hooks.

This is confusing because it's unclear whether connection of interfaces is happening before or after the install, default configure and configure hook.

The behaviour is similar when removing a snap.

snap version: latest/edge: 2.62+git2116.g3cfa28a

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

Can you explain what information you are looking for?

The tasks list presented by the snap command is a simplification. Within a single change, the tasks are not necessarily executed sequentially like they are presented in the list here. Internally it's more of a directed graph, where tasks have dependencies and some can be even executed in parallel in separate lanes.

Changed in snapd:
status: New → Incomplete
Revision history for this message
Guillaume Beuzeboc (gbeuzeboc) wrote :

The reason why I looked into this log is that I wanted to know if the default-configure hook is called before or after the auto connections and the plug connections hooks.
How can I check such informations?

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.