Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

v2: Open log fifo with RDWR instead of WRONLY#2608

Merged
grahamwhaley merged 1 commit into
kata-containers:masterfrom
darfux:change_log_outpipe_to_rdwr_2
Apr 14, 2020
Merged

v2: Open log fifo with RDWR instead of WRONLY#2608
grahamwhaley merged 1 commit into
kata-containers:masterfrom
darfux:change_log_outpipe_to_rdwr_2

Conversation

@darfux
Copy link
Copy Markdown
Contributor

@darfux darfux commented Apr 14, 2020

Copy of #2591
Create a new PR to see if the travis-ci still stuck

Fixes: #2590

Signed-off-by: Li Yuxuan liyuxuan04@baidu.com

The container log fifo is opened as `O_WRONLY` now. When the read side
of fifo is closed temporarily such as restarting contaienrd, write to
`tty.Stdout` will get an EPIPE error and finally cause `io.CopyBuffer`
return. Then `ioCopy` closes the tty io and exits. Thus after containerd
restarted, the log fifo can't be reopened. The container will be blocked
forever after stdout/stderr buffer is full.

Opening the log fifo with `RDWR` instead of `WRONLY` avoids the fifo
returning EPIPE when the read side is closed, and keeps the fifo open
until the reader reopening it.

Fixes: kata-containers#2590

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
@darfux
Copy link
Copy Markdown
Contributor Author

darfux commented Apr 14, 2020

Hi @devimc the travis-ci seems happy here😆 Could you please restart the two failed cases as they have passed before?

@darfux
Copy link
Copy Markdown
Contributor Author

darfux commented Apr 14, 2020

This PR makes #2591 ok as well, let's continue the discussion there.

@grahamwhaley grahamwhaley merged commit 0fe23c8 into kata-containers:master Apr 14, 2020
@darfux darfux deleted the change_log_outpipe_to_rdwr_2 branch April 14, 2020 14:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container log pipe was closed after containerd restarting

3 participants