Page MenuHomePhabricator

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?
Perfectly compatible

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.

syncer assigned this task to Dmitry.Aug 31 2019, 12:40 AM
syncer triaged this task as Low priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
Dmitry added a comment.Sep 4 2019, 7:47 PM

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

dmbaturin closed this task as Resolved.Sep 6 2019, 4:21 PM
dmbaturin set Is it a breaking change? to Perfectly compatible.
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.

c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.Sun, Oct 13, 3:06 PM