On Tue, 2017-02-21 at 12:39 +0100, Luca Dionisi wrote:
> Are network namespaces supported in snaps?
> 
> In my RaspberryPi3 I have a snap which has been installed with --devmode.
> Inside the snap I have exposed the command 'bash'. I exec that bash as
> root. Then I try to create a network namespace. It fails.
> 
> $ sudo myapp.bash
> # ip netns add ns0
> open("/proc/self/ns/net"): Permission denied
> #
> 

You are hitting this bug:
https://bugs.launchpad.net/apparmor/+bug/1648903

The workaround is to declare in your snap 'plugs: [ network-control ]' and to
connect the interface with 'sudo snap connect myapp:network-control' even when
using devmode. After that you should be able to use 'ip netns' within your snap.

-- 
Jamie Strandboge             | http://www.canonical.com

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to