]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd: wait for SIGINT and SIGTERM before stopping
authorKefu Chai <kchai@redhat.com>
Thu, 3 Jun 2021 05:26:17 +0000 (13:26 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 3 Jun 2021 05:30:01 +0000 (13:30 +0800)
commit4945ff12e9e1dc68f884f6fa14f358efd2b44210
tree0f11856e30f3d7b558e24002122d1a029663a14e
parenta9ea8c726831ceda732a0b426ba14ece92242cff
crimson/osd: wait for SIGINT and SIGTERM before stopping

this change addresses an regression introduced by
37b83f4ed7ca69f105b93bf482cb2289cbaf9a4d. as we should not stop
services without being asked to do so.

in this change, signal handler for SIGINT and SIGTERM is registered to
handle these signals, and in the seastar thread, we wait until any of
these two signals is caught.

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