From f5ba0fbbe73e11418634bc95e1fc36d17edccf37 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 6 Apr 2013 13:54:10 -0700 Subject: [PATCH] mon: make 'osd crush move ...' idempotent If we don't need to move the item, return success. Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index e8cf2c84280d..a9d68075cd4c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2656,7 +2656,8 @@ bool OSDMonitor::prepare_command(MMonCommand *m) return true; } } else { - ss << "no need to move item id " << id << " name '" << name << "' to location " << loc << " in crush map"; + ss << "no need to move item id " << id << " name '" << name << "' to location " << loc << " in crush map"; + err = 0; } } while (false); } -- 2.47.3