cri-o/server
Samuel Ortiz 4cab8ed06a
sandbox: Use persistent networking namespace
Because they need to prepare the hypervisor networking interfaces
and have them match the ones created in the pod networking
namespace (typically to bridge TAP and veth interfaces), hypervisor
based container runtimes need the sandbox pod networking namespace
to be set up before it's created. They can then prepare and start
the hypervisor interfaces when creating the pod virtual machine.

In order to do so, we need to create per pod persitent networking
namespaces that we pass to the CNI plugin. This patch leverages
the CNI ns package to create such namespaces under /var/run/netns,
and assign them to all pod containers.
The persitent namespace is removed when either the pod is stopped
or removed.

Since the StopPodSandbox() API can be called multiple times from
kubelet, we track the pod networking namespace state (closed or
not) so that we don't get a containernetworking/ns package error
when calling its Close() routine multiple times as well.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-12-12 19:48:23 +01:00
..
apparmor add apparmor build tag and update readme 2016-12-06 11:51:15 +08:00
seccomp *: add seccomp buildtag 2016-11-29 17:01:45 +01:00
config.go Make the profile configurable 2016-12-01 13:26:59 +08:00
container.go server: Export more container metadata for VM containers 2016-11-29 10:24:33 +01:00
container_attach.go server: split containers actions 2016-11-22 18:38:05 +01:00
container_create.go sandbox: Use persistent networking namespace 2016-12-12 19:48:23 +01:00
container_exec.go server: split containers actions 2016-11-22 18:38:05 +01:00
container_execsync.go Fix couple of lint issues 2016-12-08 15:40:59 -08:00
container_list.go store annotations and image for a container 2016-12-12 11:12:03 +01:00
container_portforward.go server: split containers actions 2016-11-22 18:38:05 +01:00
container_remove.go server: split containers actions 2016-11-22 18:38:05 +01:00
container_start.go server: split containers actions 2016-11-22 18:38:05 +01:00
container_status.go server: split containers actions 2016-11-22 18:38:05 +01:00
container_stop.go server: sync ctr state before checking it 2016-12-06 12:39:38 +01:00
container_updateruntimeconfig.go server: split containers actions 2016-11-22 18:38:05 +01:00
image_list.go server: split images actions 2016-11-22 23:05:37 +01:00
image_pull.go server: split images actions 2016-11-22 23:05:37 +01:00
image_remove.go server: split images actions 2016-11-22 23:05:37 +01:00
image_status.go server: split images actions 2016-11-22 23:05:37 +01:00
runtime_status.go server: split containers actions 2016-11-22 18:38:05 +01:00
sandbox.go sandbox: Use persistent networking namespace 2016-12-12 19:48:23 +01:00
sandbox_list.go server: fix pod filter by truncated id 2016-12-06 12:16:30 +01:00
sandbox_remove.go sandbox: Use persistent networking namespace 2016-12-12 19:48:23 +01:00
sandbox_run.go sandbox: Use persistent networking namespace 2016-12-12 19:48:23 +01:00
sandbox_status.go server: split sandboxes actions 2016-11-22 23:23:01 +01:00
sandbox_stop.go sandbox: Use persistent networking namespace 2016-12-12 19:48:23 +01:00
server.go sandbox: Use persistent networking namespace 2016-12-12 19:48:23 +01:00
utils.go add default apparmor profile 2016-12-01 13:26:59 +08:00
version.go version: Fix parsing for gRPC version 2016-11-15 09:26:11 +01:00