elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.81k stars 8.2k forks source link

[Fleet] Loading Package from ES lead to incorrect cache #151195

Closed nchaulet closed 1 year ago

nchaulet commented 1 year ago

Description

Loading a package from Elasticsearch instead of the registry seems to lead to an incorrect cache, and create invalid ingest pipelines.

It seems when triggering a package install, after loading an invalid package in cache this lead to creating invalid ingest pipeline with the -default suffix

For example with the cisco_umbrella package

Screenshot 2023-02-14 at 12 21 44 PM

How to reproduce

On a fresh Kibana instance:

  1. Install cisco_umbrella package
    POST kbn:/api/fleet/epm/packages/cisco_umbrella/1.6.0
    {
    "force": true
    }
    # Should return only one pipeline without the `default` suffix
    GET _ingest/pipeline/logs-cisco_umbrella.log-1.6.0* 
  2. Create a package policy using it
  3. Restart Kibana
  4. Update the package policy previously created (this will load the package in cache from ES instead of the registry)
  5. Renstall cisco_umbrella package
    POST kbn:/api/fleet/epm/packages/cisco_umbrella/1.6.0
    {
    "force": true
    }
    # Should return 2 pipeline and one with the `default` suffix
    GET _ingest/pipeline/logs-cisco_umbrella.log-1.6.0* 
elasticmachine commented 1 year ago

Pinging @elastic/fleet (Team:Fleet)