mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +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)
|
void Mgr::handle_signal(int signum)
|
||||||
{
|
{
|
||||||
ceph_assert(signum == SIGINT || signum == SIGTERM);
|
ceph_assert(signum == SIGINT || signum == SIGTERM);
|
||||||
derr << "*** Got signal " << sig_str(signum) << " ***" << dendl;
|
|
||||||
shutdown();
|
shutdown();
|
||||||
_exit(0); // exit with 0 result code, as if we had done an orderly shutdown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// A reference for use by the signal handler
|
// A reference for use by the signal handler
|
||||||
@ -232,9 +230,11 @@ static Mgr *signal_mgr = nullptr;
|
|||||||
|
|
||||||
static void handle_mgr_signal(int signum)
|
static void handle_mgr_signal(int signum)
|
||||||
{
|
{
|
||||||
|
derr << " *** Got signal " << sig_str(signum) << " ***" << dendl;
|
||||||
if (signal_mgr) {
|
if (signal_mgr) {
|
||||||
signal_mgr->handle_signal(signum);
|
signal_mgr->handle_signal(signum);
|
||||||
}
|
}
|
||||||
|
_exit(0); // exit with 0 result code, as if we had done an orderly shutdown
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mgr::init()
|
void Mgr::init()
|
||||||
|
Loading…
Reference in New Issue
Block a user