注意
本文档适用于 Ceph 开发版本。
磁盘格式
升级路径
在升级过程中,磁盘格式甚至数据结构格式都可能被更改。希望这样做,可以通过 PaxosService::upgrade_format() 调用路径来完成。没有正式的、统一的格式版本控制;PaxosService 类通过存储中的一个键来跟踪其 format_version,假设是一个 unsigned int ,但它将是服务负责为这些版本赋予意义。PaxosService::upgrade_format() call path. There is no formalized, unified format versioning; the PaxosService class keeps track of its format_version through a key in the store, assumed an unsigned int, but it will be the service’s responsibility to give meaning to those versions.
认证监控
versions
版本用一个 unsigned int 表示。默认情况下,零值表示没有正式升级的格式。第一个格式版本是在 Dumpling 中引入的;升级到 Dumpling 的集群看到它们的格式版本从零增加到一:unsigned int. By default, the value zero represents the absence of a formal upgraded format. The first format version was introduced in Dumpling; clusters upgrading to Dumpling saw their format version being increased from zero to one:
0 to 1 - introduced in v0.65, dev release for v0.67 dumpling
1 to 2 - introduced in v12.0.2, dev release for luminous
2 to 3 - introduced in mimic
0 - all clusters pre-dumpling
1 - all clusters dumpling+ and pre-luminous
2 - all clusters luminous+ and pre-mimic
3 - all clusters mimic+
version 1: introduces new-style monitor caps (i.e., profiles)
version 2: introduces mgr caps and bootstrap-mgr key
version 3: creates all bootstrap and admin keys if they don't yet exist
调用栈
在 PaxosService::refresh() 上设置的 format_versionAuthMonitor::upgrade_format() 由 PaxosService::_active() 调用:
- initially called from Monitor::refresh_from_paxos
- initially called from Monitor::init_paxos()
- initially called from Monitor::preinit()
概括PaxosService::_active():
- called from C_Committed callback, from PaxosService::propose_pending()
- called from C_Active callback, from PaxosService::_active()
- called from PaxosService::election_finished()
- on a freshly deployed cluster, upgrade_format() will be first called
*after* create_initial().
- on an existing cluster, upgrade_format() will be called after the first
election.
- upgrade_format() is irrelevant on a freshly deployed cluster, as there is
no format to upgrade at this point.
如果
如果format_version >= current_version则格式是最新的,返回。
如果features 不包含 LUMINOUS然后current_version = 1
否则如果features 不包含 MIMIC然后current_version = 2
否则current_version = 3
如果format_version == 0:
- upgrade to format version 1
- move to new-style monitor caps (i.e., profiles):
- set daemon profiles for existing entities
- set profile for existing bootstrap keys
如果format_version == 1:
- upgrade to format version 2
- for existing entities:
- add new cap for mgr
- for existing 'mgr' entities, fix 'mon' caps due to bug from kraken
setting 'allow \*', and set 'allow profile mgr' instead.
- add bootstrap-mgr key.
如果format_version == 2:
- upgrade to format version 3
- create all bootstrap keys if they don't currently exist
由 Ceph 基金会带给您
Ceph 文档是一个社区资源,由非盈利的 Ceph 基金会资助和托管Ceph Foundation. 如果您想支持这一点和我们的其他工作,请考虑加入现在加入.