From: Jamie Pryde Date: Wed, 20 May 2026 10:31:53 +0000 (+0100) Subject: mon: Add health checker for deprecated EC plugins and techniques X-Git-Tag: v21.0.1~93^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b94da2785fbc1aa830701d0c8dc435b22166551;p=ceph.git mon: Add health checker for deprecated EC plugins and techniques We want to reduce the number of EC plugins and techniques we support in order to focus dev and test effort on the ones that are most useful. We are deprecating the following plugins and techniques in Umbrella, and dropping support for them in the V release: * shec * clay * all non-reed_sol_van jerasure techniques This commit adds a health checker to print a warning message if the cluster is using any of the deprecated plugins/techniques and instructs the user to migrate objects to a different pool. Signed-off-by: Jamie Pryde --- diff --git a/qa/standalone/erasure-code/test-erasure-code-plugins.sh b/qa/standalone/erasure-code/test-erasure-code-plugins.sh index 95f1cc0ed4f..ad891018b15 100755 --- a/qa/standalone/erasure-code/test-erasure-code-plugins.sh +++ b/qa/standalone/erasure-code/test-erasure-code-plugins.sh @@ -142,4 +142,44 @@ function TEST_ec_profile_blaum_roth_warning() { return 0 } +function TEST_ec_profile_deprecated_plugin_warning() { + local dir=$1 + + setup $dir || return 1 + run_mon $dir a || return 1 + run_mgr $dir x || return 1 + for id in $(seq 0 2) ; do + run_osd $dir $id || return 1 + done + create_rbd_pool || return 1 + wait_for_clean || return 1 + + echo "Starting test for deprecated EC plugin health warning" + + # Create a clay profile (deprecated) + ceph osd erasure-code-profile set clay plugin=clay k=3 m=2 || return 1 + + # Create a shec profile (deprecated) + ceph osd erasure-code-profile set shec plugin=shec k=4 m=2 c=2 || return 1 + + # Create a non-reed_sol_van jerasure profile (deprecated) + ceph osd erasure-code-profile set jerasure-cauchy plugin=jerasure k=3 m=2 technique=cauchy_good || return 1 + + # Create a reed_sol_van jerasure profile (not deprecated) + ceph osd erasure-code-profile set jerasure-rsv plugin=jerasure k=3 m=2 technique=reed_sol_van || return 1 + + CEPH_ARGS='' ceph --admin-daemon $(get_asok_path mon.a) log flush || return 1 + sleep 10 + grep -F "1 or more EC profiles are using a plugin and/or technique that are deprecated" $dir/mon.a.log || return 1 + grep "clay.*deprecated plugin 'clay'" $dir/mon.a.log || return 1 + grep "shec.*deprecated plugin 'shec'" $dir/mon.a.log || return 1 + grep "jerasure-cauchy.*deprecated jerasure technique 'cauchy_good'" $dir/mon.a.log || return 1 + + ! grep "jerasure-rsv.*deprecated" $dir/mon.a.log || return 1 + + teardown $dir || return 1 + return 0 +} + + main test-erasure-code-plugins "$@" diff --git a/src/mon/HealthMonitor.cc b/src/mon/HealthMonitor.cc index fee5c3d17d4..db3b5ae9bd1 100644 --- a/src/mon/HealthMonitor.cc +++ b/src/mon/HealthMonitor.cc @@ -1369,7 +1369,8 @@ void HealthMonitor::check_netsplit(health_check_map_t *checks, std::set details; + list blaum_roth_details; + list deprecated_details; //This is a loop that will go through all the erasure code profiles for (auto& erasure_code_profile : mon.osdmon()->osdmap.get_erasure_code_profiles()) { @@ -1386,22 +1387,68 @@ void HealthMonitor::check_erasure_code_profiles(health_check_map_t *checks) if ((w <= 2) || (w >= 256)) { ostringstream ds; ds << "The value of w must be greater than 2 and less than 256"; - details.push_back(ds.str()); + blaum_roth_details.push_back(ds.str()); } if (!is_prime(w + 1)) { ostringstream ds; ds << "w+1="<< w+1 << " for the EC profile " << erasure_code_profile.first << " is not prime and could lead to data corruption"; - details.push_back(ds.str()); + blaum_roth_details.push_back(ds.str()); + } + } + } + + // Check for plugins and techniques that are deprecated in Umbrella + auto plugin = erasure_code_profile.second.find("plugin"); + if (plugin != erasure_code_profile.second.end()) { + const string& plugin_name = erasure_code_profile.second.at("plugin"); + + // Check if plugin is clay, shec (including legacy variants) or legacy jerasure + if (plugin_name == "clay" || + plugin_name == "shec" || + plugin_name == "shec_generic" || + plugin_name == "shec_sse3" || + plugin_name == "shec_sse4" || + plugin_name == "shec_neon" || + plugin_name == "jerasure_generic" || + plugin_name == "jerasure_sse3" || + plugin_name == "jerasure_sse4" || + plugin_name == "jerasure_neon") { + ostringstream ds; + ds << "EC profile '" << erasure_code_profile.first + << "' uses deprecated plugin '" << plugin_name << "'"; + deprecated_details.push_back(ds.str()); + } + // Check if plugin is jerasure with non-reed_sol_van technique + else if (plugin_name == "jerasure") { + auto technique_it = erasure_code_profile.second.find("technique"); + if (technique_it != erasure_code_profile.second.end()) { + const string& technique_name = erasure_code_profile.second.at("technique"); + if (technique_name != "reed_sol_van") { + ostringstream ds; + ds << "EC profile '" << erasure_code_profile.first + << "' uses deprecated jerasure technique '" << technique_name << "'"; + deprecated_details.push_back(ds.str()); + } } } } } - if (!details.empty()) { + + if (!blaum_roth_details.empty()) { ostringstream ss; ss << "1 or more EC profiles have a w value such that w+1 is not prime." << " This can result in data corruption"; - auto &d = checks->add("BLAUM_ROTH_W_IS_NOT_PRIME", HEALTH_WARN, ss.str(), details.size()); - d.detail.swap(details); + auto &d = checks->add("BLAUM_ROTH_W_IS_NOT_PRIME", HEALTH_WARN, ss.str(), blaum_roth_details.size()); + d.detail.swap(blaum_roth_details); + } + + if (!deprecated_details.empty()) { + ostringstream ss; + ss << "1 or more EC profiles are using a plugin and/or technique that are " + << "deprecated in the Umbrella release. This will be unsupported in the V release. " + << "Migrate objects to a new pool that uses a supported plugin and technique. "; + auto &d = checks->add("DEPRECATED_EC_PLUGIN", HEALTH_WARN, ss.str(), deprecated_details.size()); + d.detail.swap(deprecated_details); } }