[systemd-devel] Basic network with Fedora conatiner

Dan Williams dcbw at redhat.com
Wed Apr 29 07:48:33 PDT 2015


On Wed, 2015-04-29 at 15:36 +0200, arnaud gaboury wrote:
> After installation of Fedora 22 container, the container (poppy) boots
> but no network.
> 
> # journalctl -b -M poppy
> ................
> 
> Apr 29 14:02:20 poppy firewalld[28]: 2015-04-29 14:02:20 ERROR:
> ebtables not usable, disabling ethernet bridge firewall.
> Apr 29 14:02:20 poppy NetworkManager[56]: <warn>  Could not get
> hostname: failed to read /etc/sysconfig/network
> Apr 29 14:02:20 poppy NetworkManager[56]: <info>  Acquired D-Bus
> service com.redhat.ifcfgrh1
> 
> On host:
> 
> -------------------------------------------------------------------
> $ ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>        valid_lft forever preferred_lft forever
>     inet6 ::1/128 scope host
>        valid_lft forever preferred_lft forever
> 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> master br0 state UP group default qlen 1000
>     link/ether 14:da:e9:b5:7a:88 brd ff:ff:ff:ff:ff:ff
>     inet6 fe80::16da:e9ff:feb5:7a88/64 scope link
>        valid_lft forever preferred_lft forever
> 3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
> UP group default
>     link/ether b6:0c:00:22:f1:4a brd ff:ff:ff:ff:ff:ff
>     inet 192.168.1.87/24 brd 192.168.1.255 scope global br0
>        valid_lft forever preferred_lft forever
>     inet6 fe80::b40c:ff:fe22:f14a/64 scope link
>        valid_lft forever preferred_lft forever
> 6: ve-poppy: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
> group default qlen 1000
>     link/ether 0e:9a:d7:18:a3:59 brd ff:ff:ff:ff:ff:ff
> 
>  % systemctl status systemd-networkd
> ● systemd-networkd.service - Network Service
>    Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service;
> enabled; vendor preset: enabled)
>    Active: inactive (dead) since Wed 2015-04-29 13:36:28 CEST; 32min ago
>      Docs: man:systemd-networkd.service(8)
>  Main PID: 493 (code=exited, status=0/SUCCESS)
>    Status: "Shutting down..."
> 
> Apr 29 13:35:40 hortensia systemd[1]: Starting Network Service...
> Apr 29 13:35:40 hortensia systemd-networkd[493]: br0             : netdev ready
> Apr 29 13:35:40 hortensia systemd-networkd[493]: Enumeration completed
> Apr 29 13:35:40 hortensia systemd[1]: Started Network Service.
> Apr 29 13:35:40 hortensia systemd-networkd[493]: enp7s0          :
> link configured
> Apr 29 13:35:40 hortensia systemd-networkd[493]: br0             :
> link configured
> Apr 29 13:35:42 hortensia systemd-networkd[493]: enp7s0          :
> gained carrier
> Apr 29 13:35:42 hortensia systemd-networkd[493]: br0             :
> gained carrier
> 
> 
> -------------------------------------------------------------------------------
> 
> on container:
> 
> $ ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>        valid_lft forever preferred_lft forever
>     inet6 ::1/128 scope host
>        valid_lft forever preferred_lft forever
> 2: host0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
> default qlen 1000
>     link/ether 0e:7f:c3:fb:25:b1 brd ff:ff:ff:ff:ff:ff
> 
> $ systemctl status systemd-networkd
> ● systemd-networkd.service - Network Service
>    Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service;
> disabled; vendor preset: disabled)
>    Active: inactive (dead)
>      Docs: man:systemd-networkd.service(8)
> ---------------------------------------------------------------------------
> 
> My guess is that I need to get rid of Networkmanager on Fedora
> container and instead use systemd-networkd. Am I right ?

NM shouldn't be messing with the networking that anything else outside
of NM sets up.  It will co-exist and leave whatever else is managing the
container network alone (eg, systemd-networkd).  I think we'd need more
logs from systemd-networkd and NetworkManager to figure out what's going
on, plus the .network and .link files that you've created for
systemd-networkd.

Dan



More information about the systemd-devel mailing list