-
Notifications
You must be signed in to change notification settings - Fork 18.9k
cmd/dockerd: remove Windows EventLog logging hook #44288
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
base: master
Are you sure you want to change the base?
Conversation
golang.org/x/sys/windows now implements this, so we can use that instead of a local implementation. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is the equivalent of the local implementation. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Previously we waited for 60 seconds after the service faults to restart it. However, there isn't much benefit to waiting this long. We expect 15 seconds to be a more reasonable delay. Co-Authored-by: Kevin Parsons <kevpar@microsoft.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Commit 92bf0a5 added a logrus hook for ETW logging, but we still had the old Eventlog hook as well. This patch removes the old Eventlog hook; a simmilar patch was merged in containerd, which describes: > EventLog is very old and provides a poor experience. We have supported > ETW for logging for a while, which is much better. We have also > observed an issue where EventLog keeps containerd.exe open, preventing > containerd from being upgraded to a new version. Due to all of this, > it makes sense to remove the old EventLog hook in favor of using ETW > logging on Windows as the primary diagnostic experience. Co-Authored-By: Kevin Parsons <kevpar@microsoft.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
This PR may also be interesting to see if we can take a similar approach; |
|
Looks like the tests pass, but the test script fails. Looks like it may be unable to read the daemon logs, so either this patch broke that, or it's looking for the "old" logs, and we need to update the script to get the |
|
So the etwhook uses moby/cmd/dockerd/docker_windows.go Lines 47 to 52 in 92bf0a5
|
b7d6007 to
0de7195
Compare
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
0de7195 to
16291a3
Compare
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
@jterry75 made a good comment on the containerd PR, and probably describes the problem I see in our CI scripts trying to read the logs (so I guess we can't remove this after all).
It felt a bit odd to send every log twice (once to ETW, and once to EventLog - wondering if that has an impact on "heavy logging" (e.g. "debug" enabled)) 🤔 |
|
It's not really all that "heavy" as it doesnt actually do anything other than the function invocation to send it to both listeners. But basically ETW just drops it if there is no listener. So its "doing work" but not a lot of work. |
Commit 92bf0a5 (#38541) added a logrus hook for ETW logging, but we still had the old Eventlog hook as well.
This patch removes the old Eventlog hook; a simmilar patch was merged in
containerd, which describes:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)