]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: call engine().exit(0) after mkfs
authorKefu Chai <kchai@redhat.com>
Fri, 15 Mar 2019 04:36:09 +0000 (12:36 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 20 Mar 2019 03:49:45 +0000 (11:49 +0800)
commit9f9e91ea26daaff9661b3abfaf7d4421f7dd630e
treef9dfa4de62d5f29cb536b09eff8b2d8b5263b8d6
parent3a984b655a91e7f62f0fd5d9fe37fff77ec5218c
crimson/osd: call engine().exit(0) after mkfs

* crimson/osd/main.cc:
  if crimson-osd is launched as a daemon, we can always stop it using
  SIGINT, and seastar::reactor does stop itself when handling this signal.

  but if we start crimson-osd as an ordinary command line tool, we should
  stop it explicitly after it is done with its job. so call
  seastar::engine().exit().
* crimson/osd/osd.cc:
  do not stop unitialized services in OSD::stop(). OSD is initialized as
  a sharded service in main.cc, so we have to stop it before stopping
  engine. if OSD is used for mkfs, the internal services like heartbeat,
  monc, mgrc are not initialized at all, so we should not stop them in
  this case. and in theory, user could stop crimson-osd when it boots,
  so we need to check the pointers for null before dereferencing them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/main.cc