RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2128675 - Need way to tell aardvark DNS to refer to a particular DNS, and not host's configured DNS
Summary: Need way to tell aardvark DNS to refer to a particular DNS, and not host's co...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: aardvark-dns
Version: 8.6
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: 8.8
Assignee: Jindrich Novy
QA Contact: Joy Pu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-21 11:33 UTC by John Cronin
Modified: 2023-05-16 09:10 UTC (History)
9 users (show)

Fixed In Version: aardvark-dns-1.5.0-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 08:21:12 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github containers aardvark-dns issues 228 0 None open Need way to tell aardvark DNS to refer to a particular DNS, and not host's configured DNS 2022-10-10 16:47:33 UTC
Github containers aardvark-dns pull 240 0 None Merged aardvark-dns: add support for container's custom `dns_servers` 2023-02-08 12:13:58 UTC
Red Hat Issue Tracker RHELPLAN-134626 0 None None None 2022-10-06 18:07:10 UTC
Red Hat Product Errata RHSA-2023:2758 0 None None None 2023-05-16 08:22:56 UTC

Description John Cronin 2022-09-21 11:33:00 UTC
Description of problem:
Currently aardvark DNS resolves container names and for anything it can not resolve on its own, it refers to the configured resolvers on the host. Requirement is that: Need a way to tell aardvark DNS to refer to a particular DNS, and not host's configured DNS. This is because I need host to work on separate DNS and container to work on separate DNS.

Kindly guide to understand if this is a valid requirement.
Also, as this is not working currently, is there a workaround to make it work?

Thank you

Version-Release number of selected component (if applicable):
aardvark-dns-1.0.1-35.module+el8.6.0+15917+093ca6f8.x86_64

How reproducible:
Always

Steps to Reproduce:
I tried following steps:
1. bind mounting an alternate_resolve.conf from host to container. It has 2 entries. First is of aardvark DNS and second is of alternate DNS (say DNS1). 
2. Now, note that, my host has DNS2 in its resolv.conf.

Actual results:
For FQDNs that aardvark DNS can not resolve, the forward request goes to DNS2.

Expected results:
For FQDNs that aardvark DNS can not resolve, my expectation is that the forward request should go to DNS1.

Additional info:
https://github.com/containers/aardvark-dns/issues/228

Comment 9 Joy Pu 2023-02-13 08:44:41 UTC
Checked with the latest build of podman and catatonit. They can be installed without any warning. So move it to verified:
# rpm -qa |grep -e podman -e catatonit
podman-4.4.0-1.el9.x86_64
catatonit-0.1.7-8.el9.x86_64

Comment 10 Joy Pu 2023-02-13 08:45:59 UTC
Update the wrong bug.

Comment 12 Joy Pu 2023-02-22 13:24:01 UTC
Test with netavark-1.5.0-4.module+el8.8.0+18060+3f21f2cc.x86_64 and podman-4.4.1-1.module+el8.8.0+18126+f23bfb36.x86_64. The --dns works as expected. More details. The name server can be configured with it and:

[root@kvm-03-guest24 ~]# cat /etc/resolv.conf 
# Generated by NetworkManager
search hv2.lab.eng.bos.redhat.com
nameserver 10.11.5.160
nameserver 10.2.70.215
[root@kvm-03-guest24 ~]# podman info |grep network
  networkBackend: netavark
  network:
Without the --dns option:
# podman run --rm check_dns nslookup google.com
Server:		10.11.5.160
Address:	10.11.5.160#53

Non-authoritative answer:
Name:	google.com
Address: 142.251.163.139
Name:	google.com
Address: 142.251.163.101
Name:	google.com
Address: 142.251.163.100
Name:	google.com
Address: 142.251.163.138
Name:	google.com
Address: 142.251.163.113
Name:	google.com
Address: 142.251.163.102
Name:	google.com
Address: 2607:f8b0:4004:c1b::66
Name:	google.com
Address: 2607:f8b0:4004:c1b::8a
Name:	google.com
Address: 2607:f8b0:4004:c1b::64
Name:	google.com
Address: 2607:f8b0:4004:c1b::8b

With the --dns option:
# podman run --rm --dns=10.2.70.215 check_dns nslookup google.com
Server:		10.2.70.215
Address:	10.2.70.215#53

Non-authoritative answer:
Name:	google.com
Address: 142.251.163.139
Name:	google.com
Address: 142.251.163.101
Name:	google.com
Address: 142.251.163.100
Name:	google.com
Address: 142.251.163.138
Name:	google.com
Address: 142.251.163.113
Name:	google.com
Address: 142.251.163.102
Name:	google.com
Address: 2607:f8b0:4004:c1b::8b
Name:	google.com
Address: 2607:f8b0:4004:c1b::66
Name:	google.com
Address: 2607:f8b0:4004:c1b::8a
Name:	google.com
Address: 2607:f8b0:4004:c1b::64


So move this to verified.

Comment 14 errata-xmlrpc 2023-05-16 08:21:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2758


Note You need to log in before you can comment on or make changes to this bug.