Skip to content

Don't abort install.sh silently when DNS doesn't resolve yet - #125

Merged
liamdevss merged 1 commit into
serveroshq:mainfrom
JoshTheDeveloperr:fix/install-check-dns-pipefail
Nov 29, 2026
Merged

liamdevss merged 1 commit into
serveroshq:mainfrom
JoshTheDeveloperr:fix/install-check-dns-pipefail

Conversation

@JoshTheDeveloperr

Copy link
Copy Markdown
Contributor

What this changes

Adds || true to the getent ahostsv4 pipeline in check_dns() in docker/self-hosted/install.sh so an unresolved domain prints a warning and continues instead of exiting silently.

Why

install.sh runs with set -euo pipefail. When either the panel domain or the wildcard check (serveros-check-$RANDOM.$DOMAIN) doesn't resolve yet, getent ahostsv4 exits with code 2 and stderr is redirected to /dev/null. With pipefail, that fails the getent ... | awk ... assignment and aborts the script silently right after Docker is installed, before the if [ -z "$found" ] warning is ever reached.

AI helped diagnose the bug and draft this fix; I reviewed the diff and tested it on my own server.

How I tested it

  • Reproduced the silent exit (exit=2 on getent ahostsv4 serveros-check-*.<domain>) on a Linux VPS with bash -x
  • Verified bash -n docker/self-hosted/install.sh
  • Verified check_dns under set -euo pipefail with unresolved, mismatched, and matching DNS results
  • Ran the patched install.sh on my Linux VPS and confirmed it warns on missing wildcard DNS and completes the install

Checklist

  • It's one focused change, ideally under 500 lines.
  • I added or updated tests.
  • I've read every line, including anything an AI tool wrote, and I can explain it (AI_POLICY.md).
  • If AI wrote a large part of this, I've said so above.
  • No secrets, keys or private data are in the diff.

@JoshTheDeveloperr
JoshTheDeveloperr requested a review from a team as a code owner November 28, 2026 16:57
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Everyone in this pull request has signed the CLA. Thanks!

@JoshTheDeveloperr

Copy link
Copy Markdown
Contributor Author

I have read the ServerOS CLA and I agree to its terms

github-actions Bot added a commit that referenced this pull request Nov 28, 2026

@liamdevss liamdevss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

Will fix CI errors soon.

@liamdevss
liamdevss merged commit cfd28cd into serveroshq:main Nov 29, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants