Page MenuHomePhabricator

DNS nameservers from dhcp not set
Open, Requires assessmentPublicBUG

Description

Using vyos-1.2.0-rolling-201904260337, it seems that nameservers from dhcp are not properly being set. The config set system disable-dhcp-nameservers was not set.

Steps to reproduce, boot livecd:

Assign dhcp to eth0

config
set interfaces ethernet eth0 address dhcp
commit
save

Check /etc/resolv.conf:

cat /etc/resolv.conf
### Autogenerated by host_name.py ###

DNS servers are not set.. maybe because host_name.py runs too early?
if you now run sudo /usr/libexec/vyos/conf_mode/host_name.py. It will set /etc/resolv.conf with data from dhcp.

Details

Difficulty level
Unknown (require assessment)
Version
vyos-1.2.0-rolling+201904260337
Why the issue appeared?
Will be filled on close

Event Timeline

yun created this task.May 1 2019, 8:53 PM
hagbard added a subscriber: hagbard.May 1 2019, 9:42 PM

I can't reproduce, tested live and installed.

yun added a comment.May 2 2019, 5:33 AM

When is host_name.py called? Maybe my dhcp server just responds slow and host_name.py is called before dhcp server responds? Is that possible?

yun added a comment.May 2 2019, 6:18 PM

If that is the only point, race conditions can occur. I assume this is only called when comitting or loading the config.

Also this wont catch dhcp updates over time or switching networks

Only when you create an address, can be via dhcp or manually.

yun added a comment.May 4 2019, 10:47 AM

So is it considered a bug or works as intented?

pasik added a subscriber: pasik.May 4 2019, 1:27 PM
yun added a comment.May 29 2019, 12:25 PM

Not much response, but multiple users I recommend VyOS to are having this issue. So i would say it's a bug and not intended behaviour.