Bug 89370 - systemd-networkd-wait-online -i <interface> stopped working
Summary: systemd-networkd-wait-online -i <interface> stopped working
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Tom Gundersen
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-28 19:33 UTC by Ed Tomlinson
Modified: 2019-03-19 12:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ed Tomlinson 2015-02-28 19:33:31 UTC
I have a container that is has its network setup by the host using

ExecStartPre=/usr/bin/ip netns add %i
ExecStartPre=/usr/bin/ip link add $host type veth peer name $peer
ExecStartPre=/usr/bin/ip link set %i $host master $bridge
ExecStartPre=/usr/bin/ip link set $peer netns %i
ExecStartPre=/usr/bin/ip netns exec %i ip link set lo up
ExecStartPre=/usr/bin/ip netns exec %i ip addr add $addr dev $peer
ExecStartPre=/usr/bin/ip netns exec %i ip -6 route add default via $target
ExecStartPre=/usr/bin/ip netns exec %i ip link set $peer up
ExecStartPre=/usr/bin/ip link set $host up

ExecStart=/usr/bin/ip netns exec %i /usr/bin/systemd-nspawn --quiet --boot --keep-unit --link-journal=guest --directory=/jail/%i

in the container I see:

ifconfig -a
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vhost0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::1472:6fff:fe24:72df  prefixlen 64  scopeid 0x20<link>
        inet6 2001:4830:1100:8074::a  prefixlen 64  scopeid 0x0<global>
        ether 16:72:6f:24:72:df  txqueuelen 1000  (Ethernet)
        RX packets 18592  bytes 2087500 (1.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 408  bytes 41333 (40.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

but

systemd-networkd-wait-online -i vhost0

hangs.

strace shows:timerfd_create(CLOCK_MONOTONIC, 0x80800 /* TFD_??? */) = 7
epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN, {u32=3, u64=3}}) = 0
sendto(6, " \0\0\0\22\0\5\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 32, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 16) = 2
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{NULL, 0}], msg_controllen=56, {cmsg_len=20, cmsg_level=0x10e /* SOL_??? */, cmsg_type=, ...}, ms2
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"x\4\0\0\20\0\2\0\0\0\0\0\251\0\0\0\0\0\4\3\1\0\0\0I\0\1\0\0\0\0\0"..., 4624}], msg_controllen=52
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{NULL, 0}], msg_controllen=56, {cmsg_len=20, cmsg_level=0x10e /* SOL_??? */, cmsg_type=, ...}, ms0
recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\0\0\0\0\251\0\0\0\0\0\0\0", 4624}], msg_controllen=56, {cmsg_len=20, cmsg_lev0
gettid()                                = 169
syscall_318(0x7fe86e6188c0, 0x10, 0x1, 0x30, 0x7fffaec69900, 0x7fe86ecb0260) = 0x10
open("/run/systemd/netif/links/4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/run/systemd/netif/links/4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/run/systemd/netif/links/1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/run/systemd/netif/links/1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
writev(2, [{"ignore irrelevant link: lo", 26}, {"\n", 1}], 2ignore irrelevant link: lo
) = 27
epoll_ctl(3, EPOLL_CTL_MOD, 6, {EPOLLIN, {u32=1858799968, u64=140636267940192}}) = 0
epoll_wait(3,

and the command hangs forever.

This was working in previous versons.

I am running an up to date arch install (218-2) with a 3.18-7 kernel.

Something changed breaking a working setup.  

Ed Tomlinson
Comment 1 Tom Gundersen 2015-05-25 16:03:12 UTC
Hi Ed,

Sorry for the delay in getting back to you.

I'm not able to reproduce this problem.

Could you try with

  # SYSTEMD_LOG_LEVEL=debug systemd-networkd-wait-online -i vhost0

?

Also, what is the output of

  $ networkctl status vhost0

when wait-online hangs?

Cheers,

Tom
Comment 2 Ed Tomlinson 2015-05-30 12:41:56 UTC
Tom.  

I am now hitting bug 97811 which needs to be fixed before I can test this.  

Thanks
Ed
Comment 3 Ed Tomlinson 2015-06-01 22:07:37 UTC
(In reply to Ed Tomlinson from comment #2)
> Tom.  
> 
> I am now hitting bug 97811 which needs to be fixed before I can test this.  
> 
> Thanks
> Ed

Thats: https://bugzilla.kernel.org/show_bug.cgi?id=97811
Comment 4 Lennart Poettering 2019-03-19 12:30:55 UTC
I am pretty sure this has been fixed in current systemd versions long ago. If this is reproducible on one of the two most current systemd versions (240, 241) please file a new bug on systemd github.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.