-
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.13](backport #4846) [windows] if elastic-agent run
fails, log error to Application EventLog
#4918
Conversation
…tLog (#4846) * windows if `elastic-agent run` fails, log error to eventviewer * linter fixes * updated fragment and skip cleaning up registry (cherry picked from commit 6c20730) # Conflicts: # internal/pkg/agent/cmd/run.go # internal/pkg/agent/install/install_windows.go # internal/pkg/agent/install/uninstall.go
Cherry-pick of 6c20730 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 |
We are not planning to release new 8.13 binaries so I'm closing this one. |
1af0fe8
to
6283cc7
Compare
Quality Gate failedFailed conditions |
This pull request has not been merged yet. Could you please review and merge it @leehinman? 🙏 |
@leehinman unsure why you reopened this but no more 8.13 patch release will be made. |
What does this PR do?
On Windows if the run command fails, then the error message will be sent to the Application EventLog. Other OSes do not require this since they capture stderr from processes that run as services, Windows does not.
This is only for the
run
command because the other commands should be run from the CLI, where the error is already published on stderr.Why is it important?
If any error happens before the elastic-agent internal logging is setup and the run command exits while running as a Windows service, the error is lost. Without this error it is very difficult to determine why
elastic-agent run
is failing.Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
How to test this PR locally
elastic-agent
with-a
flag pointing to CA certificates on the local filesystemelastic-agent
serviceelastic-agent
serviceRelated issues
Questions to ask yourself
Screenshots
This is an automatic backport of pull request #4846 done by [Mergify](https://mergify.com).