]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: validate crush features for osd (not just mon) 3465/head
authorSage Weil <sage@redhat.com>
Thu, 22 Jan 2015 21:56:38 +0000 (13:56 -0800)
committerSage Weil <sage@redhat.com>
Thu, 22 Jan 2015 21:56:38 +0000 (13:56 -0800)
We need to check that the OSD features are met as well.

Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 6029bf0a3dfddead0d84bf710f0a653dace09429..424f6b969c55e093292edfb5851c84afd054de72 100644 (file)
@@ -3691,12 +3691,13 @@ bool OSDMonitor::validate_crush_against_features(const CrushWrapper *newcrush,
   OSDMap newmap;
   newmap.deepish_copy_from(osdmap);
   newmap.apply_incremental(new_pending);
-  uint64_t features = newmap.get_features(CEPH_ENTITY_TYPE_MON, NULL);
 
-  stringstream features_ss;
+  uint64_t features =
+    newmap.get_features(CEPH_ENTITY_TYPE_MON, NULL) |
+    newmap.get_features(CEPH_ENTITY_TYPE_OSD, NULL);
 
+  stringstream features_ss;
   int r = check_cluster_features(features, features_ss);
-
   if (!r)
     return true;