-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] 'conflict' creating index-pattern
SO when installing package during 8.0.0 to 8.1.0 upgrade (docker only?)
#126611
Comments
index-pattern
SO when installing package in 8.0.0 to 8.1.0-SNAPSHOT upgrade (docker only?)index-pattern
SO when installing package during 8.0.0 to 8.1.0 upgrade (docker only?)
Pinging @elastic/fleet (Team:Fleet) |
Some interesting facts about the second case (upgrade from 7.17.0 to 8.0.0):
@elastic/kibana-security could there be other cases that explain why there were these |
Aliases wouldn't cause regular conflict errors like this, but it's good to know regardless that only the Default space is being used and there were no aliases present. I did a brief review of the |
@jportner Just a bit more detail that may be useful or not, I've debugged locally and the conflict errors are coming from the create call here, and overwrite is set to true :https://github.com/elastic/kibana/blob/main/src/core/server/saved_objects/import/import_saved_objects.ts#L145 |
I also saw the conflicts being correctly detected and then discarded in the |
Thanks for that detail, so it seems like it's not a bug inside importSavedObjects. Yeah, in that case it would be really helpful to see ES query logs to better understand what is going on. |
I'm finding this line a bit curious in the repository bulk create method:
For context, the
If my reading of this is right, it doesn't appear that |
Ah, good find, and sorry this didn't occur to me earlier. It looks like this would indeed result in a 409 error for this object. There is a related issue for the SOC.update API that was opened a week ago: #126240 TL;DR we defensively added OCC here to make sure that a saved object didn't change spaces between the point where we 1. conducted the preflight check and 2. overwrote the object. At any rate, if we determine this is the actual root cause and removing the preflight OCC solves the issue, we can do that. I'm not sure we get much practical benefit from this OCC, it just seemed like a good idea at the time. |
Makes sense, thanks for the explanation.
Yeah it's because we're trying to install several packages in parallel so they may try to import the same index pattern. That said, Mark and I just discussed we think we can safely ignore this error if the another package install created it and just move on. We'll experiment with that before considering removing the OCC from this. |
Move version checks to agent builder to skip tests due to the following stack bugs: - Kibana bug "index conflict on install policy" (elastic/kibana#126611) - Elastic agent bug "deadlock on startup" (#6331 (comment))
Linked to #126113.
We have had two occurrences reported to the fleet team where a conflict error is returned when creating saved objects during install of packages, e.g kubernetes:
In fleet we use the
import
method withoverwrite: true
to create our saved objects during package install here.Here is a summary of the 2 occurrences of this error that have been reported to us:
1. ECK (Originally reported on internal slack here)
"Another ECK e2e test failure: when upgrading from 8.0.0 to 8.1.0-SNAPSHOT Kibana fails to install the kubernetes package claiming there is a conflict in index pattern. "
View Full Error Stack
2. Docker (#126113)
On prem docker installation upgrading from 7.17.0 to 8.0.0, see issue for more detail.
The text was updated successfully, but these errors were encountered: