]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/OSDMonitor: sanity check osd before performing 'osd purge'
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 5 Aug 2017 11:21:33 +0000 (19:21 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sat, 5 Aug 2017 11:43:39 +0000 (19:43 +0800)
commitbfd1d4ef9a10f0fcf238095feb2ba8ebb3823db4
treefdffe10ccf352c801284e44af02a560db3cf853c
parentf7c4c1377573415a8767a5b5aebc9ea01c6f2f7f
mon/OSDMonitor: sanity check osd before performing 'osd purge'

This will pervent OSDMonitor from crashing on purging a very large
non-existent osd id as below:

osd e11 prepare_command_osd_purge purging osd.8
    -1> 2017-08-05 18:59:44.994319 7f6076968700 10 mon.a@0(leader).osd e11 prepare_command_osd_destroy osd.8 does not exist.
     0> 2017-08-05 18:59:45.002309 7f6076968700 -1 /home/xxg/build/ceph-dev/src/osd/OSDMap.h: In function 'int OSDMap::get_state(int) const'
 thread 7f6076968700 time 2017-08-05 18:59:44.994336
/home/xxg/build/ceph-dev/src/osd/OSDMap.h: 690: FAILED assert(o < max_osd)

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
qa/workunits/cephtool/test.sh
src/mon/OSDMonitor.cc