-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"Podman pod logs --latest" doesn't work. #15556
Comments
Thanks for reaching out! I can reproduce as well. |
This is a workaround.
Second method: you could consider move nameOrID into struct PodLogsOptions, like pod inspect -l, pod top -l. func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrID []string, options entities.PodLogsOptions) error {
....... |
I can give this one a shot while I work on the conmon-rs stuff |
Awesome! Thanks a lot, @jakecorrenti |
Hi @jakecorrenti I think I found the problem. Can I work on it? Or you are in a middle of finishing it. |
Hey, I'm still working on it. Had my first week back at school last week so just had to find my groove. I plan on trying to finish today. I'll let you know if I want to pass it off! |
Excellent. |
Just want to confirm that the expected output here (based on the documentation of |
Not sure what the question is, |
Ok, that was what my gut feeling was telling me. The help page for |
Yes, The use case where this would differ would be if the Pod is older then the latest container and if the Pod contained more then one container. If latest pod contained only latest container, then they would be the same. |
Ubuntu Linux 20.04, Podman 4.2.0
This issue also can be found in Podman 4.1.0, & Podman 3.4.4
./podman pod logs -l
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/containers/podman/v4/cmd/podman/pods.logs(0x240ad20?, {0xc0002aa450, 0x0, 0x1?})
/home/fanhuawei/podman/podman-4.2.0/cmd/podman/pods/logs.go:124 +0x3d9
github.com/spf13/cobra.(*Command).execute(0x240ad20, {0xc00009e070, 0x1, 0x1})
/home/fanhuawei/podman/podman-4.2.0/vendor/github.com/spf13/cobra/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0x2412520)
/home/fanhuawei/podman/podman-4.2.0/vendor/github.com/spf13/cobra/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/fanhuawei/podman/podman-4.2.0/vendor/github.com/spf13/cobra/command.go:918
github.com/spf13/cobra.(*Command).ExecuteContext(...)
/home/fanhuawei/podman/podman-4.2.0/vendor/github.com/spf13/cobra/command.go:911
main.Execute()
/home/fanhuawei/podman/podman-4.2.0/cmd/podman/root.go:99 +0xc5
main.main()
/home/fanhuawei/podman/podman-4.2.0/cmd/podman/main.go:40 +0x7c
The text was updated successfully, but these errors were encountered: