fix delete running bundle dir when ctr t start a container again#2605
fix delete running bundle dir when ctr t start a container again#2605crosbymichael merged 1 commit intocontainerd:masterfrom
Conversation
666cd04 to
4403b42
Compare
|
@crosbymichael @AkihiroSuda I thiin this bug needs to be fixed ASAP. Because ctr is installed as docker-containerd-ctr. If I run docker-containerd-ctr t start to start a container which has beed started by docker. This container can't stop, pause, restore unless the host restart. |
37d82de to
930862a
Compare
lifubang
left a comment
There was a problem hiding this comment.
Thanks. I have finished.
|
@crosbymichael How about this one? I pull the latest version, there still have this error: |
|
@lifubang Can you squash these 2 commits? No reason to have the prior code version as a separate commit. @crosbymichael this seems like a reasonable bug fix to not remove a container's workdir if inadvertently running a command a second time. |
930862a to
557e8e0
Compare
Signed-off-by: Lifubang <[email protected]> code optimization after review Signed-off-by: Lifubang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2605 +/- ##
=========================================
+ Coverage 45.04% 47.5% +2.46%
=========================================
Files 92 87 -5
Lines 10106 8150 -1956
=========================================
- Hits 4552 3872 -680
+ Misses 4834 3556 -1278
- Partials 720 722 +2
Continue to review full report at Codecov.
|
|
@estesp @crosbymichael finished. Please check it. Thanks. |
|
LGTM |
Signed-off-by: Lifubang [email protected]
First, create a redis container:
Then, I run ctr t start again:
redis7's workdir is deleted by mistake.
This is because os.RemoveAll in defer func in bundle.go
Please check it, thanks.