Page MenuHomeVyOS Platform

DNS nameservers from dhcp not set
Closed, ResolvedPublicBUG

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
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

I can't reproduce, tested live and installed.

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?

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.

So is it considered a bug or works as intented?

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.

syncer triaged this task as Low priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.

@yun can you check this issue on last rolling release, I think it fixed.

dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin added a subscriber: dmbaturin.

It was indeed a bug, caused by the same issue as all other subtasks of T1598: lack of proper synchronization.
If it re-appears, please reopen of course.