[RFC] Improving hardware access for snaps
Jamie Strandboge
jamie at canonical.com
Fri Feb 27 23:09:39 UTC 2015
On 01/30/2015 04:18 PM, Jamie Strandboge wrote:
>
> = Introduction =
> Right now it is too difficult for snaps to access specific hardware, we've known
> that and it is time to improve the situation.
>
> First we want to improve things for people immediately but without sacrificing
> on any of our goals[1]. We'll do this by adjusting snappy to give the snappy
> core user (ie, the one running the 'snappy' command) the ability to add specific
> device access to specific snaps. In essence you install a snap, you run a
> command to give the snap access to a particular device, and you’re done. This
> simple feature should unblock developers and snappy users immediately. Once this
> is done, we can refine the experience to make it even snappier.
>
As of the latest image (tested on kvm/amd64 ubuntu-core 314) this is implemented
with the 'snappy-go' command (for those that don't know, 'snappy-go' is the Go
rewrite of the python 'snappy' command).
After updating to the latest image (sudo snappy update), you can try this today
with:
$ sudo snappy-go hw-assign hello-world /dev/foo
'hello-world' is now allowed to access '/dev/foo'
$ sudo snappy-go hw-info
hello-world: /dev/foo
$ sudo snappy-go hw-unassign hello-world /dev/foo
'hello-world' is no longer allowed to access '/dev/foo'
Currently you are allowed to specify devices in /dev and /sys/devices. Please
report bugs as you find them.
Thanks to Michael Vogt for the changes to snappy-go and everyone else for
contributing feedback. We'll continue to refine the hardware access story now
that phase 1 is completed.
--
Jamie Strandboge http://www.ubuntu.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150227/8c84ae67/attachment.pgp>
More information about the snappy-devel
mailing list