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

Bug #1770557 reported by Wladimir Mutel on 2018-05-11
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
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

Wladimir Mutel (mwg) 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
Wladimir Mutel (mwg) wrote :
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
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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers