Skip to content
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

when a rootless container is run with a network hosts search domains are ignored #24713

Open
mattp- opened this issue Nov 29, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. network Networking related issue or feature stale-issue

Comments

@mattp-
Copy link

mattp- commented Nov 29, 2024

Issue Description

It seems when a rootless container is created attached to a network, the hosts resolv.conf search domain is discarded. if a rootless container is spawned without a network, it has the expected functionality of inheriting the search domain from the host.

I originally created this issue in containers/netavark#1133, however @Luap99 indiciated it is both still an issue, and it is an issue in podman itself, not netavark.

on host:

mphillips81@mmp-pw-dev ~/repos/ose (main)✗ % cat /etc/resolv.conf
options attempts:1 timeout:2

search foo.com bar.com 

on podman:

mphillips81@mmp-pw-dev ~/repos/ose (main)✗ % docker run -it  --network=ose_default obfuscated.com/rhel7-dpkg:latest /bin/sh
sh-4.2# cat /etc/resolv.conf
search dns.podman
nameserver 10.89.4.1
options attempts:1 timeout:2
sh-4.2# exit
mphillips81@mmp-pw-dev ~/repos/ose (main)✗ % docker run -it  obfuscated.com/rhel7-dpkg:latest /bin/sh
sh-4.2# cat /etc/resolv.conf
search foo.com  bar.com 
nameserver 10.0.2.3
nameserver 10.10.10.10
nameserver 10.10.10.11
options attempts:1 timeout:2
sh-4.2# exit

sorry for the obfuscated bits, it should be reproducible with any image.
when run via docker the search domains are maintained as expected, both with and without network.

Steps to reproduce the issue

Steps to reproduce the issue

  1. create a rootless rhel container attached to a network
  2. cat /etc/resolv.conf
  3. observe search domains are missing

Describe the results you received

resolv.conf search domains are missing.

Describe the results you expected

resolv.conf search domains are maintained.

podman info output

mphillips81-dev-mse.pw1.bcc.bloomberg.com /root # podman version
Client:       Podman Engine
Version:      4.9.4-rhel
API Version:  4.9.4-rhel
Go Version:   go1.21.11 (Red Hat 1.21.11-1.el9_4)
Built:        Thu Aug  8 08:51:41 2024
OS/Arch:      linux/amd64

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@mattp- mattp- added the kind/bug Categorizes issue or PR as related to a bug. label Nov 29, 2024
@sbrivio-rh sbrivio-rh added the network Networking related issue or feature label Nov 29, 2024
Copy link

A friendly reminder that this issue had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. network Networking related issue or feature stale-issue
Projects
None yet
Development

No branches or pull requests

2 participants