snap connections doesn't work as expected when interface attributes change

Bug #1849564 reported by Jamie Strandboge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
High
Paweł Stołowski

Bug Description

In looking at https://forum.snapcraft.io/t/allow-optical-drive-write-support-for-makemkv/13807/2, I issued the following snap declaration for makemkv:

plugs:
  hardware-observe:
    allow-auto-connection: true
  optical-drive:
    allow-connection: true
    deny-auto-connection:
      plug-attributes:
        write: true

I then install makemkv from 'stable':

$ sudo snap install makemkv
makemkv 1.14.5 from Daniel Llewellyn (diddledan) installed

which has the following snap.yaml:
apps:
  makemkv:
  plugs:
  - optical-drive

$ snap connections makemkv|grep optical
optical-drive makemkv:optical-drive :optical-drive -

So far so good. Now, if I 'snap refresh makemkv --edge' I see something weird with snap connections:

$ sudo snap refresh makemkv --edge
makemkv (edge) 1.14.5 from Daniel Llewellyn (diddledan) refreshed

which has the following snap.yaml:

plugs:
  optical-write:
    interface: optical-drive
    write: true
apps:
  makemkv:
    plugs:
    - optical-write

$ snap connections makemkv|grep optical
optical-drive makemkv:optical-drive :optical-drive -
optical-drive makemkv:optical-write - -

So, 'optical-drive' is shown as connected when it isn't even plugged, and optical-write is disconnected (as it should be).

But, the interface is not actually connected:
$ grep optical /var/lib/snapd/apparmor/profiles/snap.makemkv.*
$

This is likely related to bug 1848516 but filing separately since it is a different variation (ie, the interface isn't 'dropped' from the snap.yaml per se since optical-write is there).

summary: - snap refresh doesn't work as expected when interface attributes change
+ snap connections doesn't work as expected when interface attributes
+ change
Zygmunt Krynicki (zyga)
Changed in snapd:
status: New → Confirmed
importance: Undecided → High
Changed in snapd:
assignee: nobody → Paweł Stołowski (stolowski)
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.