2016年10月24日

runv kill 流程分析

摘要: 1、runv/kill.go Action: func(context *cli.Context) 该函数做的工作很简单,就是通过grpc客户端,发送一个grpc请求而已,如下: 2、runv/containerd/api/grpc/server/server.go func (s *apiServ 阅读全文

posted @ 2016-10-24 14:09 姚灯灯! 阅读(342) 评论(0) 推荐(0) 编辑

2016年10月21日

runv start container 流程分析

摘要: 1、runv/start.go func startContainer(context *cli.Context, container, address string, config *spec.Spec) 该函数所做的工作很简单,首先构建CreateContainerRequest的grpc请求, 阅读全文

posted @ 2016-10-21 17:08 姚灯灯! 阅读(915) 评论(0) 推荐(1) 编辑

runv containerd 流程分析

摘要: 当runv需要启动一个容器的时候,首先需要启动containrd,作为该容器的daemon。因此,启动containerd的相关代码也是从runv/start.go开始。最终,启动containerd的命令行参数如下所示: 1、runv/containerd/containerd.go Action 阅读全文

posted @ 2016-10-21 14:30 姚灯灯! 阅读(953) 评论(0) 推荐(0) 编辑

2016年10月20日

runc kill 和 delete流程分析

摘要: runc kill // kill sends the specified signal (default: SIGTERM) to the container's init process 1、runc/kill.go Action: func(context *cli.Context) erro 阅读全文

posted @ 2016-10-20 16:30 姚灯灯! 阅读(943) 评论(1) 推荐(0) 编辑

2016年10月19日

MIT jos 6.828 Fall 2014 训练记录(lab 5)

摘要: 源代码参见我的github: https://github.com/YaoZengzeng/jos File system perliminaries 我们开发的是一个单用户的操作系统,只提供了足够的保护用于发现bug,但是并没有对恶意的用户之间进行隔离。因此我们的文件系统不支持UNIX中文件所有者 阅读全文

posted @ 2016-10-19 19:59 姚灯灯! 阅读(1615) 评论(0) 推荐(1) 编辑

2016年10月18日

runc的detach, console, tty等相关问题

摘要: runc 端解析: 1、 runc/utils_linux.go func (r *runner) run(config *specs.Process) (int , error) 在该函数中第一次对容器的IO进行了处理,首先调用tty, err := setupIO(process, rootui 阅读全文

posted @ 2016-10-18 17:07 姚灯灯! 阅读(824) 评论(0) 推荐(0) 编辑

2016年10月17日

runc start container流程分析

摘要: 1、runc/start.go Action: func(context *cli.Context) error 该函数首先调用container, err := getContainer(context)获取container信息,接着调用status, err := container.Stat 阅读全文

posted @ 2016-10-17 12:56 姚灯灯! 阅读(1176) 评论(0) 推荐(0) 编辑

2016年10月16日

runc create container 流程分析

摘要: 1、// runc/create.go Action: func(context *cli.Context) error 首先调用spec, err := setupSpec(context)加载配置文件config.json的内容。之后调用status, err := startcontainer 阅读全文

posted @ 2016-10-16 16:33 姚灯灯! 阅读(1356) 评论(0) 推荐(0) 编辑

2016年10月14日

cri-o pod 创建源码分析

摘要: 1、 server/sandbox.go // RunPodSandbox creates and runs a pod-level sandbox func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRe 阅读全文

posted @ 2016-10-14 14:47 姚灯灯! 阅读(787) 评论(0) 推荐(0) 编辑

2016年10月11日

hyperstart 容器创建流程分析

摘要: hyperstart中运行的pod的核心数据结构如下所示: 1、static int hyper_start_pod(char *json, int length): 该函数首先调用hyper_parse_pod(pod, json, length),将从runv传入的json数据解析用来填充pod 阅读全文

posted @ 2016-10-11 16:43 姚灯灯! 阅读(560) 评论(0) 推荐(0) 编辑

导航