mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
launcher: the removed-engine refusal is the provider's typed error
RenderBlockVolumeDeployments refuses smartwal and parallel-walstore through durable.RemovedEngineName, wrapped with %w, so callers get the same *durable.RemovedEngineError (engine, advice) as from the provider and blockvolume, and no manifest. blockmaster already depended on the durable package through its other imports; nothing is added to its build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a3b6080a8
commit
30c6ebda2c
1 file changed
+5
-2
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend/chunkstore/layout"
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend/durable"
|
||||
"github.com/seaweedfs/seaweed-block/core/lifecycle"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
@@ -63,10 +64,12 @@ func RenderBlockVolumeDeployments(plan lifecycle.BlockVolumeWorkloadPlan, cfg K8
|
||||
if cfg.DurableImpl == "" {
|
||||
cfg.DurableImpl = "walstore"
|
||||
}
|
||||
// the removed experimental engines are refused typed, exactly as the provider and blockvolume refuse them
|
||||
if err := durable.RemovedEngineName(cfg.DurableImpl); err != nil {
|
||||
return nil, fmt.Errorf("launcher: %w", err)
|
||||
}
|
||||
switch cfg.DurableImpl {
|
||||
case "walstore":
|
||||
case "smartwal", "parallel-walstore":
|
||||
return nil, fmt.Errorf("launcher: durable impl %q is a removed experimental engine; a volume it created by a removed experimental engine; copy the data to a walstore volume with v1.0.x first", cfg.DurableImpl)
|
||||
default:
|
||||
return nil, fmt.Errorf("launcher: durable impl %q invalid; want walstore", cfg.DurableImpl)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user