osd/OSD: gracefully shutdown on error exit during init
This can avoid crashes as below:
0> 2017-07-12 09:34:47.427438
7f320ce61b80 -1 /home/xxg/build/ceph-dev/src/common/HeartbeatMap.cc: In function 'ceph::HeartbeatMap::~HeartbeatMap()'
thread
7f320ce61b80 time 2017-07-12 09:34:47.422986
/home/xxg/build/ceph-dev/src/common/HeartbeatMap.cc: 39: FAILED assert(m_workers.empty())
ceph version
12.1.0-702-gc5b99af (
c5b99af) luminous (rc)
1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x110) [0x7f320d8ba7f0]
2: (ceph::HeartbeatMap::~HeartbeatMap()+0xf8) [0x7f320d9be0a8]
3: (CephContext::~CephContext()+0x40c) [0x7f320d9a648c]
4: (CephContext::put()+0xe6) [0x7f320d9a6776]
5: (main()+0xad3) [0x7f320d282953]
6: (__libc_start_main()+0xf5) [0x7f32094cfb15]
7: (()+0x4964c9) [0x7f320d31f4c9]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>