From: Sage Weil Date: Wed, 3 Apr 2013 01:39:37 +0000 (-0700) Subject: mon: make 'osd crush rm|unlink ...' idempotent X-Git-Tag: v0.62~99^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F193%2Fhead;p=ceph.git mon: make 'osd crush rm|unlink ...' idempotent Return 0 if the item is not there, not -ENOENT. Fixes: #4624 Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b76511cb963..17d32915561 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2702,7 +2702,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m) _get_pending_crush(newcrush); if (!newcrush.name_exists(m->cmd[3].c_str())) { - err = -ENOENT; + err = 0; ss << "device '" << m->cmd[3] << "' does not appear in the crush map"; break; }