Content interface supports multiple sources, but only one destination
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
High
|
Zygmunt Krynicki |
Bug Description
Take the following slot definition:
slots:
shared:
content: shared
interface: content
read:
- /dir1
- /dir2
Pair it with the following corresponding plug definition:
plugs:
shared:
content: shared
interface: content
target: my-target
Note that the slot supports multiple sources, and the plug supports only a single target. The result isn't particularly useful: first, <slot snap>/dir1 is bind-mounted to <plug snap>/my-target, then <slot snap>/dir2 is bind-mounted again to <plug snap>/my-target. So <plug snap>/my-target is always <slot snap>/dir2.
I look at this interface and can't come up with a rational user expectation for what _should_ happen in this case. Is what's currently happening expected? How do we expect multiple sources to be useful?
description: | updated |
description: | updated |
description: | updated |
description: | updated |
affects: | snapd (Ubuntu) → snapd |
no longer affects: | snappy |
I think this was a bug in the original design. Ideally we would allow some semantics (e.g. unification) or require matching number of targets. Before we decide what that should do I think we should disallow any content slots that have more than one entry in either read or write.