Bug 1971677 - Upgrade to podman podman-3.2.0-5.fc34.x86_64 breaks localhost network in rootless container
Summary: Upgrade to podman podman-3.2.0-5.fc34.x86_64 breaks localhost network in root...
Keywords:
Status: CLOSED DUPLICATE of bug 1972073
Alias: None
Product: Fedora
Classification: Fedora
Component: podman
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lokesh Mandvekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-14 14:25 UTC by Jan Pazdziora (Red Hat)
Modified: 2021-06-15 17:26 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-06-15 17:26:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2021-06-14 14:25:19 UTC
Description of problem:

Upgrade to podman podman-3.2.0-5.fc34.x86_64 breaks localhost network in rootless container because the IP address set in /etc/hosts does not match the IP address of the tap0 interface.

Version-Release number of selected component (if applicable):

podman-3.2.0-5.fc34.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Have Dockerfile

FROM registry.fedoraproject.org/fedora:34
RUN dnf install -y httpd
EXPOSE 80
ENTRYPOINT ["/usr/sbin/httpd", "-D", "FOREGROUND"]

2. Build image:
podman build -t httpd -f Dockerfile .

3. Run Apache in the container with a hostname:
podman run -d -h web.example.test --name httpd httpd

4. Try to talk to itself in the container:
podman exec httpd curl web.example.test | head

5. Check /etc/hosts in the container:
podman exec httpd grep web.example.test /etc/hosts

6. Check the actual IP address configured within the container:
podman exec httpd grep 10.0.2 /proc/net/fib_trie

Actual results:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (7) Failed to connect to web.example.test port 80: Network is unreachable

10.0.2.2	web.example.test httpd

        +-- 10.0.2.0/24 2 0 1
           |-- 10.0.2.0
           |-- 10.0.2.100
           |-- 10.0.2.255
        +-- 10.0.2.0/24 2 0 1
           |-- 10.0.2.0
           |-- 10.0.2.100
           |-- 10.0.2.255

Expected results:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<!doctype html>
<html>
  <head>
    <meta charset='utf-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <title>Test Page for the HTTP Server on Fedora</title>
    <style type="text/css">
      /*<![CDATA[*/
      
      html {
100  8474  100  8474    0     0  1655k      0 --:--:-- --:--:-- --:--:-- 2068k

10.0.2.100	web.example.test httpd

        +-- 10.0.2.0/24 2 0 1
           |-- 10.0.2.0
           |-- 10.0.2.100
           |-- 10.0.2.255
        +-- 10.0.2.0/24 2 0 1
           |-- 10.0.2.0
           |-- 10.0.2.100
           |-- 10.0.2.255

Additional info:

This is a regression against podman-3.1.0-1.fc34.x86_64.

The IP address of the interface within the container is (still) 10.0.2.100 but the hostname entry in /etc/hosts does not match that.

Comment 2 Jan Pazdziora (Red Hat) 2021-06-15 16:31:02 UTC
Since this is about rootless containers, the Steps to Reproduce in comment 0 need to be run under non-root user.

Comment 3 Matthew Heon 2021-06-15 17:26:04 UTC
Going to close this as a dupe of BZ1972073. Will be fixed upstream by https://github.com/containers/podman/pull/10684

*** This bug has been marked as a duplicate of bug 1972073 ***


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