rootlesskit icon indicating copy to clipboard operation
rootlesskit copied to clipboard

lxc-user-nic make docker panic (`panic: could not exchange DHCP with eth0: timed out while listening for replies`)

Open changsu-axq opened this issue 2 years ago • 2 comments

problem

Docker suddenly crashed and cannot start ,

journalctl --since "14:04"

found

Jul 28 14:04:57 ip-1 dockerd-rootless.sh[4576]: panic: could not exchange DHCP with eth0: timed out while listening for replies
Jul 28 14:04:57 ip-1 dockerd-rootless.sh[4576]: goroutine 7 [running]:
Jul 28 14:04:57 ip-1 dockerd-rootless.sh[4576]: github.com/rootless-containers/rootlesskit/pkg/network/lxcusernic.dhcpRenewRoutine(0xc0001db620, 0xc000190358, 0x4, 0x
Jul 28 14:04:57 ip-1 dockerd-rootless.sh[4576]:         /go/src/github.com/rootless-containers/rootlesskit/pkg/network/lxcusernic/lxcusernic.go:160 +0x2e3
Jul 28 14:04:57 ip-1 dockerd-rootless.sh[4576]: created by github.com/rootless-containers/rootlesskit/pkg/network/lxcusernic.(*childDriver).ConfigureNetworkChild
Jul 28 14:04:57 ip-1 dockerd-rootless.sh[4576]:         /go/src/github.com/rootless-containers/rootlesskit/pkg/network/lxcusernic/lxcusernic.go:147 +0x853
Jul 28 14:04:57 ip-1 dockerd-rootless.sh[4576]: [rootlesskit:parent] error: child exited: exit status 2

version

user:

oq

dnsmasq info

lxc-dns+    1575  0.7  0.0  53352  2388 ?        S    Jul27   9:18 dnsmasq -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=/run/lxc/dnsmasq.pid --listen-address 10.0.3.1 --dhcp-range 10.0.3.2,10.0.3.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=lxcbr0 --dhcp-leasefile=/var/lib/misc/dnsmasq.lxcbr0.leases --dhcp-authoritative

rootlesskit version

rootlesskit version 1.1.0

lxc version

lxc --version
3.0.3

cat /etc/lxc/lxc-usernet

# USERNAME TYPE BRIDGE COUNT
oq    veth lxcbr0 10

Ask

  • Why does the DHCP timeout occur?
  • Why does the DHCP timeout directly cause a panic? Is there a way to gracefully degrade instead?

changsu-axq avatar Jul 28 '23 08:07 changsu-axq