-
Notifications
You must be signed in to change notification settings - Fork 148
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
[8.16](backport #6085) Fix audit/unenroll calls when agent runs fleet-server #6363
base: 8.16
Are you sure you want to change the base?
Conversation
* Fix audit/unenroll calls when agent runs fleet-server * Fix integration test * Increase output for failed test * move notification attempt * move notification attempt * audit/uninstall will call localhost with certonly tls * Fix linter * remove tls setting * Add PR link to changelog * stop checking if we need to notify in an error is encountered * Shorten non-fatal error messages to prevent output issues in terminals * Don't load agentinfo, use ID value from config instead * Add unprivilged tests to audit unenroll integration tests * Add comments for setting hosts (cherry picked from commit f321d8a) # Conflicts: # internal/pkg/agent/install/uninstall.go
Cherry-pick of f321d8a has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
This pull request has not been merged yet. Could you please review and merge it @michel-laterman? 🙏 |
Quality Gate failedFailed conditions |
What does this PR do?
Call audit/unenroll (during uninstall) before components are stopped if the elastic-agent is running a fleet-server instance.
Why is it important?
Agents running fleet-server instances would always get an error because fleet-server would be stopped by the time the notify call is attempted.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature works./changelog/fragments
using the changelog toolHow to test this PR locally
Enroll an agent in a policy with the fleet-server integration and uninstall the agent
Related issues
This is an automatic backport of pull request Fix audit/unenroll calls when agent runs fleet-server #6085 done by Mergify.