summaryrefslogtreecommitdiff
path: root/libpod/runtime_volume_linux.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-06-08 13:44:49 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-06-08 16:14:13 +0200
commit84b55eec27967d1a528c4f49f100393668638e1a (patch)
treeeda35001bf81abaa90fe132c007046b2887f3443 /libpod/runtime_volume_linux.go
parentb64e20a53d3f5de262f2c475be490b35977d5f32 (diff)
downloadpodman-84b55eec27967d1a528c4f49f100393668638e1a.tar.gz
podman-84b55eec27967d1a528c4f49f100393668638e1a.tar.bz2
podman-84b55eec27967d1a528c4f49f100393668638e1a.zip
logs: k8s-file: fix race
Fix a race in the k8s-file logs driver. When "following" the logs, Podman will print the container's logs until the end. Previously, Podman logged until the state transitioned into something non-running which opened up a race with the container still running, possibly in the "stopping" state. To fix the race, log until we've seen the wait event for the specific container. In that case, conmon will have finished writing all logs to the file, and Podman will read it until EOF. Further tweak the integration tests for testing `logs -f` on a running container. Previously, the test only checked for one of two lines stating that there was a race. Indeed the race was in using `run --rm` where a log file may be removed before we could fully read it. Fixes: #10596 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/runtime_volume_linux.go')
0 files changed, 0 insertions, 0 deletions