]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: cleanup "osd crush set-device-class" log messages 21174/head
authorGu Zhongyan <guzhongyan@360.cn>
Mon, 2 Apr 2018 10:01:13 +0000 (18:01 +0800)
committerGu Zhongyan <guzhongyan@360.cn>
Wed, 4 Apr 2018 06:30:34 +0000 (14:30 +0800)
Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
src/crush/CrushWrapper.cc
src/mon/OSDMonitor.cc

index c72a8acedf2d4ff8e9904f9be47f8b03fb62bc40..c9596eb0475528adf8034b32c7c85756047d8aeb 100644 (file)
@@ -1893,7 +1893,7 @@ int CrushWrapper::update_device_class(int id,
   if (old_class_name && old_class_name != class_name) {
     *ss << "osd." << id << " has already bound to class '" << old_class_name
         << "', can not reset class to '" << class_name  << "'; "
-        << "use 'ceph osd crush rm-device-class <osd>' to "
+        << "use 'ceph osd crush rm-device-class <id>' to "
         << "remove old class first";
     return -EBUSY;
   }
@@ -1905,7 +1905,7 @@ int CrushWrapper::update_device_class(int id,
   }
 
   if (class_map.count(id) != 0 && class_map[id] == class_id) {
-    *ss << name << " already set to class " << class_name;
+    *ss << name << " already set to class " << class_name << ". ";
     return 0;
   }
 
index 9eb62370a4db7dba1c7fcc928a92a45feea2a6b7..3bf3992a19d73f92be565288acc7ca61e380e30a 100644 (file)
@@ -7517,7 +7517,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
           if (!stop) {
             // for single osd only, wildcard makes too much noise
             ss << "set-device-class item id " << osd << " name '" << name
-               << "' device_class '" << device_class << "': no change";
+               << "' device_class '" << device_class << "': no change";
           }
         } else {
           updated.insert(osd);