Hello, World!

~ Enjoy Today ~

Linux Kernel Debug Tips
Kernel Kernel undertakes the core Operating System job, which is the foundation of the current software ecosystem. So, knowing more about how the kernel works will contribute to the construction of our user mode system. The best method to learn software code is debugging while watching, software = code + data, know more about the runtime data while learning code can help us understand it better. However the Kernel is not a normal software system, we can’t add breakpoint and debug it through IDE debug button like other normal software, though we can implement it by kgdb + QEMU, it’ still too heavy, and not available for online systems. This article shares two lightweight kernel debugging tips, helps us observing it runtime status rapidly. Kernel Module Usally, our codes are runing in user mode. In Linux operating systems, the instruction of user mode program will run in level Ring 3 , they do not have the permission to acces the data in level Ring 0 high memory address space, which means that they can’t snoop the data inside Kernel. In that case, why not try to run our code inside the Kernel? It’s possible to edit the source code of kernel, adding log to print the information we concerned, but it’s a long tedious step.......
CubeFS&Kubernetes实践
Kubernetes (K8S) 是目前容器编排领域事实上的标准,在全球范围内有着广泛的应用。 CubeFS 既可以在 K8S 集群中部署客户端,通过 CSI 接口为 K8S 提供持久卷存储能力,也可以直接将 CubeFS 服务端集群整个部署在 K8S 中。 本文将分别介绍一下如何在 K8S 集群中部署 CubeFS 客户端、服务端,以及一些常见的运维操作和注意事项。 服务端 随着容器化的普及,基础设施全部上 K8S 是未来的趋势,这样所有的资源可以统一调度,且有着云原生庞大生态的加持,基础设施的运维成本也将大幅......
聊一聊磁盘
磁盘 磁盘是一种非常常见的持久化存储设备,相较于计算机上另外一种主要的存储设备:内存,磁盘则主要具有断电数据不丢失、容量通常更大、价格低廉等特点;当然我们今天这里主要聊的是广义上的磁盘,而不是特指利用磁性来存储的狭义上的概念。 存储介质 理论上任何能够表达两种状态,且能持久性的保持的东西都可以用来造磁盘;不过我们通常还要考虑成本等其他实际的问题。 我们通常指的磁盘,按照存储介质来分,主要能分为固态硬盘和机......
容器网络可视化:Weave Scope
Scope 简介 scope 是 weavework 开源的一款容器集群网络可视化监控方案,可以提供整个集群的实时网络拓扑,能具体到容器内进程这一粒度,同时还能提供对容器进行简单的详情查看、销毁、远程登录等管理功能。 功能 Overview 下图是 scope 的管理后台,打开可以看到图中有很多个六边形,代表一个个容器,而容器之间的连线则代表它们之间当前存在网络连接,鼠标悬浮到线条之上还能看到连接发起的方向,这样我们就能直观地观察到整个集群的网络流量拓扑了,哪几个服务之......
Linux 内核轻量级调试小技巧
Kernel 内核承担了核心的操作系统工作,是当今软件生态的基石,因此了解内核是如何工作的能极大的帮助我们更好地构建用户态系统。 学习软件源代码最好的方式就是边看边 DEBUG,软件 = 代码 + 数据,看代码的同时了解其运行时数据能让我们更好的理解整体逻辑。 但内核毕竟不是普通的软件系统,并不是简单的在 IDE 里面一点就能断点调试的,虽然也可以通过 kgdb + qemu 实现在 IDE 中的断点调式,不过这样实在是太重了,而且也不能分析正在运行中的线上......
Cilium 容器数据路径
Cilium Cilium 提供了一套基于 eBPF 的容器网络方案,在网络可观测性和隔离策略方面提供了非常多强大的特性。 我们今天主要关注 Cilium 容器数据面路径这个话题,即一个使用 Cilium 做为 CNI 的 Pod 的数据是如何流动的。 这里我们以在 Pod 中向 1.1.1.1:80发起 TCP 连接(nc -v 1.1.1.1 80)的流量为例进行分析,演示的 Cilium 集群使用 veth pair 打通容器和宿主机网络命名空间,同时使用 vxlan 模式来进行跨主机间的 Pod 通信。 这里我们使用 Pod 10.1.128.86 进行演示,其所在 Node IP 为 10.11.224......
Cilium 配置详解
Cilium Cilium 可以说是当下最流行的基于 eBPF 的容器网络方案,基于eBPF 这种内核黑魔法 Cilium 极大地提升了容器网络的可玩性。 Cilium 的参数配置项都是通过 ConfigMapcilium-config配置的 中,,下面我们来一个个的分析一下这个 ConfigMap 里面的参数都有何意义。 本文基于cilium 1.11版本进行分析。 Cilium Config 配置项 意义 kvstore 当使用 KV 数据库存储元信息而不是CRD时,需要设置此项申明具体的KV存储,原来支持 etcd 和 consul 两种选择,不过 1.11 版......