]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: make 'osd crush rm|unlink ...' idempotent 193/head
authorSage Weil <sage@inktank.com>
Wed, 3 Apr 2013 01:39:37 +0000 (18:39 -0700)
committerSage Weil <sage@inktank.com>
Wed, 3 Apr 2013 01:39:37 +0000 (18:39 -0700)
Return 0 if the item is not there, not -ENOENT.

Fixes: #4624
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/OSDMonitor.cc

index b76511cb96354fbd77d6325b2d43fd93d929ef9f..17d32915561451524dcf2878a0c12589c99f963b 100644 (file)
@@ -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;
        }