fix the restart desired to running when task not found#6833
fix the restart desired to running when task not found#6833estesp merged 1 commit intocontainerd:mainfrom
Conversation
|
I tested TestRunRestart of nerdctl locally, and it works. containerd --version |
|
Build succeeded.
|
| if err != nil { | ||
| logrus.WithError(err).Error("monitor") | ||
| if desiredStatus != containerd.Stopped { | ||
| if desiredStatus == containerd.Stopped { |
There was a problem hiding this comment.
if desiredStatus is running, the "on-failure" case will get empty status in the Line 245.
I am not sure that there is a way to store the status after delete. Anyway, it is safe to use with nerdctl.
Maybe we can add the comment about known issue.
There was a problem hiding this comment.
An empty status has no effect on on-failure, which expects a status whose ExitStatus is not 0.
There was a problem hiding this comment.
I get it, I added the comment about known issue in 243-245 .
52ff683 to
8232c44
Compare
Signed-off-by: Ye Sijun <[email protected]>
8232c44 to
35994a4
Compare
|
Build succeeded.
|
|
I think we can watch event to handle the reconcile if necessary ~ |
Signed-off-by: Ye Sijun [email protected]
Report of @AkihiroSuda #6830 (comment)
I'm sorry for misunderstanding 9503d72#diff-a9d90e82d0fee932f0437ab217a8ef14e4a56b4be02321de5193de0ad98e20f9L239-L249
For the case when
Taskreturns not found and the restart desired to running, we need to continue to restart the container.