Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compose restart command #1533

Merged
merged 2 commits into from
Nov 24, 2022
Merged

Conversation

djdongjin
Copy link
Member

Similar to #1494, this one adds nerdctl compose restart command. It's done by calling nerdctl restart CONTAINER_ID for each service containers.

Signed-off-by: Jin Dong jindon@amazon.com

// RestartOptions stores all option input from `nerdctl compose restart`
type RestartOptions struct {
TimeChanged bool
Timeout uint
Copy link
Member

@AkihiroSuda AkihiroSuda Nov 22, 2022

Choose a reason for hiding this comment

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

Can we remove TimeChanged by checking Timeout > 0, or Timeout != nil ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Changed to use a *uint in both compose restart and compose stop so nil can be used to check if timeout is passed or not.

@djdongjin djdongjin changed the title Add compose restart command Add compose restart command Nov 22, 2022
@djdongjin djdongjin force-pushed the compose-restart branch 4 times, most recently from 48ab5ce to 4b18ce5 Compare November 22, 2022 16:20
Signed-off-by: Jin Dong <jindon@amazon.com>
Signed-off-by: Jin Dong <jindon@amazon.com>
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.

Thanks

@AkihiroSuda AkihiroSuda merged commit 264e39c into containerd:main Nov 24, 2022
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.

2 participants