From: Sage Weil Date: Wed, 3 Apr 2013 22:04:00 +0000 (-0700) Subject: mon: make 'osd crush unlink ..' idempotent X-Git-Tag: v0.62~93^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e6d4582a68f3efa0907dfa5945a9adceeb6d1319;p=ceph.git mon: make 'osd crush unlink ..' idempotent Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 17d329155614..e8cf2c84280d 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2719,6 +2719,11 @@ bool OSDMonitor::prepare_command(MMonCommand *m) } else { err = newcrush.remove_item(g_ceph_context, id, unlink_only); } + if (err == -ENOENT) { + ss << "item " << m->cmd[3] << " does not appear in that position"; + err = 0; + break; + } if (err == 0) { pending_inc.crush.clear(); newcrush.encode(pending_inc.crush);