elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

Wrong error message returned on delete trained model when model already deleted

Open maxhniebergall opened this issue 1 year ago • 2 comments

Elasticsearch Version

8.13

Installed Plugins

No response

Java Version

bundled

OS Version

23.3.0 Darwin Kernel Version 23.3.0 arm64 (M1 mac)

Problem Description

Calling DELETE _ml/trained_models/ when that model ID is referenced by an ingest processor / pipeline returns the error

  "error" : {
    "root_cause" : [
      {
        "type" : "status_exception",
        "reason" : "Cannot delete model [.elser_model_2] as it is still referenced by ingest processors; use force to delete the model"
      }
    ],

even when the model has already been force deleted.

Steps to Reproduce

PUT ELSER (there should be a builtin pipeline referencing ELSER) DELETE ELSER (you should receive the error message)

Logs (if relevant)

No response

maxhniebergall avatar Feb 12 '24 19:02 maxhniebergall

Pinging @elastic/ml-core (Team:ML)

elasticsearchmachine avatar Feb 12 '24 19:02 elasticsearchmachine

@maxhniebergall FYI I've added a PR to fix this issue: https://github.com/elastic/elasticsearch/pull/107188. I'd appreciate it if you could take a look when you get a chance, thanks!

batcity avatar Apr 09 '24 23:04 batcity