Interface logs from snap change is confusing about connection order
This bug report will be marked for expiration in 47 days if no further activity occurs. (find out why)
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/
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-
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.
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.