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

fix: restart lark loguri cause start failed #3219

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Howie59
Copy link

@Howie59 Howie59 commented Jul 15, 2024

if the container was not created by nerdctl, by default logURI args is empty.

logConfig, err := generateLogConfig(dataStore, id, options.LogDriver, options.LogOpt, options.GOptions.Namespace)

when exec nerdctl restart, it will use logURI start log path, then will cause
FATA[0000] 1 errors: failed to start binary process with cmdArgs []: exec: no command

return nil, fmt.Errorf("failed to start binary process with cmdArgs %v: %w", cmd.Args, err)

@Howie59
Copy link
Author

Howie59 commented Jul 15, 2024

ref: #1274
i changed this code and encountered another problem!!
hope for reply

@AkihiroSuda
Copy link
Member

Can we have a test?

@@ -117,6 +117,8 @@ func NewTask(ctx context.Context, client *containerd.Client, container container
return nil, err
}
ioCreator = cio.LogURI(u)
} else if flagD && logURI == "" {
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add comment for this specific case!

Copy link
Member

Choose a reason for hiding this comment

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

Ping @Howie59

@apostasie
Copy link
Contributor

Hey @Howie59
Thanks for this!
Do you think you would be able to add a test for it and comment the code so that we can merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants