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 2009346 - Podman name resolution not working as expected
Summary: Podman name resolution not working as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Joy Pu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-30 12:33 UTC by pascal.ott
Modified: 2022-11-08 09:30 UTC (History)
10 users (show)

Fixed In Version: podman-4.1.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:14:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-98600 0 None None None 2021-09-30 15:39:36 UTC
Red Hat Product Errata RHSA-2022:7457 0 None None None 2022-11-08 09:15:31 UTC

Description pascal.ott 2021-09-30 12:33:17 UTC
**Description**

the Bug is already [here](https://github.com/containers/podman/issues/11791) decribed.

When you have set a search domain in your hosts ```/etc/resolv.conf``` then the name resolution in podman container is failing, until you add the ```dns.podman``` search domain also to the ```/etc/resolv.conf``` of your host.

**Steps to reproduce the issue:**

1. add a search entry on your host to the ```/etc/resolv.conf``` file (example: search sample.domain)

2. start 2 container by using docker-compose without specifing explicit a network (dnsname plugin is installed)

3. from container01 try:
```
bash$ nslookup container02
```

4. from container01 try:
```
bash$ nslookup container02.dns.podman
```


**Describe the results you received:**
result from step 3:
```
Server:         10.89.0.1
Address:        10.89.0.1:53

** server can't find containername.sample.domain: NXDOMAIN
```

result from step 4:
```
Server:         10.89.0.1
Address:        10.89.0.1:53

Name:   container02.dns.podman
Address: 10.89.0.118
```

**Describe the results you expected:**
i want to use just the container-name for communication between containers. The search domain ```dns.podman``` should automatically added as first search domain in the ```/etc/resolv.conf``` of the container.

**Additional information you deem important (e.g. issue happens only occasionally):**
As work arround you can add ```dns.podman``` as search domain to your hosts ```/etc/resolv.conf```


**Package info (e.g. output of `dnf list podman*`):**

```
Installed Packages
podman.x86_64              3.2.3-0.11.module+el8.4.0+12050+ef972f71   @rhel-8-for-x86_64-appstream-rpms
podman-catatonit.x86_64    3.2.3-0.11.module+el8.4.0+12050+ef972f71   @rhel-8-for-x86_64-appstream-rpms
podman-docker.noarch       3.2.3-0.11.module+el8.4.0+12050+ef972f71   @rhel-8-for-x86_64-appstream-rpms
podman-plugins.x86_64      3.2.3-0.11.module+el8.4.0+12050+ef972f71   @rhel-8-for-x86_64-appstream-rpms
podman-remote.x86_64       3.2.3-0.11.module+el8.4.0+12050+ef972f71   @rhel-8-for-x86_64-appstream-rpms
```

Comment 1 Matthew Heon 2021-09-30 14:02:46 UTC
Cause is a too-old `dnsname` binary. We need to ensure `dnsname` 1.2 or newer is packaged for the next RHEL release (I think we're in 8.5.0.2 territory, now).

Assigning to Jindrich.

Comment 2 Jindrich Novy 2022-05-09 09:36:11 UTC
The current podman contains dnsname-1.3.0.

Can we get qa ack please?

Comment 5 Joy Pu 2022-05-16 08:30:13 UTC
Can reproduce with podman-3.2.3-0.10.module+el8.4.0+11989+6676f7ad.x86_64 the resolve.conf inside container look like this:
[root@sweetpig-18 ~]# podman exec con1 cat /etc/resolv.conf 
search sample.domain
nameserver 10.89.0.1
Test with podman-4.1.0-2.module+el8.7.0+15223+3987d347.x86_64 and its resolve.conf inside container already include dns.podman as expected. So set this to verified:
[root@sweetpig-9 ~]# podman exec con1 cat /etc/resolv.conf 
search dns.podman sample.domain
nameserver 10.89.0.1
nameserver 10.19.42.41
nameserver 10.11.5.19
nameserver 10.5.30.160

Comment 7 errata-xmlrpc 2022-11-08 09:14:53 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-2022:7457


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