[Windows] cmd/dockerd: create panic.log file without readonly flag#42984
Merged
thaJeztah merged 1 commit intoNov 3, 2021
Merged
Conversation
Signed-off-by: Aleksandr Chebotov <[email protected]>
al-cheb
force-pushed
the
al-cheb/create-panic-log-without-readonly
branch
from
November 2, 2021 15:41
ae88d9e to
b865204
Compare
Member
samuelkarp
approved these changes
Nov 3, 2021
Member
|
CI is green, but Jenkins failed to cleanup workspace afterwards (tracked in #42974) |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes / addresses:
- What I did
Create panic.log on Windows without the Read-only attribute
- How I did it
Set the bit 0o200 (owner write permission):
os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o200)- How to verify it
ReadOnly should not be set:
- Description for the changelog
After docker EE bump to version 20.10.8, docker service doesn't start properly after reboot with error:
fatal: open C:\ProgramData\docker\panic.log: Access is denied.Docker 20.10.7 and Go version go1.13.15:
Docker 20.10.8 and Go version go1.16.7m5:
After version of Go runtime bumped above 1.13 the behavior of OpenFile API is changed (https://golang.org/doc/go1.14#windows):
For example:
Go 1.13.15:
Go 1.16.7:
- A picture of a cute animal (not mandatory but encouraged)