]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Add health checker for deprecated EC plugins and techniques
authorJamie Pryde <jamiepry@uk.ibm.com>
Wed, 20 May 2026 10:31:53 +0000 (11:31 +0100)
committerJamie Pryde <jamiepry@uk.ibm.com>
Wed, 20 May 2026 10:31:53 +0000 (11:31 +0100)
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 <jamiepry@uk.ibm.com>
qa/standalone/erasure-code/test-erasure-code-plugins.sh
src/mon/HealthMonitor.cc

index 95f1cc0ed4f4eee1cb4968b274842e99dcf9fcf0..ad891018b15db66349b0863b59f825a616fd2de4 100755 (executable)
@@ -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 "$@"
index fee5c3d17d46aae9b89cfffae33755ef573728db..db3b5ae9bd1b0470fe317b3c8ba147996810ac82 100644 (file)
@@ -1369,7 +1369,8 @@ void HealthMonitor::check_netsplit(health_check_map_t *checks, std::set<std::str
 
 void HealthMonitor::check_erasure_code_profiles(health_check_map_t *checks)
 {
-  list<string> details;
+  list<string> blaum_roth_details;
+  list<string> 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);
   }
 }