]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: hide require_*_osd and sortbitwise flags 14440/head
authorSage Weil <sage@redhat.com>
Mon, 10 Apr 2017 19:42:17 +0000 (15:42 -0400)
committerSage Weil <sage@redhat.com>
Mon, 10 Apr 2017 19:42:17 +0000 (15:42 -0400)
These will be hidden from 'ceph -s' (as they are less
interesting) but still appear in the OSDMap dump.

Signed-off-by: Sage Weil <sage@redhat.com>
src/include/rados.h
src/osd/OSDMap.cc

index c8bc8ac4c0c55a4a5ff313f63273ae99d5451671..0cc9380d82458bde8502464489740e9853dceab0 100644 (file)
@@ -150,6 +150,12 @@ extern const char *ceph_osd_state_name(int s);
 #define CEPH_OSDMAP_REQUIRE_KRAKEN (1<<17) /* require kraken for booting osds */
 #define CEPH_OSDMAP_REQUIRE_LUMINOUS (1<<18) /* require l for booting osds */
 
+/* these are hidden in 'ceph status' view */
+#define CEPH_OSDMAP_SEMIHIDDEN_FLAGS (CEPH_OSDMAP_REQUIRE_JEWEL|       \
+                                     CEPH_OSDMAP_REQUIRE_KRAKEN |      \
+                                     CEPH_OSDMAP_REQUIRE_LUMINOUS |    \
+                                     CEPH_OSDMAP_SORTBITWISE)
+
 /*
  * The error code to return when an OSD can't handle a write
  * because it is too large.
index c4e388f86cfba277d1eabbb43202d804a218289c..ff0d194ae15539d26ef39b34865d6ee112579b53 100644 (file)
@@ -2879,8 +2879,9 @@ void OSDMap::print_summary(Formatter *f, ostream& out) const
     if (get_num_pg_temp())
       out << "; " << get_num_pg_temp() << " remapped pgs";
     out << "\n";
-    if (flags)
-      out << "            flags " << get_flag_string() << "\n";
+    uint64_t important_flags = flags & ~CEPH_OSDMAP_SEMIHIDDEN_FLAGS;
+    if (important_flags)
+      out << "            flags " << get_flag_string(important_flags) << "\n";
   }
 }