systemd-resolved should be restarted only on actual DHCP/DNS updates

Bug #1770557 reported by Wladimir Mutel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
High
Dimitri John Ledkov

Bug Description

My ISP gives me a DHCP IP with lease time about 2 minutes
in the script /etc/dhcp/dhclient-enter-hooks.d/resolved , a function make_resolv_conf is defined which creates config fragments in resolved.conf.d/ , then unconditionally restarts systemd-resolved service
so, about every 2 minutes, this service is restarted on my system, despite the fact that DNS configuration is not changed.
I would propose an update to the script, which first creates config fragments in temporary files, and then it restarts the service only when config is changed (or created/removed).
now going to attach my patch below

Tags: patch
Revision history for this message
Wladimir Mutel (mwg) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "resolved.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Wladimir Mutel (mwg) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Very nice! I'm sorry you hit this problem, and your analysis and solution look good. I will work on integrating it.

Changed in systemd (Ubuntu):
status: New → Confirmed
assignee: nobody → Dimitri John Ledkov (xnox)
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Wladimir Mutel (mwg) wrote :

well, this fix is related only to isc-dhcp-client whose functionality is replaced with systemd-networkd. so, don't know how relevant it is going to be

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

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: Triaged → 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.