Page MenuHomeVyOS Platform

dhcp requested WAN ip address doesn't get search parameter in /etc/resolv.conf in 1.2.0-rolling+201902210337
Open, NormalPublic

Description

I helped confirm which versions of vyos had the https://phabricator.vyos.net/T1259 "feature"

I had a vm (kvm based) with 1.2.0-rc7.
I added todays rolling image.
It clearly had newer openvpn package.
So i wanted to install official 1.2.0 image to see what version of openvpn it has.
I couldn't add the official image because the hostname couldn't be resolved.
The rolling version had a /etc/resolv.conf but was totally empty.
After adding a line with "nameserver 192.x.y.z" i was able to add the image, reboot .
After reporting about in the other phabricator task, i rebooted in the 3 versions now available on my vm,.
1.2.0-rc7 & 1.2.0 final were fully functional.
the rolling version after reboot now does have the "nameserver 192.x.y.z" line but lacks the "search [domain]" line

I did however find 2 files related to this in /etc:

[email protected]:~$ show system image
The system currently has the following image(s) installed:

1: 1.2.0
2: 1.2.0-rolling+201902210337 (default boot)
3: 1.2.0-rc7

[email protected]:~$ cat /etc/resolv.conf

Autogenerated by host_name.py

nameserver 192.168.1.1

[email protected]:~$ cat /etc/resolv.conf
resolv.conf resolv.conf.dhclient-new-eth0
[email protected]:~$ cat /etc/resolv.conf.dhclient-new-eth0
search bitsource.net
nameserver 192.168.1.1

I will add tomorrows new rolling image (with the fixed openvpn issue) to my VM and update asap.

*update: typo's*

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rolling+201902210337
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Related Objects

Event Timeline

fromport renamed this task from dhcp requested WAN ip address doesn't get search parameter in /etc/resolv.conf to dhcp requested WAN ip address doesn't get search parameter in /etc/resolv.conf in 1.2.0-rolling+201902210337.Feb 22 2019, 1:32 AM
hagbard changed the task status from Open to Confirmed.Feb 22 2019, 5:37 PM
hagbard changed the task status from Confirmed to In progress.Feb 22 2019, 7:54 PM
hagbard triaged this task as Normal priority.
hagbard changed the task status from In progress to Needs testing.Feb 22 2019, 7:58 PM

@fromport http://dev.packages.vyos.net/repositories/current/vyos/pool/main/v/vyos-1x/vyos-1x_1.3.0-3_all.deb or Feb 23rd rolling release. If it's urgent I can trigger a build for you.

@fromport does the new pkg solve the issue you are seeing? It did during all my tests.

@fromport does the new pkg solve the issue you are seeing? It did during all my tests.

Why isn't it included in the new nightly builds ?

I just installed the last nightly and still no luck;

[email protected]:~$ cat /etc/resolv.conf

  1. Autogenerated by host_name.py ###

So I downloaded & installed the new package:

[email protected]:/tmp$ wget http://dev.packages.vyos.net/repositories/current/vyos/pool/main/v/vyos-1x/vyos-1x_1.3.0-3_all.deb
--2019-02-27 15:45:27-- http://dev.packages.vyos.net/repositories/current/vyos/pool/main/v/vyos-1x/vyos-1x_1.3.0-3_all.deb
Resolving dev.packages.vyos.net (dev.packages.vyos.net)... 185.144.208.249
Connecting to dev.packages.vyos.net (dev.packages.vyos.net)|185.144.208.249|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133672 (131K) [application/x-troff-man]
Saving to: ‘vyos-1x_1.3.0-3_all.deb’

vyos-1x_1.3.0-3_all.deb 100%[==============================================>] 130.54K 541KB/s in 0.2s

2019-02-27 15:45:27 (541 KB/s) - ‘vyos-1x_1.3.0-3_all.deb’ saved [133672/133672]

[email protected]:/tmp$ sudo dpkg -i vyos-1x_1.3.0-3_all.deb
(Reading database ... 57431 files and directories currently installed.)
Preparing to unpack vyos-1x_1.3.0-3_all.deb ...
Unpacking vyos-1x (1.3.0-3) over (1.3.0-3) ...
Setting up vyos-1x (1.3.0-3) ...
Processing triggers for systemd (215-17+deb8u10) ...

after rebooting:

vbash-4.1# cat /etc/resolv.conf

Autogenerated by host_name.py

nameserver 192.168.1.1

search bitsource.net

Your package seems to fix it.
Please include it in the new nightly builds!

That should be already in there for a few days now.

syncer moved this task from In Progress to Finished on the VyOS 1.3 Equuleus board.
syncer added a subscriber: syncer.

@hagbard need to confirm it in the crux too

syncer moved this task from Needs Triage to In Progress on the VyOS 1.2 Crux (VyOS 1.2.1) board.

There is still an issue with it, when the system is rebooted all is working as expected, but when you configure dhcp on the fly, hostname.py is still doing something weird and leaves resolv.conf broken.

Dhcp client doesn't trigger hostname.py, I'll check if I can get that working.

Ok, so I found it. host_name.py is being called when dhcp had been configured and the system rebooted. vyatta-cfg-system didn't call host_name.py when an interface is configured via dhcp, so when you configure dhcp for the first time and don't reboot /etc/resolv.conf stayed empty.
I need to test it in crux, but i think there is the same issue, therefore you would need 2 commit in crux, host_name.py and the one from the address node in vyatta-cfg-system.

syncer added a subscriber: dmbaturin.

Since @dmbaturin reverted this, reopen

dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin set Issue type to Unspecified (please specify).