[PR #6754] [infrastructure] add internal health-check fallback for proxy readiness #26924

Open
opened 2026-08-05 07:07:58 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6754
Author: @CoderSufiyan
Created: 7/13/2026
Status: 🔄 Open

Base: mainHead: fix/issue-5892-proxy-env-fallback


📝 Commits (2)

  • a42b50b [infrastructure] add internal health-check fallback for proxy readiness
  • a8d438d [infrastructure] use curl --resolve for local Traefik health check

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 infrastructure_files/getting-started.sh (+6 -0)

📄 Description

Problem
wait_management_proxy in getting-started.sh only checks the embedded IdP endpoint via external DNS. When hairpin NAT is not configured, the host cannot reach its own external DNS name, causing the script to hang and proxy.env to be left unpopulated. This results in netbird-proxy crashing with invalid domain format: "".

Solution
Add a fallback health check via the Docker container name (netbird-server:80) so the script completes even when hairpin NAT prevents external DNS loopback.

Documentation

  • Documentation is not needed

Test
bash -n infrastructure_files/getting-started.sh

Fixes #5892

Summary by CodeRabbit

  • Bug Fixes
    • Improved service startup reliability by adding a fallback readiness check: if the proxy-based readiness endpoint can’t be reached, the system retries by attempting a direct connection to the local host using the configured port, completing initialization once successful.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/6754 **Author:** [@CoderSufiyan](https://github.com/CoderSufiyan) **Created:** 7/13/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/issue-5892-proxy-env-fallback` --- ### 📝 Commits (2) - [`a42b50b`](https://github.com/netbirdio/netbird/commit/a42b50bcc46a4fe89da7808083d9165ec9ed0a45) [infrastructure] add internal health-check fallback for proxy readiness - [`a8d438d`](https://github.com/netbirdio/netbird/commit/a8d438d74861e8cb5826b67aff682491970e0d3a) [infrastructure] use curl --resolve for local Traefik health check ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `infrastructure_files/getting-started.sh` (+6 -0) </details> ### 📄 Description **Problem** `wait_management_proxy` in `getting-started.sh` only checks the embedded IdP endpoint via external DNS. When hairpin NAT is not configured, the host cannot reach its own external DNS name, causing the script to hang and `proxy.env` to be left unpopulated. This results in `netbird-proxy` crashing with `invalid domain format: ""`. **Solution** Add a fallback health check via the Docker container name (`netbird-server:80`) so the script completes even when hairpin NAT prevents external DNS loopback. **Documentation** - [x] Documentation is **not needed** **Test** `bash -n infrastructure_files/getting-started.sh` Fixes #5892 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved service startup reliability by adding a fallback readiness check: if the proxy-based readiness endpoint can’t be reached, the system retries by attempting a direct connection to the local host using the configured port, completing initialization once successful. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 07:07:58 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#26924