Project

General

Profile

Bug #42981 ยป kludge.patch

Sage Weil, 11/22/2019 08:20 PM

View differences:

src/ceph_mgr.cc
#include "common/errno.h"
#include "common/pick_address.h"
#include "global/global_init.h"
#include "global/signal_handler.h"
#include "mgr/MgrStandby.h"
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_mgr
#undef dout_prefix
#define dout_prefix *_dout << "mgr " << __func__ << " "
static void usage()
{
cout << "usage: ceph-mgr -i <ID> [flags]\n"
......
generic_server_usage();
}
static void handle_mgr_signal(int signum)
{
derr << " *** Got signal " << sig_str(signum) << " ***" << dendl;
sleep(10);
derr << " handler exiting" << dendl;
}
/**
* A short main() which just instantiates a MgrStandby and
* hands over control to that.
......
global_init_chdir(g_ceph_context);
common_init_finish(g_ceph_context);
init_async_signal_handler();
register_async_signal_handler_oneshot(SIGINT, handle_mgr_signal);
while (true) {
derr << " main sleeping" << dendl;
sleep(10000);
}
MgrStandby mgr(argc, argv);
int rc = mgr.init();
if (rc != 0) {
    (1-1/1)