Correct logic of FIFO cleanup#4123
Conversation
|
Some additional info from my thinking/digging on this: we have information "loss" of sorts between container create (where we know whether FIFOs are set by the caller versus defaulted or our own "constructors" are used) and delete/close; I don't see any way to connect these information "dots" unless we change the API to return additional details which would then allow for more nuanced approach to the close handler for FIFOs. If anyone else has better ideas, would love any insight. |
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #4123 +/- ##
==========================================
- Coverage 42.43% 42.40% -0.03%
==========================================
Files 129 130 +1
Lines 14875 14884 +9
==========================================
Hits 6312 6312
- Misses 7644 7653 +9
Partials 919 919
Continue to review full report at Codecov.
|
|
i'll look at this today |
|
Thanks @crosbymichael! To be clear about my comment above, at create time we have a "richer" understanding of FIFOs; by the time we get to the |
|
so this I would almost say we defer this closer to be an opt that the client has to pass because they would know that type of IO they are connecting to. we could also just delete the individual files but we need a check to ensure that it is a fifo and not another type of file. Maybe this is the best solution for now: for f in files { } |
Make "IsFifo" a public function for use by other parts of containerd codebase. Signed-off-by: Phil Estes <[email protected]>
699197b to
4d64cce
Compare
|
PTAL @crosbymichael |
|
Build succeeded.
|
4d64cce to
ef3b01e
Compare
|
Build succeeded.
|
Only delete files which are FIFOs and only delete directories which are empty after deleting FIFOs. Signed-off-by: Phil Estes <[email protected]>
ef3b01e to
78ab1d1
Compare
|
Build succeeded.
|
|
Not sure how the Travis run got disconnected from the PR check status: https://travis-ci.org/github/containerd/containerd/builds/666909149 |
|
LGTM |
|
Most pleased to see this. Thanks @estesp ! |
|
I assume this will be in the next release, either |
|
@deitch no ETA, but several issues have been gathering in the 1.3 branch so I expect we will want to make a plan for 1.3.4 soon. 1.4 early alpha/betas should be coming soonish. |
|
Thanks Phil! |
Fixes: #4019
Only delete files which are FIFOs and only delete directories which are empty after deleting FIFOs.
Also contains a commit to move
isFifo()from a private function in pkg/process/io.go to a public function insys/Signed-off-by: Phil Estes [email protected]