You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to add new commands to resolvectl in a plugin-like fashion #24532
No, there is no plan for this. If anything, we would extend systemd-resolved. resolvectl is just a thin client for it. But this would require completely redesigning how systemd-resolved works. Right now it has very tight integration between different components (e.g. how lookup using mDNS, LLMNR, DNS, /etc/hosts is done in various places).
Oh, actually, I think we totally should add a concept for this, similar to how userdbd multiplexing works: provide a dir that other components can place AF_UNIX sockets in, speaking varlink, that we'll send each query to, and give a chance to respond to.
systemd-machined would be one of the components that should hook themselves into resolved that way.
Reacted by Martin Schanzenbach and Olivier 'reivilibre'
Looking at the upcoming .alt TLD I wonder if a concept of suffix-matching of those plugins may be worth considering.
What I mean is that you call
$ resolvectl resolve example.foo.alt
and there may be a mechanism such as the one you outlined above that checks if any socket responds to this name or a suffix of it as opposed to having dedicated named plugins.
In the spirit of the draft this would allow name systems to claim .alt sub namespaces such as ens.alt or gns.alt (but also .eth or .gns depending on the configuration.
Another option would be integrate a single "alt" option
$ resolvectl alt example.foo.alt
and the "alt"-component itself would then allow third parties to plug into the resolution process instead of plugging directly into resolve{ctl,d}.
FWIW I would be willing to help or give it a shot if you can give me some pointers.
EDIT: Note that the second option is a bit incomplete from the point of view of the alternative name systems as ".alt" is only meant to prevent namespace clashed with DNS but may not encompass the whole namespace of the alternative name system.
Oh, actually, I think we totally should add a concept for this, similar to how userdbd multiplexing works: provide a dir that other components can place AF_UNIX sockets in, speaking varlink, that we'll send each query to, and give a chance to respond to.
systemd-machined would be one of the components that should hook themselves into resolved that way.
FWIW this use case is either #8518 or #20485 and I think this bug is probably worth closing. (also lol re machined, since docker has persistently Not had anything like this and it's really frustrating. if there was a composable mechanism to extend the system DNS it would be fantastic)
Oh, actually, I think we totally should add a concept for this, similar to how userdbd multiplexing works: provide a dir that other components can place AF_UNIX sockets in, speaking varlink, that we'll send each query to, and give a chance to respond to.
systemd-machined would be one of the components that should hook themselves into resolved that way.
FWIW this use case is either #8518 or #20485 and I think this bug is probably worth closing. (also lol re machined, since docker has persistently Not had anything like this and it's really frustrating. if there was a composable mechanism to extend the system DNS it would be fantastic)
Well, I agree that this is an RFE, but the fix (or rather the only comment) in #8518 do not really work today: Option 1 and 2 are not possible because of #21174 . Option 3 irrelevant for systemd.
I still think as mentioned in this issue there should be an extension in systemd, and having unix sockets that do that seems like a fine idea to me as well.
Note that in general this issue goes beyond DNS. (See the .alt draft I referenced).
I wrote a more extensive comment in #8518, but I absolutely agree with this, it's just that this particular issue is asking for extending resolvectl rather than resolved behaviour; the latter is better placed in #8518 or this one should be renamed. Every subsystem of the Linux system needs to have one composable extension point, and the Unix socket idea sounds amazing to me too.
nsswitch seems kind of a kind of ... janky solution for 2023, when C is no longer the only language around so shared libraries are not an ideal interface, especially with Go, etc. Thus the Unix socket concept seems more feasible.
Activity
keszybz commentedon Dec 6, 2022
No, there is no plan for this. If anything, we would extend systemd-resolved. resolvectl is just a thin client for it. But this would require completely redesigning how systemd-resolved works. Right now it has very tight integration between different components (e.g. how lookup using mDNS, LLMNR, DNS, /etc/hosts is done in various places).
poettering commentedon Dec 6, 2022
Oh, actually, I think we totally should add a concept for this, similar to how userdbd multiplexing works: provide a dir that other components can place AF_UNIX sockets in, speaking varlink, that we'll send each query to, and give a chance to respond to.
systemd-machined would be one of the components that should hook themselves into resolved that way.
schanzen commentedon Dec 14, 2022
Looking at the upcoming .alt TLD I wonder if a concept of suffix-matching of those plugins may be worth considering.
What I mean is that you call
and there may be a mechanism such as the one you outlined above that checks if any socket responds to this name or a suffix of it as opposed to having dedicated named plugins.
In the spirit of the draft this would allow name systems to claim .alt sub namespaces such as
ens.altorgns.alt(but also.ethor.gnsdepending on the configuration.Another option would be integrate a single "alt" option
and the "alt"-component itself would then allow third parties to plug into the resolution process instead of plugging directly into resolve{ctl,d}.
FWIW I would be willing to help or give it a shot if you can give me some pointers.
EDIT: Note that the second option is a bit incomplete from the point of view of the alternative name systems as ".alt" is only meant to prevent namespace clashed with DNS but may not encompass the whole namespace of the alternative name system.
lf- commentedon May 3, 2023
FWIW this use case is either #8518 or #20485 and I think this bug is probably worth closing. (also lol re machined, since docker has persistently Not had anything like this and it's really frustrating. if there was a composable mechanism to extend the system DNS it would be fantastic)
schanzen commentedon May 3, 2023
Well, I agree that this is an RFE, but the fix (or rather the only comment) in #8518 do not really work today: Option 1 and 2 are not possible because of #21174 . Option 3 irrelevant for systemd.
I still think as mentioned in this issue there should be an extension in systemd, and having unix sockets that do that seems like a fine idea to me as well.
Note that in general this issue goes beyond DNS. (See the .alt draft I referenced).
lf- commentedon May 3, 2023
I wrote a more extensive comment in #8518, but I absolutely agree with this, it's just that this particular issue is asking for extending
resolvectlrather thanresolvedbehaviour; the latter is better placed in #8518 or this one should be renamed. Every subsystem of the Linux system needs to have one composable extension point, and the Unix socket idea sounds amazing to me too.lf- commentedon May 3, 2023
nsswitchseems kind of a kind of ... janky solution for 2023, when C is no longer the only language around so shared libraries are not an ideal interface, especially with Go, etc. Thus the Unix socket concept seems more feasible.schanzen commentedon Mar 5, 2024
FYI some time ago now https://datatracker.ietf.org/doc/rfc9476/ was published
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add concept of delegating lookups below certain domains to …
resolved: add new "DNS Delegate" concepts (#34368)