I am facing an error that should not be there, assuming I understand the “interface” functionality correctly (it should allow me to invoke and manipulate network namespaces).
snapcraft.yaml
name: hello
base: core18
version: '2.10'
summary: GNU Hello, the "hello world" snap
description: |
GNU hello prints a friendly greeting.
grade: devel
confinement: devmode
apps:
hello:
command: bin/hello
bash:
command: bash
plugs:
- network-bind
- network
- network-control
parts:
gnu-hello:
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
plugin: autotools
gnu-bash:
source: http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
plugin: autotools
Terminal
ubuntu@ip-X-X-X-X:~/workspace/snap/hello$ snapcraft --debug --use-lxd
...
...
Snapping |
Snapped hello_2.10_arm64.snap
ubuntu@ip-X-X-X-X:~/workspace/snap/hello$ sudo snap install ./hello_2.10_arm64.snap --devmode --dangerous
hello 2.10 installed
ubuntu@ip-X-X-X-X:~/workspace/snap/hello$ snap connections hello
Interface Plug Slot Notes
network hello:network :network -
network-bind hello:network-bind :network-bind -
network-control hello:network-control - -
ubuntu@ip-X-X-X-X:~/workspace/snap/hello$ sudo snap connect hello:network-control
ubuntu@ip-X-X-X-X:~/workspace/snap/hello$ snap connections hello
Interface Plug Slot Notes
network hello:network :network -
network-bind hello:network-bind :network-bind -
network-control hello:network-control :network-control manual
ubuntu@ip-X-X-X-X:~/workspace/snap/hello$ hello.bash
bash-4.3$ ip netns ls
bash-4.3$ ip netns add red
mount --make-shared /var/run/netns failed: Operation not permitted