Skip to content

fix(BRE2-815): Halt on netbird err#322

Open
drewmalin wants to merge 2 commits intomainfrom
dm/failonnetbirdinstallfail
Open

fix(BRE2-815): Halt on netbird err#322
drewmalin wants to merge 2 commits intomainfrom
dm/failonnetbirdinstallfail

Conversation

@drewmalin
Copy link
Contributor

@drewmalin drewmalin commented Mar 9, 2026

Currently we treat this as a warning and proceed with the (doomed to fail) SSH installation.

[Step 3/3] Registering with Brev...
  Registration complete.
registration failed: setup command failed: setup command failed: exit status 1

Copilot AI review requested due to automatic review settings March 9, 2026 21:44
@drewmalin drewmalin requested a review from a team as a code owner March 9, 2026 21:44
Comment on lines -315 to -317
// netbird up reconfigures network routes; give them a moment
// to settle before making further RPC calls.
time.Sleep(2 * time.Second)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is solved by the backoff during ssh

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the behavior of the runSetup function in the registration flow so that a missing or failed netbird tunnel setup now halts registration with a proper error, rather than silently warning and proceeding to the (doomed-to-fail) SSH installation step. The terminal.Terminal parameter is also removed from runSetup since it's no longer used for printing warnings.

Changes:

  • runSetup is refactored to return an error instead of printing warnings via the terminal.
  • runRegister is updated to propagate the runSetup error and abort registration.
  • The time.Sleep(2 * time.Second) that settled network routes after a successful netbird setup is silently dropped as a side effect of the refactor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@drewmalin drewmalin force-pushed the dm/failonnetbirdinstallfail branch 2 times, most recently from c348322 to 5a536a7 Compare March 9, 2026 22:19
@drewmalin drewmalin force-pushed the dm/failonnetbirdinstallfail branch from 5a536a7 to 9e9eb1d Compare March 12, 2026 16:37
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