reproduced it with 0.8 and 0.7.1
Running nomad logs multiple times for an allocation that wrote more then X KB of output
to STDOUT produces different results (even when the output isn't changing anymore).
Lines are missing and/or the output is disordered (line X+1 appears before line X).
This seems only to happen when the output of an allocation is bigger then a certain size (1004K of output is sufficient to reproduce it).
I expect that when an allocation is not printing anything new to STDOUT/STDERR that:
nomad logs (starting from the offset) is exactly the same then alloc/logs/*.stdout.0, no missing lines, lines appear at the same offset,nomad logs multiple times always outputs the samenomad logs multiple times, compare the outputnomad logs runs:mkdir -p /tmp/logs
for ((i=0;i<30;i++)); do nomad logs <ALLOC_ID> | tee /tmp/logs/$i; done
Thanks for the thorough report @fho! I was easily able to reproduce the bug. I ran log 10 times and it produced 3 distinct results. We'll look into it as soon as possible.
Most helpful comment
Thanks for the thorough report @fho! I was easily able to reproduce the bug. I ran
log10 times and it produced 3 distinct results. We'll look into it as soon as possible.