-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] pipeline with id [*] does not exists #116343
Comments
Pinging @elastic/fleet (Team:Fleet) |
@nchaulet I haven't yet been able to reproduce this with your given steps, so I can't yet verify your fix in #116707. I'm unclear on why the registry connectivity would cause this issue. Inspecting the code where we retrieve packages, it seems we attempt to retrieve packages that were already installed from in-memory cache, then ES regardless of connectivity: kibana/x-pack/plugins/fleet/server/services/epm/packages/get.ts Lines 200 to 235 in ddf092f
That said, I can see why your fix should work. I do think this code needs refactoring. It's not clear to me why we need special post-processing logic for retrieving packages from ES to rebuild the Here's where we get this from the registry: kibana/x-pack/plugins/fleet/server/services/epm/registry/index.ts Lines 114 to 126 in ddf092f
And how we rebuild this when retrieving from ES: kibana/x-pack/plugins/fleet/server/services/epm/archive/storage.ts Lines 216 to 278 in ddf092f
|
Maybe the use case for this is for uploaded packages. If that's the case, then we should always build this PackageInfo object in Kibana so that behavior is consistent regardless of how the package is retrieved. |
Yes I think the use case for this is uploaded package and I agree that we should always build this package info in Kibana and have only one code path for uploaded or registry packages. It will also help to avoid PR to the package registry each time we add something to the package (like this one elastic/package-registry#750) For the refactoring I think it's probably too late to do it for 7.16 (my fix could help to mitigate the problem) but probably something we should tackle for next releases.
I was only able to reproduce the bug when my Kibana was not able to reach the registry during the setup, otherwise I think the cache is populated somehow and there is no bug. |
Yep, definitely agree.
Ah, maybe there's a missing step between 6 and 7 here to hit the setup API?
|
Description
In happens after an upgrade that the agent is not able to send data with that error in the logs (replace synthetics-http-0.2.1 by others datastream and package too)
We saw a few time this error for different packages and different datastream that do not define any ingest pipeline, I tried different upgrade scenario and was not able to reproduce.
What's odd is that none of these pipelines should exist. These data streams are not intended to have a pipeline in these versions of these packages. For example,
metrics-system.process.summary
does not have any pipeline but has been reported as missing a pipeline in error logs.How to reproduce
How to reproduce locally?
You need to corrupt the package cache
Using nginx as a package,
GET _index_template/metrics-nginx.stubstatus
) you should see a default pipeline in the index template settings that do not exists.Bug details: If there is a no cache entry we install the package from a saved version saved in Elasticsearch and there is a bug here were we populate the
ingest_pipeline
withdefault
, we should solve that bug. But we should probably think about a more long term solution too relying on a cache system to install a package seems not future proof.I think in most of the scenarios users probably did not call the reinstall call, but we have a mechanism that reinstalled package to install the fleet final pipeline during upgrade I think this with some connection error to the registry could have caused the same issue
Workaround
Force reinstalling the package should solve this. In case the force install package does not solve it yet. You should probably manually rollover the data streams.
Way to investigate and potential workaround (⚠️ not tested yet)
metrics-system.process-1.4.0
. Could you run the following command for me from Dev Tools in Kibana:default
if you customized the namespace:This last command would need to be repeated for each of these data streams. There is no bulk API for this. Another option could be to delete the underlying indices completely if you don't need the data,⚠️ Warning: this deletes all data ingested by Elastic Agent:
We're not yet sure of a root cause here so anything you can share would be helpful in making sure that we can fix this bug.
The text was updated successfully, but these errors were encountered: