[20.10 backport] [Windows]] cmd/dockerd: create panic.log file without readonly flag#42987
Merged
thaJeztah merged 1 commit intoNov 9, 2021
Conversation
Signed-off-by: Aleksandr Chebotov <[email protected]> (cherry picked from commit b865204) Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah
force-pushed
the
20.10_backport_create_panic_log_without_readonly
branch
from
November 3, 2021 13:30
aacf97d to
6611c72
Compare
tianon
approved these changes
Nov 8, 2021
Member
|
Member
Author
samuelkarp
approved these changes
Nov 9, 2021
thaJeztah
deleted the
20.10_backport_create_panic_log_without_readonly
branch
November 9, 2021 21:05
3 tasks
8 tasks
1 task
|
fixes docker/for-win#12066 |
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.
backport of #42984
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)