ivanjobs.github.io - Mesos Agent Containerizer分析









Search Preview

Mesos Agent Containerizer分析 | Ivan的博客

ivanjobs.github.io
mesos agent 源码里有一个关键的抽象containerizer, 以前模糊的理解是对应到一个task的容器化,但其实不完全是这样。 这里通过阅读源码,细致的理解一遍containerizer。
.io > ivanjobs.github.io

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Mesos Agent Containerizer分析 | Ivan的博客
Text / HTML ratio 39 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud Ceph container executor Mesos const Python mesos pull = OpenStack docker Docker running pid bool 笔记 destroy flags set 简单。
Keywords consistency
Keyword Content Title Description Headings
Ceph 14
container 11
executor 9
Mesos 8
const 7
Python 7
Headings
H1 H2 H3 H4 H5 H6
1 0 2 0 0 0
Images We found 1 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
Ceph 14 0.70 %
container 11 0.55 %
executor 9 0.45 %
Mesos 8 0.40 %
const 7 0.35 %
Python 7 0.35 %
mesos 6 0.30 %
pull 5 0.25 %
= 5 0.25 %
OpenStack 4 0.20 %
docker 4 0.20 %
Docker 4 0.20 %
running 4 0.20 %
pid 3 0.15 %
bool 3 0.15 %
笔记 3 0.15 %
destroy 3 0.15 %
flags 3 0.15 %
set 3 0.15 %
简单。 3 0.15 %

SEO Keywords (Two Word)

Keyword Occurrence Density
we can 5 0.25 %
so we 3 0.15 %
so that 3 0.15 %
Flags flags 2 0.10 %
need to 2 0.10 %
of the 2 0.10 %
is stored 2 0.10 %
stored so 2 0.10 %
const Flags 2 0.10 %
mesos agent 2 0.10 %
Ceph RGW 2 0.10 %
command executor 2 0.10 %
This is 2 0.10 %
container This 2 0.10 %
Once the 2 0.10 %
Agent Containerizer分析 2 0.10 %
clean up 2 0.10 %
Mesos Agent 2 0.10 %
Ceph v1023 2 0.10 %
the command 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
so we can 3 0.15 % No
be it's own 2 0.10 % No
is stored so 2 0.10 % No
the command executor 2 0.10 % No
the running container 2 0.10 % No
Mesos Agent Containerizer分析 2 0.10 % No
stored so we 2 0.10 % No
const Flags flags 2 0.10 % No
that we can 2 0.10 % No
so that we 2 0.10 % No
it's own state 2 0.10 % No
RUNNING = 4 1 0.05 % No
environment 简单不说。 Environment 1 0.05 % No
command 简单不说。 stdmap 1 0.05 % No
= 3 RUNNING 1 0.05 % No
简单不说。 stdmap 1 0.05 % No
MOUNTING = 3 1 0.05 % No
stdmap environment 1 0.05 % No
stdstring> environment 简单不说。 1 0.05 % No
Environment variables that 1 0.05 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
be it's own state 2 0.10 % No
stored so we can 2 0.10 % No
is stored so we 2 0.10 % No
so that we can 2 0.10 % No
the command executor should 1 0.05 % No
command 简单不说。 stdmap 1 0.05 % No
简单不说。 stdmap environment 1 0.05 % No
stdmap environment 简单不说。 1 0.05 % No
stdstring> environment 简单不说。 Environment 1 0.05 % No
environment 简单不说。 Environment variables 1 0.05 % No
简单不说。 Environment variables that 1 0.05 % No
Environment variables that the 1 0.05 % No
variables that the command 1 0.05 % No
that the command executor 1 0.05 % No
command executor should pass 1 0.05 % No
简单,不说了。 CommandInfo command 简单不说。 1 0.05 % No
executor should pass onto 1 0.05 % No
should pass onto a 1 0.05 % No
pass onto a dockerized 1 0.05 % No
onto a dockerized task 1 0.05 % No

Internal links in - ivanjobs.github.io

开始使用gtest
开始使用gtest | Ivan的博客
寻找正确的语义[比赛总结]
寻找正确的语义[比赛总结] | Ivan的博客
score_thresholder服务开发总结
score_thresholder服务开发总结 | Ivan的博客
Debug CPP Program On Ubuntu
Debug CPP Program On Ubuntu | Ivan的博客
Modern CPP Developer Need To Know
Modern CPP Developer Need To Know | Ivan的博客
汇编语言学习笔记
汇编语言学习笔记 | Ivan的博客
Mesos Quota 和 Reservation
Mesos Quota 和 Reservation | Ivan的博客
libprocess学习笔记
libprocess学习笔记 | Ivan的博客
Consul使用笔记
Consul使用笔记 | Ivan的博客
SSH重新学习
SSH重新学习 | Ivan的博客
Protocol buffers 代码入门
Protocol buffers 代码入门 | Ivan的博客
Mesos Slave 如何上报资源?
Mesos Slave 如何上报资源? | Ivan的博客
Object Locator (Ceph) 探究笔记
Object Locator (Ceph) 探究笔记 | Ivan的博客
librados接口使用
librados接口使用 | Ivan的博客
Ceph RGW Pools 浅析
Ceph RGW Pools 浅析 | Ivan的博客
在单机上搭建多Ceph集群
在单机上搭建多Ceph集群 | Ivan的博客
Dockerfile中RUN/CMD/ENTRYPOINT的区分
Dockerfile中RUN/CMD/ENTRYPOINT的区分 | Ivan的博客
strace使用入门
strace使用入门 | Ivan的博客
Haystack论文学习笔记
Haystack论文学习笔记 | Ivan的博客
Mesos关联配置
Mesos关联配置 | Ivan的博客
ZooKeeper概览
ZooKeeper概览 | Ivan的博客
Ceph故障解析-filestore_merge_threshold
Ceph故障解析-filestore_merge_threshold | Ivan的博客
基于laravel+mysql的容器化DAL方案
基于laravel+mysql的容器化DAL方案 | Ivan的博客
vuejs使用小结1
vuejs使用小结1 | Ivan的博客
Ceph新技能Get
Ceph新技能Get | Ivan的博客
Ceph v10.2.3 RGW源码解析2
Ceph v10.2.3 RGW源码解析2 | Ivan的博客
Ceph v10.2.3 RGW源码解析1
Ceph v10.2.3 RGW源码解析1 | Ivan的博客
s3cmd使用说明
s3cmd使用说明 | Ivan的博客
vuejs工具链简介
vuejs工具链简介 | Ivan的博客
requirejs简介
requirejs简介 | Ivan的博客
可编程自动化输入方案(Mac下)
可编程自动化输入方案(Mac下) | Ivan的博客
Mesos Supress/Revive Offers测试
Mesos Supress/Revive Offers测试 | Ivan的博客
Mesos Offer生命周期杂记
Mesos Offer生命周期杂记 | Ivan的博客
Mesos Agent Containerizer分析
Mesos Agent Containerizer分析 | Ivan的博客
get started with createjs chapter 1 notes
get started with createjs chapter 1 notes | Ivan的博客
mesos agent /monitor/statistics返回数据业务意义
mesos agent /monitor/statistics返回数据业务意义 | Ivan的博客
mesos master/messages_deactivate_frameworks 不生效?
mesos master/messages_deactivate_frameworks 不生效? | Ivan的博客
KMP算法杂谈
KMP算法杂谈 | Ivan的博客
Mesos配置项深入分析
Mesos配置项深入分析 | Ivan的博客
mesos-master replicated_log存的是什么?
mesos-master replicated_log存的是什么? | Ivan的博客
mesos disk usage vs df 结果不一致问题
mesos disk usage vs df 结果不一致问题 | Ivan的博客
Mesos GC原理解析
Mesos GC原理解析 | Ivan的博客
准备mesos单机版开发测试环境
准备mesos单机版开发测试环境 | Ivan的博客
Mesos 1.0.0 源码解析杂记
Mesos 1.0.0 源码解析杂记 | Ivan的博客
stout学习笔记
stout学习笔记 | Ivan的博客
gflags学习笔记
gflags学习笔记 | Ivan的博客
ceph fuse挂载cephfs, ls不出文件列表问题,调试记录
ceph fuse挂载cephfs, ls不出文件列表问题,调试记录 | Ivan的博客
Ceph源码解析(3)-rados put过程探究
Ceph源码解析(3)-rados put过程探究 | Ivan的博客
Hub,Bridge,Switch和Gateway是什么?
Hub,Bridge,Switch和Gateway是什么? | Ivan的博客
数论学习笔记
数论学习笔记 | Ivan的博客
二分图专题解析
二分图专题解析 | Ivan的博客
Ceph Cluster调优日志
Ceph Cluster调优日志 | Ivan的博客
boost库的智能指针
boost库的智能指针 | Ivan的博客
Linux命令使用记录
Linux命令使用记录 | Ivan的博客
Vim Cheat Sheet
Vim Cheat Sheet | Ivan的博客
原码、反码、补码笔记
原码、反码、补码笔记 | Ivan的博客
ceph-deploy 配置文件比较 BUG
ceph-deploy 配置文件比较 BUG | Ivan的博客
Ceph源码解析(2)-rados put过程探究
Ceph源码解析(2)-rados put过程探究 | Ivan的博客
Ceph Release 概述
Ceph Release 概述 | Ivan的博客
Ceph CRUSH Map 维护详解
Ceph CRUSH Map 维护详解 | Ivan的博客
题解[第二周]
题解[第二周] | Ivan的博客
MathQuill Math Equation Cheatsheet
MathQuill Math Equation Cheatsheet | Ivan的博客
题解[第一周]
题解[第一周] | Ivan的博客
Ceph集群运维问题记录
Ceph集群运维问题记录 | Ivan的博客
linux man高级技巧
linux man高级技巧 | Ivan的博客
Git 我错了!
Git 我错了! | Ivan的博客
Ceph源码解析(1)-Create Pool过程探究
Ceph源码解析(1)-Create Pool过程探究 | Ivan的博客
准备Ceph开发环境
准备Ceph开发环境 | Ivan的博客
Ceph:Too Many PGs Per OSD
Ceph:Too Many PGs Per OSD | Ivan的博客
UVA 11292 题解
UVA 11292 题解 | Ivan的博客
Ceph RBD 文件映射实验笔记
Ceph RBD 文件映射实验笔记 | Ivan的博客
硬盘分区
硬盘分区 | Ivan的博客
硬盘模型
硬盘模型 | Ivan的博客
Ceph配置项
Ceph配置项 | Ivan的博客
OSTEP 文件系统实现
OSTEP 文件系统实现 | Ivan的博客
在Ceph底层xfs上找到你上传的文件
在Ceph底层xfs上找到你上传的文件 | Ivan的博客
使用s3cmd操作ceph rgw
使用s3cmd操作ceph rgw | Ivan的博客
Ceph核心概念备忘录
Ceph核心概念备忘录 | Ivan的博客
COSBench使用笔记
COSBench使用笔记 | Ivan的博客
使用saltstack部署运维ceph集群笔记
使用saltstack部署运维ceph集群笔记 | Ivan的博客
如何使用salt states?
如何使用salt states? | Ivan的博客
ceph-deploy命令详解
ceph-deploy命令详解 | Ivan的博客
dd笔记
dd笔记 | Ivan的博客
DTrace是什么?
DTrace是什么? | Ivan的博客
Ceph Cache Tier笔记
Ceph Cache Tier笔记 | Ivan的博客
Linux下理解filesystem/device/mount等概念
Linux下理解filesystem/device/mount等概念 | Ivan的博客
Base64编码详解与应用
Base64编码详解与应用 | Ivan的博客
URLEncoder学习笔记
URLEncoder学习笔记 | Ivan的博客
Ceph论文阅读笔记
Ceph论文阅读笔记 | Ivan的博客
使用Python inotify监控文件变化
使用Python inotify监控文件变化 | Ivan的博客
Git命令Snippets
Git命令Snippets | Ivan的博客

Ivanjobs.github.io Spined HTML


MesosWage-earnerContainerizer分析 | Ivan的博客 最新文章 dev ops math algorithm personal 开始使用gtest 2018书单课单 2017年总结/2018年展望 寻找正确的语义[比赛总结] score_thresholder服务开发总结 Debug CPP Program On Ubuntu Modern CPP Developer Need To Know 汇编语言学习笔记 Mesos Quota 和 Reservation libprocess学习笔记 Consul使用笔记 SSH重新学习 Protocol buffers 代码入门 Mesos Slave 如何上报资源? Object Locator (Ceph) 探究笔记 librados接口使用 Ceph RGW Pools 浅析 在单机上搭建多Ceph集群 2016年总结/2017年展望 Dockerfile中RUN/CMD/ENTRYPOINT的区分 strace使用入门 Haystack论文学习笔记 Mesos关联配置 ZooKeeper概览 Ceph故障解析-filestore_merge_threshold 基于laravel+mysql的容器化DAL方案 vuejs使用小结1 Ceph新技能Get Ceph v10.2.3 RGW源码解析2 Ceph v10.2.3 RGW源码解析1 s3cmd使用说明 vuejs工具链简介 requirejs简介 mesos maintenance深度解析 可编程自动化输入方案(Mac下) Mesos Supress/Revive Offers测试 Mesos Offer生命周期杂记 MesosWage-earnerContainerizer分析 get started with createjs installment 1 notes mesos wage-earner /monitor/statistics返回数据业务意义 mesos master/messages_deactivate_frameworks 不生效? mesos /flags 403 forbidden? KMP算法杂谈 Mesos配置项深入分析 mesos-master replicated_log存的是什么? mesos disk usage vs df 结果不一致问题 Mesos GC原理解析 准备mesos单机版开发测试环境 Mesos 1.0.0 源码解析杂记 stout学习笔记 gflags学习笔记 ceph fuse挂载cephfs, ls不出文件列表问题,调试记录 Ceph源码解析(3)-rados put过程探究 Hub,Bridge,Switch和Gateway是什么? 数论学习笔记 二分图专题解析 Ceph Cluster调优日志 boost库的智能指针 Linux命令使用记录 Vim Cheat Sheet 原码、反码、补码笔记 ceph-deploy 配置文件比较 BUG Ceph源码解析(2)-rados put过程探究 Ceph Release 概述 Ceph CRUSH Map 维护详解 题解[第二周] MathQuill Math Equation Cheatsheet 题解[第一周] Ceph集群运维问题记录 linux man高级技巧 Git 我错了! Ceph源码解析(1)-Create Pool过程探究 准备Ceph开发环境 Ceph:Too Many PGs Per OSD UVA 11292 题解 Docker Private Registry(Ceph Swift) 搭建笔记 Ceph RBD 文件映射实验笔记 硬盘分区 硬盘模型 Ceph配置项 OSTEP 文件系统实现 在Ceph底层xfs上找到你上传的文件 使用s3cmd操作ceph rgw Ceph核心概念备忘录 COSBench使用笔记 GCJ2015 Qualification Round-B题解 使用saltstack部署运维ceph集群笔记 如何使用salt states? ceph-deploy命令详解 dd笔记 DTrace是什么? Ceph Cache Tier笔记 Linux下理解filesystem/device/mount等概念 Base64编码详解与应用 URLEncoder学习笔记 Ceph论文阅读笔记 使用Python inotify监控文件变化 Git命令Snippets 使用Nginx做LB MathQuill学习笔记 Docker化Laravel开发环境 Ceph Pool PG配置说明 Ceph 笔记 Ceph源码分析 Latex数学符号 为Ceph OSS服务搭建LB Ceph RGW S3接口测试:诡异的403 AccessDenied问题 访问Ceph RGW失败 403 Forbidden问题 解决历程 Ceph RADOS论文研读笔记 Ceph源码分析:从一个REST请求,到OSD存储。 各种开源代码协议简述 OpenStack Projects简述 OpenStack Ceilometer 笔记 RabbitMQ 和 oslo.messaging Ceph Rest API 身份验证方式(S3) tcpdump笔记 Ceph集群部署笔记 Python PEP8规范笔记 Python Decorator(装饰器)模式 笔记 libvirt笔记 OpenStack oslo 概览 OpenStack KeyStone API http://localhost:5000/ 源码追踪 Python pdb笔记 zero length variety in a struct Jenkins' Hash Functions NTP部署笔记 Linux iptables笔记 Python Paste笔记 Python PasteDeploy笔记 Python eventlet笔记 使用curl测试RESTful接口 ubuntu14.04下安装devstack devstack 安装指南【最简单】 Docker操作记录 git merge 详解 Python 包管理详解 阿里云服务器设置swapfile的方法 shell脚本编写向导 搭建Laravel全栈开发环境 2016 September 21 MesosWage-earnerContainerizer分析 mesos wage-earner 源码里有一个关键的抽象containerizer, 以前模糊的理解是对应到一个task的容器化,但其实不完全是这样。 这里通过阅读源码,细致的理解一遍containerizer。 Containerizer // An wresting of a Containerizer that will contain an executor and // its tasks. matriculation Containerizer Containerizer类没有成员变量,定义了一堆接口函数。从开头的注释中可以看出,Containerizer包含的不仅仅是task,准确说是一个executor加上对应的tasks。 Containerizer的接口函数注释,读一读,大有裨益。 DockerContainerizer Containerizer其实是定义一层皮,真正要看的是DockerContainterizer, 而DockerContainerizer的逻辑都代理给了DockerContainerizerProcess. matriculation DockerContainerizerProcess : public process::Process<DockerContainerizerProcess> { ... const Flags flags; //输入参数,来自agent。 Fetcher* fetcher; //Fetcher你懂得。 process::Owned<mesos::slave::ContainerLogger> logger; // 容器日志模块,默认是重定向到sandbox的stdout/stderr。 process::Shared<Docker> docker; // 对Docker CLI的一层封装。 ... //定义了Container,所以启动的Container都会在这里保存一份? struct Container { ... // The DockerContainerizer needs to be worldly-wise to properly wipe up // Docker containers, regardless of when they are destroyed. For // example, if a container gets destroyed while we are fetching, // we need to not alimony running the fetch, nor should we try and // start the Docker container. For this reason, we've split out // the states into: // // FETCHING // PULLING // MOUNTING // RUNNING // DESTROYING // // In particular, we made 'PULLING' be it's own state so that we // can hands destroy and wind-up when a user initiated pulling // a really big image but we timeout due to the executor // registration timeout. Since we currently have no way to discard // a Docker::run, we needed to explicitly do the pull (which is // the part that takes the longest) so that we can moreover explicitly // skiver it when asked. Once the functions at Docker::* get support // for discarding, then we won't need to make pull be it's own // state anymore, although it doesn't hurt since it gives us // largest error messages. enum State { FETCHING = 1, PULLING = 2, MOUNTING = 3, RUNNING = 4, DESTROYING = 5 } state;//当前Container的状态。 const ContainerID id; // ContainerID。 const Option<TaskInfo> task; // 简单,不说了。 const ExecutorInfo executor; // 简单,不说了。 ContainerInfo container; // 简单,不说了。 CommandInfo command; // 简单不说。 std::map<std::string, std::string> environment; // 简单不说。 // Environment variables that the writ executor should pass // onto a docker-ized task. This is set by a hook. Option<std::map<std::string, std::string>> taskEnvironment; // 跟environment有什么区别? 一个是进程环境变量,一个是容器环境变量?需要研究。 // The sandbox directory for the container. This holds the // symlinked path if symlinked boolean is true. std::string directory; // 当前Container的sandbox目录。 const Option<std::string> user; // 当前Container运行的Unix User。 SlaveID slaveId;// 简单。 const process::PID<Slave> slavePid; //简单。 bool checkpoint; //简单。 bool symlinked; //简单,需要研究一下symlinked逻辑。 const Flags flags; // 这个flags是干啥的? // Promise for future returned from wait(). process::Promise<containerizer::Termination> termination;//标示终止的Promise。 // Exit status of executor or container (depending on whether or // not we used the writ executor). Represented as a promise so // that destroying can uniting with it stuff set. process::Promise<process::Future<Option<int>>> status; //标识executor或者container状态的Promise。 // Future that tells us the return value of last launch stage (fetch, pull, // run, etc). process::Future<bool> launch; // 标识是否launch成功的Future. // We alimony track of the resources for each container so we can set // the ResourceStatistics limits in usage(). Note that this is // variegated than just what we might get from TaskInfo::resources // or ExecutorInfo::resources considering they can transpiration dynamically. Resources resources;// 啥意思,这个不是Task的资源,而是会动态变化? // The docker pull future is stored so we can discard when // destroy is tabbed while docker is pulling the image. process::Future<Docker::Image> pull;// Docker镜像pull的Future。 // Once the container is running, this saves the pid of the // running container. Option<pid_t> pid; // 正在运行的Container它的进程号(Unix进程号),非libprocess概念。 // The executor pid that was forked to wait on the running // container. This is stored so we can wipe up the executor // on destroy. Option<pid_t> executorPid; //Executor 进程号。 // Marks if this container launches an executor in a docker // container. bool launchesExecutorContainer; // 是否在Docker Container里启动Executor? }; hashmap<ContainerID, Container*> containers_; //一大堆Containers。 Please enable JavaScript to view the comments powered by Disqus. All content is licensed under CC BY-NC-SA Buit with Jekyll and 3-Jekyll theme • Hosted on Github Table of Contents