Skip to content

resolve: extend systemd-resolve so that it can push per-interface DNS… - #7576

Merged
poettering merged 1 commit into
systemd:masterfrom
poettering:resolve-push
Dec 14, 2017
Merged

poettering merged 1 commit into
systemd:masterfrom
poettering:resolve-push

Conversation

@poettering

Copy link
Copy Markdown
Member

… configuration into systemd-resolved

This is useful to debug things, but also to hook up external post-up
scripts with resolved.

Eventually this code might be useful to implement a
resolvconf(8)-compatible interface for compatibility purposes. Since the
semantics don't map entirely cleanly as first step we add a native
interface for pushing DNS configuration into resolved, that exposes the
correct semantics, before adding any compatibility interface.

See: #7202

@yuwata

yuwata commented Dec 13, 2017

Copy link
Copy Markdown
Member

lgtm.

@yuwata

yuwata commented Dec 13, 2017

Copy link
Copy Markdown
Member

From the second to last commits are duplicate to PR #7588.

Comment thread man/systemd-resolve.xml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we stress that the specified interface is unmanaged? I was very confused by getting the following result.

$ sudo systemd-resolve -i enp0s25 --set-dns=8.8.8.8
Failed to set DNS configuration: Link enp0s25 is managed.

@poettering

Copy link
Copy Markdown
Member Author

I force pushed a new version now, that emphasizes the "interface is managed" error in two ways: the man page is more explicitly, and systemd-resolve will actually print a longer explanation now, telling the user what to do.

@yuwata ptal!

Comment thread src/resolve/resolve-tool.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message is very helpful for me. Thanks. However, why do you add this only for --set-dns=? How about the other options?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. My thinking was that this exits early in this case, and hence we don't have to add this for the other calls. But that thinking is just wrong, actually, as it is fully valid to change only the search domain but not the DNS server, and in that case this codepath would never be triggered...

I force pushed a new version now, that corrects this.

@yuwata

yuwata commented Dec 14, 2017

Copy link
Copy Markdown
Member

Thanks. lgtm.

@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed ci-failure-appears-unrelated labels Dec 14, 2017
… configuration into systemd-resolved

This is useful to debug things, but also to hook up external post-up
scripts with resolved.

Eventually this code might be useful to implement a
resolvconf(8)-compatible interface for compatibility purposes. Since the
semantics don't map entirely cleanly as first step we add a native
interface for pushing DNS configuration into resolved, that exposes the
correct semantics, before adding any compatibility interface.

See: systemd#7202
@poettering poettering added this to the v236 milestone Dec 14, 2017
@poettering
poettering merged commit 14965b9 into systemd:master Dec 14, 2017
@keszybz keszybz removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants