Windows docker -f doesn't follow instantly #30046

Open
hongxima opened this Issue Jan 11, 2017 · 4 comments

Projects

None yet

4 participants

@hongxima

BUG REPORT INFORMATION

Description

Windows docker -f doesn't follow instantly as expected. Most the times It just outputted the history logs and stuck there , seldom it outputted new logs every one minute.
This happens ONLY to Windows docker.

Steps to reproduce the issue:
1.
docker run -d --name=log-tester microsoft/windowsservercore powershell while ($true) {$d=Get-Date; write-host 'Time is:' $d; Sleep 1}
2.
docker logs -f log-tester

Describe the results you received:
Logs didn't get printed every second. Instead, only history logs were outputted but new logs either didn't printed (most testcases) or printed in a batch every one minute (in very few testcases)

Describe the results you expected:
logs should be outputted in stream instantly. In this particular testcase, logs should get printed every second.

Output of docker version:

C:\Users\Administrator>docker version
Client:
 Version:      1.14.0-dev
 API version:  1.26
 Go version:   go1.7.3
 Git commit:   f93c04d
 Built:        Sat Dec 17 15:16:54 2016
 OS/Arch:      windows/amd64

Server:
 Version:             1.14.0-dev
 API version:         1.26
 Minimum API version: 1.24
 Go version:          go1.7.3
 Git commit:          f93c04d
 Built:               Sat Dec 17 15:16:54 2016
 OS/Arch:             windows/amd64
 Experimental:        false

Output of docker info:

C:\Users\Administrator>docker info
Containers: 8
 Running: 3
 Paused: 0
 Stopped: 5
Images: 25
Server Version: 1.14.0-dev
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.351.amd64fre.rs1_release_inmarket.161014-1755)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 3.999 GiB
Name: WIN2016-DOCKER-01
ID: MCVH:SYEM:X2IN:FRIH:CYGH:HGLB:PAKZ:XAME:2IE7:PNZF:XTTL:EDLM
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 192.168.180.200:5000
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):
VMware Workstation 12.5.1 Virtual Machine

@thaJeztah
Member

Wondering; is it time related, or does if flush logs once a specific size is reached? If you try the same test container, but make it log a bigger log message, does that change what you're seeing?

Is your client also running inside the VM, or is it running on the host, and connecting with the VM over tcp/ip?

/cc @johnstep

@johnstep
Contributor

I am looking into this now.

@hongxima

We also tried containers with massive logs, it did prove either time or 'log-buffer' related. Most of the test cases it just stuck there with the history logs printed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment