必备知识

本章包含必要信息,每个 Ceph 开发者都应该知道。

项目领导

Ceph 项目是由 Sage Weil 领导的。另外,各主要项目组件有自己的领导,下面的表格罗列了所有领导、以及他们在 GitHub 上的昵称。

Scope

Lead

GitHub nick

Ceph

Sage Weil

liewegas

RADOS

Neha Ojha

neha-ojha

RGW

Yehuda Sadeh

yehudasa

RGW

Matt Benjamin

mattbenjamin

RBD

Jason Dillaman

dillaman

CephFS

Patrick Donnelly

batrick

Dashboard

Lenz Grimmer

LenzGr

MON

Joao Luis

jecluis

Build/Ops

Ken Dreyer

ktdreyer

Docs

Zac Dover

zdover23

上述表格里的 Ceph 专有缩写在 体系结构 里面有解释。

历史

请翻阅 Wikipedia 的 History 这章

软件许可

Ceph 是自由软件。

除非另有声明, Ceph 的源代码会以 LGPL2.1 或 LGPL3.0 许可证发布。其完整内容在 源码树顶极目录下的 COPYING 文件内。

源代码仓库

The source code of Ceph lives on GitHub in a number of repositories below the Ceph “organization”.

To make a meaningful contribution to the project as a developer, a working knowledge of git is essential.

Although the Ceph “organization” includes several software repositories, this document covers only one: https://github.com/ceph/ceph.

Redmine 问题跟踪器

Although GitHub is used for code, Ceph-related issues (Bugs, Features, Backports, Documentation, etc.) are tracked at http://tracker.ceph.com, which is powered by Redmine.

The tracker has a Ceph project with a number of subprojects loosely corresponding to the various architectural components (see 体系结构).

Mere registration in the tracker automatically grants permissions sufficient to open new issues and comment on existing ones.

要报告软件缺陷或者提议新功能,请跳转到 Ceph 项目并点击 New issue

邮件列表

The dev@ceph.io list is for discussion about the development of Ceph, its interoperability with other technology, and the operations of the project itself.

The email discussion list for Ceph development is open to all. Subscribe by sending a message to dev-request@ceph.io with the following line in the body of the message:

subscribe ceph-devel

The ceph-devel@vger.kernel.org list is for discussion and patch review for the Linux kernel Ceph client component. Note that this list used to be an all-encompassing list for developers. So when searching the archives, remember that this list contains the generic devel-ceph archives pre mid-2018.

Subscription works in the same way, by sending a message to majordomo@vger.kernel.org with the line:

subscribe ceph-devel

in the body of the message.

Ceph development email discussions the list is open to all. Subscribe by sending a message to dev-request@ceph.io with the line:

subscribe ceph-devel

要作为邮件正文发出。

Subscribing to the

还有其他与 Ceph 相关的邮件列表

IRC

In addition to mailing lists, the Ceph community also communicates in real time using Internet Relay Chat.

这里 https://ceph.com/irc/ 介绍了如何配置 IRC 客户端、还有一堆频道。

补丁的提交

The canonical instructions for submitting patches are contained in the file CONTRIBUTING.rst in the top-level directory of the source-code tree. There may be some overlap between this guide and that file.

All newcomers are encouraged to read that file carefully.

从源码构建

请参考 构建 Ceph

用 ccache 加速本地构建

Rebuilds of the ceph source tree can benefit significantly from use of ccache.

Many a times while switching branches and such, one might see build failures for certain older branches mostly due to older build artifacts. These rebuilds can significantly benefit the use of ccache. For a full clean source tree, one could do

$ make clean

# note the following will nuke everything in the source tree that
# isn't tracked by git, so make sure to backup any log files /conf options

$ git clean -fdx; git submodule foreach git clean -fdx

ccache is available as a package in most distros. To build ceph with ccache one can:

$ cmake -DWITH_CCACHE=ON ..

ccache can also be used for speeding up all builds in the system. for more details refer to the run modes of the ccache manual. The default settings of ccache can be displayed with ccache -s.

Note

It is recommended to override the max_size, which is the size of cache, defaulting to 10G, to a larger size like 25G or so. Refer to the configuration section of ccache manual.

To further increase the cache hit rate and reduce compile times in a development environment, it is possible to set version information and build timestamps to fixed values, which avoids frequent rebuilds of binaries that contain this information.

This can be achieved by adding the following settings to the ccache configuration file ccache.conf:

sloppiness = time_macros
run_second_cpp = true

Now, set the environment variable SOURCE_DATE_EPOCH to a fixed value (a UNIX timestamp) and set ENABLE_GIT_VERSION to OFF when running cmake:

$ export SOURCE_DATE_EPOCH=946684800
$ cmake -DWITH_CCACHE=ON -DENABLE_GIT_VERSION=OFF ..

Note

Binaries produced with these build options are not suitable for production or debugging purposes, as they do not contain the correct build time and git version information.

开发模式的集群

参考 开发者指南(快速)

Kubernetes/Rook 开发集群

参考 Hacking on Ceph in Kubernetes with Rook

补丁移植( Backporting )

All bugfixes should be merged to the master branch before being backported. To flag a bugfix for backporting, make sure it has a tracker issue associated with it and set the Backport field to a comma-separated list of previous releases (e.g. “hammer,jewel”) that you think need the backport. The rest (including the actual backporting) will be taken care of by the Stable Releases and Backports team.

Guidance for use of cluster log

If your patches emit messages to the Ceph cluster log, please consult this: 集群日志的用法.