]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ceph_context: Show clear message if all features are enabled 12676/head
authorDave Chen <wei.d.chen@intel.com>
Tue, 27 Dec 2016 06:34:23 +0000 (14:34 +0800)
committerDave Chen <wei.d.chen@intel.com>
Wed, 28 Dec 2016 01:54:17 +0000 (09:54 +0800)
It's saying the following dangerous and experimental featuresare enabled
while the value is "*", it's not quite clear what's "*" stands for.

The patch updates the message so that it's more clear when "*" is used
in place.

Signed-off-by: Dave Chen <wei.d.chen@intel.com>
src/common/ceph_context.cc

index 76902c151d30333ccef0df7d0d326ac85ccfdf35..82d3825113eb26c8bcc172bcd25a286e0535c2dd 100644 (file)
@@ -304,9 +304,14 @@ public:
        conf->enable_experimental_unrecoverable_data_corrupting_features,
        cct->_experimental_features);
       ceph_spin_unlock(&cct->_feature_lock);
-      if (!cct->_experimental_features.empty())
-       lderr(cct) << "WARNING: the following dangerous and experimental features are enabled: "
-                  << cct->_experimental_features << dendl;
+      if (!cct->_experimental_features.empty()) {
+        if (cct->_experimental_features.count("*")) {
+          lderr(cct) << "WARNING: all dangerous and experimental features are enabled." << dendl;
+        } else {
+          lderr(cct) << "WARNING: the following dangerous and experimental features are enabled: "
+           << cct->_experimental_features << dendl;
+        }
+      }
     }
     if (changed.count("crush_location")) {
       cct->crush_location.update_from_conf();