SIGN IN SIGN UP

mgr: drop the duplicate heap asok command from DaemonServer

every ceph-mgr dies with an assert the moment it wins the election:

    asok(...) register_command heap cmddesc heap name=heapcmd,... EEXIST
    src/mgr/DaemonServer.cc: 282: FAILED ceph_assert(r == 0)
     5: (DaemonServer::init(unsigned long, entity_addrvec_t)+0x10ba)
     6: (Mgr::init()+0xc25)

d8dde402b6d and e8e47abef6c both register a "heap" admin socket
command for the mgr: one in MgrStandby::init(), which runs at process
startup, the other in DaemonServer::init(), which runs when the mgr
goes active. each passed CI on its own, and the merge raised no
textual conflict. so nothing noticed that the second
register_command() now returns EEXIST and trips the assert sitting
right next to it, until the ceph-api job hit it with both in main.

keep the MgrStandby registration and drop the DaemonServer one. the
MgrStandby hook lives as long as the process, so "heap" works on a
standby mgr as well as an active one, while the dropped one only
existed after activation. and tcmalloc heap profiling is process-wide
state anyway, it needs nothing from DaemonServer.

Fixes: e8e47abef6cd7f9de46ce603c675b6bc478eb0e5
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
K
Kefu Chai committed
1cd0421b01cfa962a8ba4ef212b97d1674efd1dc
Parent: a165859