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

HAProxy UP check is unreliable #169

Closed
leninmehedy opened this issue Mar 18, 2024 · 2 comments · Fixed by #173
Closed

HAProxy UP check is unreliable #169

leninmehedy opened this issue Mar 18, 2024 · 2 comments · Fixed by #173
Assignees
Labels
Bug A error that causes the feature to behave differently than what was expected based on design docs P2 Required to be completed in the assigned milestone, but may or may not impact release schedule. released

Comments

@leninmehedy
Copy link
Member

leninmehedy commented Mar 18, 2024

Currently HAProxy status is checked using the log. However, it often fails to log the message because probably it gives up retrying....Also if HAProxy is restarted, it looses the logs and does not output the line Server be_servers/server1 is UP consistently (See

if (logResponse.body.includes('Server be_servers/server1 is UP')) {
).

As a result, solo fails to report if node start was successful.

My initial solution was to restart HAProxy, however even after manually restarting, it didn't solve the issue as HAProxy didn't output the log message Server be_servers/server1 is UP although sdk was able to invoke transactions. When I viewed /stats, it did report that node was up.

We need to figure out a reliable way to check if HAProxy is UP or not. Not sure if we can use the HAProxy /stats endpoint?, or use hedera-sdk to poll?

Notes:

  • If you would like to view the /stats endpoint, it is a bit complicated as below
    • Expose port 9090 of the HAProxy service (e.g. haproxy-node0-svc)
    • Open the corresponding configmap and at the bottom you will find the auth block separated by :. First part is username and the second part is the password.
    • Go to localhost:9090/stats and when prompted enter the username and password.
@leninmehedy leninmehedy added Bug A error that causes the feature to behave differently than what was expected based on design docs P2 Required to be completed in the assigned milestone, but may or may not impact release schedule. P3 Low priority issue. Will not impact the release schedule if not complete. labels Mar 18, 2024
@leninmehedy leninmehedy added this to Solo Mar 18, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Solo Mar 18, 2024
@leninmehedy leninmehedy removed the P3 Low priority issue. Will not impact the release schedule if not complete. label Mar 18, 2024
@leninmehedy leninmehedy changed the title HAProxy check is unstable HAProxy UP check is unstable Mar 18, 2024
@leninmehedy leninmehedy changed the title HAProxy UP check is unstable HAProxy UP check is unreliable Mar 18, 2024
@jeromy-cannon
Copy link
Contributor

jeromy-cannon commented Mar 18, 2024

talking with Nathan, we can run the data plane api which will give us the endpoints to check for the status.

https://www.haproxy.com/documentation/haproxy-data-plane-api/installation/install-on-haproxy/#run-the-api-in-docker

run this second docker image as a secondary container (side-car)

@jeromy-cannon jeromy-cannon moved this from 🆕 New to 🔖 Ready in Solo Mar 18, 2024
@jeromy-cannon jeromy-cannon moved this from 🔖 Ready to 🏗 In progress in Solo Mar 20, 2024
@jeromy-cannon jeromy-cannon moved this from 🏗 In progress to 👀 In review in Solo Mar 21, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Solo Mar 22, 2024
@swirlds-automation
Copy link
Contributor

🎉 This issue has been resolved in version 0.22.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A error that causes the feature to behave differently than what was expected based on design docs P2 Required to be completed in the assigned milestone, but may or may not impact release schedule. released
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants