12 2016 档案

runv nslistener源码分析
摘要:nslistener的作用实质上就是将新的namespace里的veth网卡的配置信息通过proxy进程传输出来,并且利用该信息对tap进行相同的配置,最终用tap模拟新的namespace里的veth,将流量导入虚拟机的tap网卡中。 NetlinkUpdate的数据结构如下所示: nsListe 阅读全文

posted @ 2016-12-29 10:07 姚灯灯! 阅读(458) 评论(0) 推荐(0)

ClearContainer 网络部分源码分析
摘要:// cc-oci-runtime/src/oci.c /*! * Create the state file, apply mounts and run hooks, but do not start the VM */ gboolean cc_oci_create(struct cc_oci_c 阅读全文

posted @ 2016-12-28 15:37 姚灯灯! 阅读(377) 评论(0) 推荐(0)

hyper容器网络相关源码分析
摘要:一、网络初始化 1、hyperd/daemon/daemon.go func NewDaemon(cfg *apitypes.HyperConfig) (*Daemon, error) 该函数直接调用daemon.initNetworks(cfg) 2、hyperd/daemon/daemon.go 阅读全文

posted @ 2016-12-27 16:43 姚灯灯! 阅读(569) 评论(0) 推荐(0)

利用setns()将进程加入一个新的network namespace
摘要:1、首先使用docker创建一个容器,并获取该容器的network namespace 由上可知,该容器的network namespace在/proc/3656/ns/net 2、启动一个程序,加入该network namespace,并且exec为bash,查看运行效果 程序文件如下所示: 3、 阅读全文

posted @ 2016-12-27 14:37 姚灯灯! 阅读(2593) 评论(0) 推荐(0)

frakti && RunPodSandbox 源码分析
摘要:listen = flag.String("listen", "/var/run/frakti.sock", "...") hyperEndpoint = flag.String("hyper-endpoint", "127.0.0.1:8080", "...") streamingServerPo 阅读全文

posted @ 2016-12-23 13:55 姚灯灯! 阅读(683) 评论(0) 推荐(0)

Makefile 编写 tips
摘要:1、变量赋值 VARIABLE = value #在执行时扩展,允许递归扩展 VARIABLE := value #在定义时扩展 VARIABLE ?= value #只有在该变量为空时才设置该值 VARIABLE += value #将值追加到变量尾端 2、自动变量 $@指代当前目标,就是Make 阅读全文

posted @ 2016-12-16 10:28 姚灯灯! 阅读(152) 评论(0) 推荐(0)

《In Search of an Understandable Consensus Algorithm》翻译
摘要:Abstract Raft是一种用于管理replicated log的consensus algorithm。它能和Paxos产生同样的结果,有着和Paxos同样的性能,但是结构却不同于Paxos;它让Raft比Paxos更易于理解,并且也为用它构建实际的系统提供了更好的基础。为了增强可理解性,Ra 阅读全文

posted @ 2016-12-13 21:55 姚灯灯! 阅读(3957) 评论(1) 推荐(3)

《Paxos Made Simple》翻译
摘要:1 Introduction 可能是因为之前的描述对大多数读者来说太过Greek了,Paxos作为一种实现容错的分布式系统的算法被认为是难以理解的。但事实上,它可能是最简单,最显而易见的分布式算法了。它的本质其实就是共识算法——the "synod" algorithm of。在下一节中我们将展示, 阅读全文

posted @ 2016-12-09 17:38 姚灯灯! 阅读(8291) 评论(1) 推荐(1)

MIT 6.824 : Spring 2015 lab3 训练笔记
摘要:摘要: 源代码参见我的github:https://github.com/YaoZengzeng/MIT-6.824 Lab3: Paxos-based Key/Value Service Introduction 在Lab2中我们依靠单个的master view server来获取primary。 阅读全文

posted @ 2016-12-08 15:01 姚灯灯! 阅读(2015) 评论(0) 推荐(0)

Golang tips
摘要:1、go test 测试单个函数 go test -v -test.run Test* 2、 阅读全文

posted @ 2016-12-05 14:16 姚灯灯! 阅读(241) 评论(0) 推荐(0)

《Remus: High Availability via Asychronous Virtual Machine Replication》翻译
摘要:Abstract 想要让应用能够躲过硬件故障是一项非常昂贵的任务,因为这通常意味着对软件进行重构,使它包含复杂的恢复逻辑的同时需要部署专用的硬件,而这些对于提升大型的或者遗留的应用的可靠性是巨大的障碍。我们接下来将描述一个通用的高可用服务,它能够为那些已经存在并且未经修改的软件,在其运行的物理机故障 阅读全文

posted @ 2016-12-03 21:12 姚灯灯! 阅读(1047) 评论(0) 推荐(0)

shell tips
摘要:-2、获取本机eth0的ip地址 -1、按指定的字符串截取 ${variable#*string} 从左向右截取第一个string后的字符串 ${variable##*string}从左向右截取最后一个string后的字符串 ${variable%string*}从右向左截取第一个string后的字 阅读全文

posted @ 2016-12-02 13:30 姚灯灯! 阅读(263) 评论(0) 推荐(0)

导航