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 for ct install getting stuck when printing logs: close readers when done with reading #557

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

skylenet
Copy link
Contributor

What this PR does / why we need it:

In some cases kubectl logs .. was hanging for us. This mainly happened with pods that logged lines with a lot of characters.

The fix of closing both pipes after reading them successfully did the trick and we weren't getting stuck anymore.


Which issue this PR fixes *:

There are some closed issue related to this problem:

Special notes for your reviewer:

This is how you can reproduce the stuck kubectl logs:

git clone [email protected]:ethpandaops/ethereum-helm-charts.git 
cd ethereum-helm-charts
git checkout bbusa/grandine
docker run --rm --network host --workdir /workdir --volume "$HOME/.kube/config:/root/.kube/config:ro" --volume "$(pwd):/workdir" quay.io/helmpack/chart-testing:v3.8.0 ct install --config ct.yaml --charts charts/ethereum-node --helm-extra-set-args="--values=charts/ethereum-node/ci/networks/sepolia.yaml --values=charts/ethereum-node/ci/clients/execution/nethermind.yaml --values=charts/ethereum-node/ci/clients/consensus/grandine.yaml"

I've also tried using the kubectl request-timeout to see if the command would exit, but that didn't happen. The only way for it to terminate was to close the io readers.

Example of a command that got stuck :

kubectl --request-timeout=1m0s logs ethereum-node-si0kgvb2xz-beacon-0 --namespace ethereum-node-si0kgvb2xz --container grandine

@skylenet skylenet force-pushed the skylenet/fixup-close-stdout-stderr branch from 37afcf1 to f358bc3 Compare May 31, 2023 10:57
@skylenet
Copy link
Contributor Author

friendly ping @davidkarlsen @cpanato 🙏

@skylenet
Copy link
Contributor Author

Any chance on having someone look at this @davidkarlsen ?

@davidkarlsen
Copy link
Member

hi @skylenet - sorry for the delay, merging now. Thanks!

@cpanato cpanato merged commit 054d55e into helm:main Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants