Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
podman generates incorrect resolv.conf entry if executed with keep-id option
Version-Release number of selected component (if applicable):
RHEL 8.7
Podman 4.2
How reproducible:
When running a container with the keep-id option and slirp4netns network, the generated resolv.conf will contain the name server 10.0.2.3 which is in the incorrect network .
Steps to Reproduce:
1. login through rootless user via slirp4netns
~]# ssh joe@IP
The authenticity of host 'IP (IP)' can't be established.
ECDSA key fingerprint is SHA256:F5fUffQRxEqf1hyUhA5GPcV3NTtCRmqzlxxJLN+opLQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'IP' (ECDSA) to the list of known hosts.
joe@IP's password:
2. Check the /etc/resolv.conf
[joe@rhel84 ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.122.1
3. Run podman with " keep-id " option.
[joe@rhel84 ~]$ podman --cgroup-manager=cgroupfs run -it --rm --net=slirp4netns:allow_host_loopback=true,cidr=192.168.0.0/24 --add-host=localhost.containers.internal:192.168.0.2 --userns keep-id --entrypoint /bin/cat registry.access.redhat.com/ubi8:latest /etc/resolv.conf
nameserver 10.0.2.3
nameserver 192.168.122.1
[joe@rhel84 ~]$
4. Check /etc/resolv.conf - it takes the nameserver " 10.0.2.3 "
Actual results:
The resolv.conf takes the nameserver " 10.0.2.3 "
Expected results:
The resolv.conf file should not take the nameserver " 10.0.2.3 "
Additional info:
- Without the option "keep-id" the nameserver does not get added.
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 and bug fix 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:6939