mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
Merge pull request #31685 from liewegas/fix-mgr-shutdown
mgr: _exit(0) from signal handler even if we are standby
This commit is contained in:
commit
1a29371b0a
@ -222,9 +222,7 @@ std::map<std::string, std::string> Mgr::load_store()
|
||||
void Mgr::handle_signal(int signum)
|
||||
{
|
||||
ceph_assert(signum == SIGINT || signum == SIGTERM);
|
||||
derr << "*** Got signal " << sig_str(signum) << " ***" << dendl;
|
||||
shutdown();
|
||||
_exit(0); // exit with 0 result code, as if we had done an orderly shutdown
|
||||
}
|
||||
|
||||
// A reference for use by the signal handler
|
||||
@ -232,9 +230,11 @@ static Mgr *signal_mgr = nullptr;
|
||||
|
||||
static void handle_mgr_signal(int signum)
|
||||
{
|
||||
derr << " *** Got signal " << sig_str(signum) << " ***" << dendl;
|
||||
if (signal_mgr) {
|
||||
signal_mgr->handle_signal(signum);
|
||||
}
|
||||
_exit(0); // exit with 0 result code, as if we had done an orderly shutdown
|
||||
}
|
||||
|
||||
void Mgr::init()
|
||||
|
Loading…
Reference in New Issue
Block a user