-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rkt driver does not support --dns=host #2025
Comments
Thanks for the bug report @blalor! PR #2028 implements the behavior you described. However, I ran into issues when testing it.
Setting a DNS server works as expected: sudo rkt run docker://ubuntu --volume=hostbin,kind=host,source=/bin --mount=volume=hostbin,target=/foo --insecure-options=all --debug=true --exec=/foo/ping --dns=8.8.8.8-- google.com
# Outputs expected ping output Setting sudo rkt run docker://ubuntu --volume=hostbin,kind=host,source=/bin --mount=volume=hostbin,target=/foo --insecure-options=all --debug=true --exec=/foo/ping --dns=none -- google.com
# Outputs: [780411.369776] ubuntu[5]: ping: unknown host google.com However, settings sudo rkt run docker://ubuntu --volume=hostbin,kind=host,source=/bin --mount=volume=hostbin,target=/foo --insecure-options=all --debug=true --exec=/foo/ping --dns=host -- google.com
# Same output as --dns=none I get the same results when running via nomad but wanted to try to make it as easy to reproduce as possible. Obviously no one is running ping in nomad, so if this is just an issue with my contrived example and everything works as expected in practice I'll be more than happy to merge the PR! Thanks again for the report! |
I think the issue is your host's
no
|
Also, thanks for jumping in this! |
Ah, of course. I have dnsmasq installed on the host so resolv.conf points to it, but the container can't connect to it. Thanks for helping me debug my own issue, and we'll get this into the 0.5.1 release. |
Yay! Thank you! |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad v0.5.0
rkt Version: 1.19.0
The rkt driver provides the
dns_servers
task config option, but it only accepts IP addresses. Perrkt run --help
:The rkt driver should support single-item lists with
host
ornone
values to mirror therkt run
command-line arguments. This will enable proper DNS resolver config without having to hard-code IP addresses into the jobspec.The text was updated successfully, but these errors were encountered: