Add cleanup IO process after nerdctl stop#4316
Add cleanup IO process after nerdctl stop#4316liuchangyan wants to merge 1 commit intocontainerd:mainfrom
Conversation
|
can we have a test please ? |
Sure |
87c6d21 to
2689504
Compare
| // Stop the container after 2 seconds | ||
| go func() { | ||
| time.Sleep(2 * time.Second) | ||
| base.Cmd("stop", testContainerName).Run() |
There was a problem hiding this comment.
Sequentially stopping the container makes things more deterministic. AssertOk here is necessary to ensure proper stop
There was a problem hiding this comment.
Sequentially stopping the container makes things more deterministic.
AssertOkhere is necessary to ensure proper stop
Thanks! Since the container is long-running with --rm, we use a goroutine to trigger stop — otherwise run blocks and we can’t proceed. Already updated the stop call to use AssertOK to ensure it completes properly.
|
Hey @liuchangyan Looks like the new tests are failing? |
|
I can help to create a ci for this bug. |
@ningmingxiao please go ahead |
|
I think we should mv io.close in waitContainerStop it will make sure container is really stopped. |
|
Hi @liuchangyan, What is the next step for this PR? |
|
Fix #4315
In the
ctrandCRIcall paths ofcontainerd, the remainingFIFOfiles(e.g., /run/containerd/fifo)are primarily cleaned up through theDeleteinterface of thetask. However, in thenerdctl stoppath, this interface is not invoked, so an explicit call toio.Closeis required to clean them up.