From: Dave Chen Date: Tue, 27 Dec 2016 06:34:23 +0000 (+0800) Subject: common/ceph_context: Show clear message if all features are enabled X-Git-Tag: v12.0.0~326^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12676%2Fhead;p=ceph.git common/ceph_context: Show clear message if all features are enabled 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 --- diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index 76902c151d30..82d3825113eb 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -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();