From 8d3c7ffdfdba375469dd67ce14a87406b5c2c713 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 2 Apr 2013 18:39:37 -0700 Subject: [PATCH] mon: make 'osd crush rm|unlink ...' idempotent Return 0 if the item is not there, not -ENOENT. Fixes: #4624 Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b76511cb9635..17d329155614 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; } -- 2.47.3