Skip to content

Conversation

@junnplus
Copy link
Member

@junnplus junnplus commented Mar 29, 2022

Signed-off-by: Ye Sijun [email protected]

TL;DR: In order to be compatible with the restart policies of docker in nerdctl, we need enhance containerd's restart manager by adding a label:
containerd.io/restart.policy, containerd.io/restart.count.

Discussed in containerd/nerdctl#945

policy, _ := restart.NewPolicy("on-failure")
container, err := client.NewContainer(ctx, id,
    restart.WithStatus(containerd.Running),
    restart.WithPolicy(policy))

@junnplus junnplus force-pushed the restart-policy branch 3 times, most recently from d5549d4 to 87259b0 Compare March 29, 2022 04:53
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 29, 2022

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 29, 2022

Build succeeded.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 👍

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 29, 2022

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 29, 2022

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 29, 2022

Build succeeded.

@junnplus
Copy link
Member Author

/retest

@junnplus junnplus requested a review from AkihiroSuda March 29, 2022 16:57
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 29, 2022

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 30, 2022

Build succeeded.

@junnplus
Copy link
Member Author

junnplus commented Apr 1, 2022

@AkihiroSuda PTAL 🙏

Copy link
Member

@kzys kzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that this Docker-compatible restart support is something nerdctl wants and cannot implement by itself by being a short-lived CLI. However would we make containerd Docker-compatible in this way?

There are other features that would need a persistent daemon such as health check (see #5609). I'm unsure that we'd like to have all of them in containerd.

@AkihiroSuda
Copy link
Member

However would we make containerd Docker-compatible in this way?

Yes, I don't see a problem, as the plugin can be turned off.

There are other features that would need a persistent daemon such as health check (see #5609). I'm unsure that we'd like to have all of them in containerd.

We can have a healthcheck plugin too.
Users can turn off when they don't need it.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 7, 2022

Build succeeded.

@junnplus junnplus requested review from AkihiroSuda, fuweid and kzys April 7, 2022 15:55
@junnplus
Copy link
Member Author

junnplus commented Apr 8, 2022

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 8, 2022

Build succeeded.

@junnplus junnplus requested a review from kzys April 10, 2022 08:48
@junnplus
Copy link
Member Author

Ping @AkihiroSuda @kzys @dmcgowan

@fuweid
Copy link
Member

fuweid commented Apr 19, 2022

@AkihiroSuda the change looks good to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants