DNS info is not loaded by dhclient

Bug #1850775 reported by Pengpeng Sun
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Confirmed
Undecided
Unassigned
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi Team,

Could you please help to confirm if this is an issue on Ubuntu19.10 Desktop?

1. Update /etc/dhcp/dhclient.conf file to include below 2 new lines.
   supersede domain-name "vmware.com";
   supersede domain-name-servers 10.117.0.1;

2. Reboot

3. check DNS info by "systemd-resolve --status", the DNS domain and server is not set. But /run/systemd/resolved.conf.d/isc-dhcp-v4-ens160.conf contains the new DNS domain and server.

4. Manually run "systemctl try-reload-or-restart systemd-resolved.service" and then DNS is set correctly, "systemd-resolve --status" output have the new DNS domain and server.

I tried the same steps on Ubuntu18.04 Desktop, no such issue. DNS updated correctly after reboot.

Thanks,
Pengpeng

Pengpeng Sun (pengpengs)
affects: cloud-init (Ubuntu) → network-manager (Ubuntu)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Looks like that during boot time components get fired up in wrong order, some dependency in the systemd service files is needed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Pengpeng Sun (pengpengs) wrote :

Thanks Till, which systemd service's dependency got changed?

I compared /lib/systemd/system/systemd-resolved.conf between 18.04 and 19.10, they are same. There is "After=systemd-sysusers.service systemd-networkd.service".

I do NOT know when and who triggers /etc/dhcp/dhclient-enter-hooks.d/resolved script at boot, but it's possible that when this script executed, systemd-resolved.service is not ready for reload or restart.

Revision history for this message
Dan Streetman (ddstreet) wrote :

@pengpengs can you test with the systemd versions from this ppa:
https://launchpad.net/~ddstreet/+archive/ubuntu/systemd

I suspect this might be caused by bug 1849608

Revision history for this message
Pengpeng Sun (pengpengs) wrote :

Thanks @Dan, I applied the patch https://launchpadlibrarian.net/448207988/resolved.patch to my VM, but the issue is still reproducing.
The md5sum line is before creating "$statedir/isc-dhcp-v4-$interface.conf", while I can see the isc-dhcp-v4-$interface.conf file is created on my VM.

I think the root cause is not same with bug 1849608

Revision history for this message
Pengpeng Sun (pengpengs) wrote :

@Dan, The issue is resolved by your fix.

Instead of only changing /etc/dhcp/dhclient-enter-hooks.d/resolved script, I added your repository "ppa:ddstreet/systemd" and updated/upgraded systemd, then the issue was NOT reproducing.

Revision history for this message
Pengpeng Sun (pengpengs) wrote :

@Dan, could you please confirm if your fix will be patched on Ubuntu19.10? If yes, when it will happen?

Revision history for this message
Balint Reczey (rbalint) wrote :

@pengpengs The fix is present in the systemd version in eoan-proposed and will be released around next week when all the all the fixes are verified.

https://launchpad.net/ubuntu/+source/systemd/242-7ubuntu3.2

Revision history for this message
Pengpeng Sun (pengpengs) wrote :

@Balint, thanks a lot for the information.

Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :

DNS setting is correct with updated systemd package 242-7ubuntu3 from -proposed.

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.