Page MenuHomePhabricator

System DNS Server Order Incorrect
Needs testing, LowPublicBUG

Description

The order of nameservers in /etc/resolv.conf in VyOS does not currently reflect the order in which those nameservers are added and committed, which is necessary for situations where domains are only resolvable by specific nameservers. The /etc/resolv.conf file is parsed in order, so if the first nameserver that is queried in the list returns NXDOMAIN, the domain will not resolve, even if later nameservers do in fact have a record for it.

(ignore the 209 DNS servers, those are in bug report T1714)

vyos@cr01-vyos# set system name-server 192.168.1.1                                              
[edit]                                                                                          
vyos@cr01-vyos# set system name-server 8.8.8.8                                                  
[edit]                                                                                          
vyos@cr01-vyos# set system name-server 1.1.1.1                                                  
[edit]                                                                                          
vyos@cr01-vyos# commit                                                                          
[edit]                                                                                          
vyos@cr01-vyos# cat /etc/resolv                                                                 
resolvconf/  resolv.conf                                                                        
[edit]                                                                                          
vyos@cr01-vyos# cat /etc/resolv.conf                                                            
                                                                                                
### Autogenerated by VyOS ###                                                                   
### Do not edit, your changes will get overwritten ###                                          
                                                                                                
nameserver 1.1.1.1                                                                              
nameserver 192.168.1.1                                                                          
nameserver 8.8.8.8                                                                              
nameserver 209.18.47.61                                                                         
nameserver 209.18.47.62                                                                         
                                                                                                
domain <removed>                                                                        
search <removed>

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.2-rolling-201910050117
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

trae32566 created this task.Oct 6 2019, 6:33 PM
pasik added a subscriber: pasik.Oct 6 2019, 9:11 PM
syncer changed the task status from Open to Needs testing.Nov 16 2019, 11:14 PM
syncer assigned this task to Viacheslav.
syncer triaged this task as Low priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
trae32566 added a comment.EditedNov 17 2019, 7:04 PM

It looks like this is indeed fixed now!

vyos@cr01-vyos:~$ cat /etc/resolv.conf 

### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###

nameserver fd52:d62e:8011:ffff:192:168:255:1
nameserver 192.168.255.1
nameserver 1.1.1.1
nameserver 209.18.47.61
nameserver 209.18.47.62

search tx.rr.com
vyos@cr01-vyos:~$ show conf com | grep 'system name-server'
set system name-server 'fd52:d62e:8011:ffff:192:168:255:1'
set system name-server '192.168.255.1'
set system name-server '1.1.1.1'

Note that T1714 is still present, and search domains (search and domain in /etc/resolv.conf) appear to be entirely missing other than the DHCP received one.

Thank you 😄

Viacheslav added a comment.EditedDec 4 2019, 6:40 PM

This bug is fixed in latest rolling releases 1.3.
Tested on

vyos@1.3-roll# run show vers
Version:          VyOS 1.3-rolling-201912040242

But on 1.2 the problem remains (after reboot).

vyos@1.2-roll-ns:~$ sh configuration commands | match name-ser
set system name-server '192.168.122.1'
set system name-server '8.8.8.8'
set system name-server '1.1.1.1'
vyos@1.2-roll-ns:~$ sudo cat /etc/resolv.conf 

### Autogenerated by VyOS ###
### Do not edit, your changes will get overwritten ###

nameserver 8.8.8.8
nameserver 192.168.122.1
nameserver 1.1.1.1
vyos@1.2-roll-ns:~$ sh version 
Version:          VyOS 1.2-rolling-201912030217
This comment was removed by trae32566.