github.com/kubernetes-incubator/cri-o/server/sandbox.go
RunPodSandbox()
oci.NewContainer()
s.runtime.CreateContainer()
s.netPlugin.SetUpPod(netnsPath, podNamespace, id, containerName)
s.runtime.StartContainer()
github.com/rajatchopra/ocicni/ocicni.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CNI spec: https://github.com/containernetworking/cni/blob/master/SPEC.md | |
CNI flannel plugin: https://github.com/containernetworking/cni/blob/master/Documentation/flannel.md | |
Flannel: https://github.com/coreos/flannel | |
Flannel blog entry: https://coreos.com/blog/introducing-rudder/ | |
Main CNI plugins: https://github.com/containernetworking/cni/tree/master/plugins/main | |
CNI APIs: https://github.com/containernetworking/cni/blob/master/libcni/api.go | |
CNI Go interface: https://github.com/containernetworking/cni/blob/master/libcni/api.go#L37 | |
OCI CNI Go package: https://github.com/rajatchopra/ocicni (Used by CRI-O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /etc/ocid.conf | |
[ocid.runtime] | |
runtime="/usr/local/sbin/runc" | |
$ cat /etc/cni/net.d/10-mynet.conf | |
{ | |
"cniVersion": "0.2.0", | |
"name": "mynet", | |
"type": "bridge", | |
"bridge": "cni0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@netnode:/# ip link show dev phy-br-eth2 | |
8: phy-br-eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 | |
link/ether 82:a4:31:98:d2:f3 brd ff:ff:ff:ff:ff:ff | |
root@netnode:/# ip link show dev int-br-eth2 | |
9: int-br-eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 | |
link/ether c6:60:28:48:4f:7d brd ff:ff:ff:ff:ff:ff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /etc/cni/net.d/10-mynet.conf | |
{ | |
"cniVersion": "0.2.0", | |
"name": "mynet", | |
"type": "bridge", | |
"bridge": "cni0", | |
"isGateway": true, | |
"ipMasq": true, | |
"ipam": { | |
"type": "host-local", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
printf "Killing all Docker containers..." | |
docker rm -f $(sudo docker ps -a -q) 2> /dev/null | |
printf "Done\n" | |
printf "Killing all runC containers..." | |
for i in `runc list -q`; do | |
runc kill $i SIGKILL 2> /dev/null | |
runc delete $i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/hypervisor.c b/src/hypervisor.c | |
index 24f7c85..9aedf04 100644 | |
--- a/src/hypervisor.c | |
+++ b/src/hypervisor.c | |
@@ -90,7 +90,7 @@ out: | |
* Use a pci slot available on that bus after adding an offset to take | |
* into account busy slots and the slots used earlier in our qemu options. | |
*/ | |
-#define QEMU_FMT_DEVICE "driver=virtio-net-pci,bus=/pci-lite-host/pcie.0,addr=%x,netdev=%s" | |
+#define QEMU_FMT_DEVICE "driver=virtio-net-pci,bus=/q35-pcihost/pcie.0,addr=%x,netdev=%s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/server/container_create.go b/server/container_create.go | |
index 06c172d..117f386 100644 | |
--- a/server/container_create.go | |
+++ b/server/container_create.go | |
@@ -376,7 +376,7 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string, | |
if containerInfo.Config != nil && len(containerInfo.Config.Config.Cmd) > 0 { | |
processArgs = containerInfo.Config.Config.Cmd | |
} else { | |
- processArgs = []string{"/bin/sh"} | |
+ processArgs = []string{podInfraCommand} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/spec_handlers/mounts.c b/src/spec_handlers/mounts.c | |
index bc172e4..c1362ed 100644 | |
--- a/src/spec_handlers/mounts.c | |
+++ b/src/spec_handlers/mounts.c | |
@@ -20,6 +20,7 @@ | |
#include "spec_handler.h" | |
#include "mount.h" | |
+#include "pod.h" | |
OlderNewer