]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: enable crimson-osd to boot
authorKefu Chai <kchai@redhat.com>
Fri, 11 Jan 2019 10:47:39 +0000 (18:47 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 18 Jan 2019 04:42:08 +0000 (12:42 +0800)
commitcd668c29e494b9a770c8784a360a5adfc2da1658
treeaab8b1b78491ee5dc1a6ed4069d945bb53627e2a
parent2a732749d60116f88db6b6c5ae718ca1e8370248
crimson/osd: enable crimson-osd to boot

* add state.h to encapsulate the state represeting different stages
  related to booting an OSD. the boot process of an OSD can be blocked
  by
  - waiting for PG consuming updated osdmaps
  - waiting for osdmaps marking osd.{whoami} up
  - waiting for new osdmaps to bring this osd up to speed.
  - waiting for current OSD to be healthy
  we could chain these "waits" in a more seastarized way, and let
OSD::start() wait on the future returned by this chain. but that'd
requires adding some seastar::shard_future<> as member variables of
`OSD` class, which is a little bit more convoluted than the state
machine approach used in this change. we could switch over to the
`future<>` chain approach, if we found that these futures could have
more consumers than merely `OSD::start()`.
* all osdmaps are now stored in an `std::map` in `OSD`, we can
  improve it by
  - caching it using an LRU cache
  - trimming the stale ones
  - persisting the evicted maps into the meta collection in ObjectStore
* superblock is not persited to store, neither is it read from the
  store.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd.cc
src/crimson/osd/osd.h
src/crimson/osd/state.h [new file with mode: 0644]