Skip to content
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] Integration policy doesn't get deleted if it is orphaned #129683

Closed
jen-huang opened this issue Apr 6, 2022 · 4 comments
Closed

[Fleet] Integration policy doesn't get deleted if it is orphaned #129683

jen-huang opened this issue Apr 6, 2022 · 4 comments
Labels
bug Fixes for quality problems that affect the customer experience Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@jen-huang
Copy link
Contributor

Discovered while working on a case related to #129677.

If an integration policy is orphaned (its parent agent policy does not exist), this can cause various issues in the UI. The obvious solution is to bulk delete these policies using /api/fleet/package_policies/delete, but this does not work (even with force: true) due to that API attempting to update the non-existent agent policies. An example response:

[{"id":"dd177090-fdf5-4a2c-8cc1-5353a61f2b3d","success":false,"statusCode":404,"body":{"message":"Saved object [ingest-agent-policies/50cab1a0-aae0-11ec-aa7d-55640840aca0] not found"}},{"id":"917352cd-5933-414e-9c7b-a9fdddb9f262","success":false,"statusCode":404,"body":{"message":"Saved object [ingest-agent-policies/0f4f84d0-a1a8-11ec-87e9-8b3c1c1f01f5] not found"}}]

This API should be able to delete orphaned integration policies, perhaps after logging a warn that its parent agent policy doesn't exist.

@jen-huang jen-huang added bug Fixes for quality problems that affect the customer experience Team:Fleet Team label for Observability Data Collection Fleet team Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. labels Apr 6, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@juliaElastic
Copy link
Contributor

Is this a duplicate of #134518?

@kpollich
Copy link
Member

@juliaElastic No I don't think so. This issue seems to be about updating the DELETE API for package policies to not error in the case where a package policy's parent agent policy has been deleted. The other is to investigate the root cause of how we wind up in the scenario.

@kpollich
Copy link
Member

This should be addressed by #182220. Closing in favor of the reusable policies work.

@kpollich kpollich closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Supportability Improve our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better. Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

4 participants