Skip to content

feat(stream): log the event when stream copy failed#48334

Merged
thaJeztah merged 1 commit intomoby:masterfrom
7sunarni:master
Aug 19, 2024
Merged

feat(stream): log the event when stream copy failed#48334
thaJeztah merged 1 commit intomoby:masterfrom
7sunarni:master

Conversation

@7sunarni
Copy link
Contributor

@7sunarni 7sunarni commented Aug 15, 2024

- What I met
I met a problem when I ran KinD failed in my machine, and I found that KinD can not write it's config to docker container from KinD log.

After I checked the KinD code, I realized that when ran echo "hello" | docker exec -i $CONTAINER cat /dev/stdin will not get any output in my machine (works well in other machine). So, there must be a problem in somewhere.

Then I spent lots of time on docker cli, docker daemon, containerd, containerd-shim to find where the input or output data lost, because there is not failed log.

I hope this commit will help people save their time if they have same problem.

- What I did
add failed log when copy from stdin to iop pipe stdin

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@7sunarni
Copy link
Contributor Author

@cpuguy83 hello~ can you take a look here and take a review?

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

Thanks!

At a quick glance, this seems fine to me; I left some suggestions, and can wait for others to have a look in case I overlooked any reason not to log these.

(FWIW; some maintainers are currently on vacation, so some delay may happen w.r.t. reviews / feedback)

@thaJeztah thaJeztah added status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Aug 15, 2024
@7sunarni
Copy link
Contributor Author

Yes, you are right. I just adjust the log to make likes other log output in the project.

Signed-off-by: 7sunarni <710720732@qq.com>
@7sunarni
Copy link
Contributor Author

Fine. I adjusted the error message.

@thaJeztah thaJeztah added this to the 28.0.0 milestone Aug 16, 2024
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

sorry for the delay, thought I already submitted 🙈

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

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants