snap connections/interfaces shows dropped interfaces as connected after refresh
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
High
|
Paweł Stołowski |
Bug Description
I dropped pulseaudio and added audio-playback in chocolate-
Reproducing in a vm (eg, bionic), first make sure core is up to date (need at least 2.41 for audio-playback):
$ sudo snap refresh core
Then install a revision of chocolate-
$ sudo snap install --beta chocolate-
chocolate-
$ snap list chocolate-
Name Version Rev Tracking Publisher Notes
chocolate-
Verify the snap plugs pulseaudio:
$ grep pulseaudio /snap/chocolate
- pulseaudio
...
Verify the snap does not plugs audio-playback:
$ grep audio-playback /snap/chocolate
$
Verify that the apparmor profile has pulseaudio:
$ grep '# Allow communicating with pulseaudio service for playback and, on some' /var/lib/
# Allow communicating with pulseaudio service for playback and, on some
Verify that the apparmor profile does not have audio-playback:
$ grep '# Allow communicating with pulseaudio service on the desktop in classic distro' /var/lib/
$
See what 'snap connections' and 'snap interfaces' have to say:
$ snap connections chocolate-
pulseaudio chocolate-
$ snap interfaces chocolate-
:pulseaudio chocolate-
Ok, good, everything worked as expected.
Now, refresh to a revision that drops pulseaudio in favor of audio-playback:
$ sudo snap refresh --edge chocolate-
chocolate-
$ snap list chocolate-
Name Version Rev Tracking Publisher Notes
chocolate-
Verify the profile does not plugs pulseaudio:
$ grep pulseaudio /snap/chocolate
$
Verify the snap does plugs audio-playback:
$ grep audio-playback /snap/chocolate
- audio-playback
...
Verify that the apparmor profile does not have pulseaudio:
$ grep '# Allow communicating with pulseaudio service for playback and, on some' /var/lib/
$
Verify that the apparmor profile does have audio-playback:
grep '# Allow communicating with pulseaudio service on the desktop in classic distro' /var/lib/
# Allow communicating with pulseaudio service on the desktop in classic distro.
See what 'snap connections' and 'snap interfaces' have to say:
$ snap connections chocolate-
pulseaudio chocolate-
$ snap interfaces chocolate-
:pulseaudio chocolate-
The above demonstrates that after refresh, though the policy on disk correctly uses audio-playback instead of pulseaudio, 'snap connections' and 'snap interfaces' are erroneously reporting that pulseaudio is still connected.
If I remove the old revision, it makes no difference:
$ sudo snap remove --revision 77 chocolate-
chocolate-
$ snap connections chocolate-
pulseaudio chocolate-
$ snap interfaces chocolate-
:pulseaudio chocolate-
Oddly, after I remove the snap completely and then install with only the latest revision, things are still wrong:
$ sudo snap remove --purge chocolate-
chocolate-
$ sudo snap install chocolate-
chocolate-
$ snap connections chocolate-
pulseaudio chocolate-
$ snap interfaces chocolate-
:pulseaudio chocolate-
Changed in snapd: | |
importance: | Undecided → Medium |
importance: | Medium → High |
Changed in snapd: | |
status: | New → Confirmed |
Changed in snapd: | |
assignee: | nobody → Paweł Stołowski (stolowski) |
Changed in snapd: | |
status: | Confirmed → In Progress |
Changed in snapd: | |
status: | In Progress → Fix Committed |
Changed in snapd: | |
status: | Fix Committed → Fix Released |
Please also see https:/ /bugs.launchpad .net/snapd/ +bug/1849564, which seems to be a variation of this bug.