Bug 1254988

Summary: Docker networking doesn't work. docker0 doesn't get ipv{4,6} addresses.
Product: [Fedora] Fedora Reporter: Petr Schindler <pschindl>
Component: dockerAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: adimania, admiller, dwalsh, ichavero, jcajka, jchaloup, lsm5, miminar, pschindl, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-28 14:40:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Schindler 2015-08-19 11:48:19 UTC
Description of problem:
After update my docker containers stopped to communicate with world (I used https).

I realized that docker0 interface doesn't get ip addresses and there is no routing rule for docker.

Routing in docker containers counts with docker0 set to 172.17.42.1.

This seems to be regression as it works with 1.7.1

Version-Release number of selected component (if applicable):
docker-1.8.1-2.git3c1d7c8.fc22.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Daniel Walsh 2015-08-19 14:33:26 UTC
Does downgrading the tool fix the problem?

Are you getting any SELinux errors?

Does it work if you run setenforce 0?

Comment 2 Petr Schindler 2015-08-20 07:21:26 UTC
Yes. Downgrading back to 1.7.1 fix the problem.

I have selinux in permissive. I didn't got any SE alert.

Comment 3 Petr Schindler 2015-08-20 11:18:00 UTC
I tested it also on f23 and it behaves same. No selinux error occurred.

Comment 4 Daniel Walsh 2015-08-20 14:46:37 UTC
Petr, you mean it works on f23 or it does not work  docker0 does not get an address.

Comment 5 Petr Schindler 2015-08-24 05:56:46 UTC
Sorry for confusion. docker0 does not get an address.

Comment 7 Daniel Walsh 2015-08-25 13:02:56 UTC
This is working fine for me.

# docker run -d fedora /bin/sleep 60000
58fd2225d4bfe8a5e430c614823dedfab2e18007b3da95c5f0d7a16221138e59
[root@localhost website]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.121.1   0.0.0.0         UG        0 0          0 eth0
172.17.0.0      0.0.0.0         255.255.0.0     U         0 0          0 docker0
192.168.121.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0
[root@localhost website]# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.42.1  netmask 255.255.0.0  broadcast 0.0.0.0
        inet6 fe80::c076:49ff:fe9f:a1cd  prefixlen 64  scopeid 0x20<link>
        ether 3e:8e:e6:6f:98:90  txqueuelen 0  (Ethernet)
        RX packets 38834  bytes 2346745 (2.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 55896  bytes 88676182 (84.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

# docker run -ti fedora /bin/sh
# dnf -y install net-tools
Fedora 22 - x86_64                              256 kB/s |  41 MB     02:44    
Fedora 22 - x86_64 - Updates                    273 kB/s |  13 MB     00:50    
Last metadata expiration check performed 0:00:31 ago on Tue Aug 25 12:59:55 2015.
Dependencies resolved.
================================================================================
 Package        Arch        Version                           Repository   Size
================================================================================
Installing:
 net-tools      x86_64      2.0-0.31.20141124git.fc22         fedora      313 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 313 k
Installed size: 925 k
Downloading Packages:
net-tools-2.0-0.31.20141124git.fc22.x86_64.rpm  172 kB/s | 313 kB     00:01    
--------------------------------------------------------------------------------
Total                                            25 kB/s | 313 kB     00:12     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : net-tools-2.0-0.31.20141124git.fc22.x86_64                  1/1 
warning: Unable to get systemd shutdown inhibition lock
  Verifying   : net-tools-2.0-0.31.20141124git.fc22.x86_64                  1/1 

Installed:
  net-tools.x86_64 2.0-0.31.20141124git.fc22                                    

Complete!
sh-4.3# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.17.42.1     0.0.0.0         UG        0 0          0 eth0
172.17.0.0      0.0.0.0         255.255.0.0     U         0 0          0 eth0
# exit
exit
[root@localhost ~]# rpm -q docker
docker-1.8.1-2.git3c1d7c8.fc22.x86_64

Comment 8 Daniel Walsh 2015-09-28 18:34:55 UTC
Is this still a problem with the current release?