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

armbianmonitor -u: rationalize paste server retrying, use ANSI dmesg #6836

Conversation

rpardini
Copy link
Member

armbianmonitor -u: rationalize paste server retrying, use ANSI dmesg

  • armbianmonitor: shellfmt, no changes
  • armbianmonitor: squash shellcheck warnings around the main getopts case statement
    • b and B were never parsed
    • an * case is added to handle invalid options
  • armbianmonitor -u: rationalize paste server retrying, use ANSI dmesg
    • use PIPESTATUS to check all steps for failure
    • avoid blaming paste server if data collection failed

rpardini added 3 commits June 29, 2024 20:32
…se statement

- `b` and `B` were never parsed
- an `*` case is added to handle invalid options
- use PIPESTATUS to check all steps for failure
- avoid blaming paste server if data collection failed
@github-actions github-actions bot added size/large PR with 250 lines or more BSP Board Support Packages labels Jun 29, 2024
@rpardini rpardini marked this pull request as ready for review June 29, 2024 20:59
@rpardini rpardini requested a review from a team as a code owner June 29, 2024 20:59
@rpardini rpardini merged commit d29305a into armbian:main Jun 30, 2024
@EvilOlaf
Copy link
Member

Looping through paste servers doesn't seem to work. At least it doesn't catch the current error to try the next server.

@rpardini
Copy link
Member Author

Looping through paste servers doesn't seem to work. At least it doesn't catch the current error to try the next server.

Could you share logs? (eg from bash -x /usr/bin/armbianmonitor -u)

Here I've a machine with a network misconfiguration, and that loops over both servers (and both fail "correctly") so wondering what could it be.

@EvilOlaf
Copy link
Member

EvilOlaf commented Nov 16, 2024

"Unfortunately" TheLinuxBug fixed the error (disk ran out of space) before thinking about grabbing such logs and now cannot test anymore. Apologize

@rpardini
Copy link
Member Author

the error (disk ran out of space)

Hmm, in this case the bug is probably on the server side -- it should reply with a 500-level HTTP code, which would cause curl to "correctly" fail and the script to try the next server.

@rpardini
Copy link
Member Author

Hmm, the server seems to at least try to spit out 500 error when this problem occurs: https://github.com/rpardini/ansi-hastebin/blob/fefe5edda54f5cafc113554a3a28d93cb5a9b013/lib/document_handler.js#L161-L162

Seems that curl doesnt' exit with an error if it receives a 500. Hmm. Will send a patch. Thanks for reporting @EvilOlaf

@rpardini
Copy link
Member Author

#7487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BSP Board Support Packages size/large PR with 250 lines or more
Development

Successfully merging this pull request may close these issues.

2 participants