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 git@github.com: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

Signed-off-by: Rafael Matias <rafael@skyle.net>
@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
3 checks passed
bjw-s pushed a commit to bjw-s/dotfiles that referenced this pull request Jul 11, 2023
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [helm-ct](https://github.com/helm/chart-testing) | minor | `3.8.0`
-> `3.9.0` |

---

### Release Notes

<details>
<summary>helm/chart-testing (helm-ct)</summary>

###
[`v3.9.0`](https://github.com/helm/chart-testing/releases/tag/v3.9.0)

[Compare
Source](https://github.com/helm/chart-testing/compare/v3.8.0...v3.9.0)

##### What's Changed

- update goreleaser flags by
[@&#8203;cpanato](https://github.com/cpanato) in
[helm/chart-testing#539
- feat: verify if targetBranch is present in git repo by
[@&#8203;fty4](https://github.com/fty4) in
[helm/chart-testing#511
- add github grouping of log lines by
[@&#8203;joejulian](https://github.com/joejulian) in
[helm/chart-testing#556
- fix for ct install getting stuck when printing logs: close readers
when done with reading by
[@&#8203;skylenet](https://github.com/skylenet) in
[helm/chart-testing#557
- update golangci and helm by
[@&#8203;cpanato](https://github.com/cpanato) in
[helm/chart-testing#575
- add --extra-helm-args to ct lint by
[@&#8203;AndersBennedsgaard](https://github.com/AndersBennedsgaard) in
[helm/chart-testing#552
- Fix for Dockerfile smell DL3048 by
[@&#8203;grosa1](https://github.com/grosa1) in
[helm/chart-testing#543

##### New Contributors

- [@&#8203;fty4](https://github.com/fty4) made their first
contribution in
[helm/chart-testing#511
- [@&#8203;joejulian](https://github.com/joejulian) made their first
contribution in
[helm/chart-testing#556
- [@&#8203;skylenet](https://github.com/skylenet) made their first
contribution in
[helm/chart-testing#557
- [@&#8203;AndersBennedsgaard](https://github.com/AndersBennedsgaard)
made their first contribution in
[helm/chart-testing#552
- [@&#8203;grosa1](https://github.com/grosa1) made their first
contribution in
[helm/chart-testing#543

**Full Changelog**:
helm/chart-testing@v3.8.0...v3.9.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi42LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNi42LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>
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