On Windows, when the daemon attempts to rotate logs, if there is an active reader, the rotation fails.
This failure was totally unrecoverable until #40920
However that PR only allows the daemon to recover after an error.
The issue occurs when the daemon tries to rename a file that a log reader (e.g. docker logs client) has open.
This should have, based on the best info I've found, been fixed by using FILE_SHARE_DELETE (#39974), however that does not seem to be the case.
Furthermore, I've tried to apply this same change to all file opens in that package and still hit the same issue.
What this means right now is that if there is a docker logs client open and log rotation is enabled, if a file is ready for rotation then log writes will error out until the log client is gone.
On Windows, when the daemon attempts to rotate logs, if there is an active reader, the rotation fails.
This failure was totally unrecoverable until #40920
However that PR only allows the daemon to recover after an error.
The issue occurs when the daemon tries to rename a file that a log reader (e.g.
docker logsclient) has open.This should have, based on the best info I've found, been fixed by using FILE_SHARE_DELETE (#39974), however that does not seem to be the case.
Furthermore, I've tried to apply this same change to all file opens in that package and still hit the same issue.
What this means right now is that if there is a
docker logsclient open and log rotation is enabled, if a file is ready for rotation then log writes will error out until the log client is gone.