[PR #1637] [MERGED] Enhance DNS failover reliability #14082

Open
opened 2026-08-05 02:09:25 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1637
Author: @lixmal
Created: 2/27/2024
Status: Merged
Merged: 3/1/2024
Merged by: @lixmal

Base: mainHead: fix/dns-failover


📝 Commits (9)

  • 31fe094 Fix using wrong array index in log to avoid potential panic
  • f01365a Increase gRPC connection timeout and add add the timeout resolv.conf option
  • b713070 On file backup restore, remove the first NS if it's the netbird NS
  • ac535d3 Add attempts and remove rotate
  • c2676c0 Fix linter
  • 780983e Use client.ConnectTimeout in signal/grpc/send
  • 6cf7340 Move regexs to the top
  • b99813f Make removing the nb server non-critical
  • a10d849 Bump dns mangager discovery message from debug to info to ease debugging

📊 Changes

7 files changed (+224 additions, -15 deletions)

View changed files

📝 client/internal/dns/file_linux.go (+20 -7)
📝 client/internal/dns/file_parser_linux.go (+63 -0)
📝 client/internal/dns/file_parser_linux_test.go (+130 -0)
📝 client/internal/dns/host_linux.go (+1 -1)
📝 client/internal/dns/resolvconf_linux.go (+3 -1)
📝 management/client/grpc.go (+4 -2)
📝 signal/client/grpc.go (+3 -4)

📄 Description

Describe your changes

This PR strengthens DNS failover by:

  • Increasing gRPC connection timeouts.
  • Adding a timeout option to resolv.conf for prompt failover.
  • Prioritizing failovers by removing the rotate option.
  • Removing the Netbird nameserver during backup file restoration (if it's the first entry).
  • Fixing an array indexing issue.

Relates to #1618

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/1637 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 2/27/2024 **Status:** ✅ Merged **Merged:** 3/1/2024 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `main` ← **Head:** `fix/dns-failover` --- ### 📝 Commits (9) - [`31fe094`](https://github.com/netbirdio/netbird/commit/31fe094ce858971b809636515ec9e75171d22638) Fix using wrong array index in log to avoid potential panic - [`f01365a`](https://github.com/netbirdio/netbird/commit/f01365a5f564c40f2fd410ccaf4e9260590abff3) Increase gRPC connection timeout and add add the timeout resolv.conf option - [`b713070`](https://github.com/netbirdio/netbird/commit/b713070120d3accbdbeec0dd931875fa220630d2) On file backup restore, remove the first NS if it's the netbird NS - [`ac535d3`](https://github.com/netbirdio/netbird/commit/ac535d3df969425e7307f322935bf2c53821e8e0) Add attempts and remove rotate - [`c2676c0`](https://github.com/netbirdio/netbird/commit/c2676c00dafc72a5d7fd60684bfbdbe85ecad628) Fix linter - [`780983e`](https://github.com/netbirdio/netbird/commit/780983eadf1fd7f209fa01ff070d0993aa80ec41) Use client.ConnectTimeout in signal/grpc/send - [`6cf7340`](https://github.com/netbirdio/netbird/commit/6cf7340ae77771a7d7ae0c6692fc9ca85b3bcda9) Move regexs to the top - [`b99813f`](https://github.com/netbirdio/netbird/commit/b99813fd1100df06b1b2e9f77005a131ccb392e9) Make removing the nb server non-critical - [`a10d849`](https://github.com/netbirdio/netbird/commit/a10d849214c339642ca02a47f1962d13a7e5b5bb) Bump dns mangager discovery message from debug to info to ease debugging ### 📊 Changes **7 files changed** (+224 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/dns/file_linux.go` (+20 -7) 📝 `client/internal/dns/file_parser_linux.go` (+63 -0) 📝 `client/internal/dns/file_parser_linux_test.go` (+130 -0) 📝 `client/internal/dns/host_linux.go` (+1 -1) 📝 `client/internal/dns/resolvconf_linux.go` (+3 -1) 📝 `management/client/grpc.go` (+4 -2) 📝 `signal/client/grpc.go` (+3 -4) </details> ### 📄 Description ## Describe your changes This PR strengthens DNS failover by: - Increasing gRPC connection timeouts. - Adding a timeout option to resolv.conf for prompt failover. - Prioritizing failovers by removing the rotate option. - Removing the Netbird nameserver during backup file restoration (if it's the first entry). - Fixing an array indexing issue. ## Issue ticket number and link Relates to #1618 ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [x] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <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 02:09:25 -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#14082