You are not logged in.

#1 2020-02-11 23:22:46

Amon Bune
Member
Registered: 2020-02-11
Posts: 3

IPv4 is dead in LXD container after "pacman -Syu"

I use arch on my host system and have LXD installed, which has some containers running (created with "lxc launch images:archlinux/current/amd64 somecontainer")
I have upgraded some of my containers today with "pacman -Syu".

Since I did a restart of the container, the network is down. The default network interface eth0 doesn't get an ipv4 address anymore, but it still has an ipv6 address.
The Internet is not accessible anymore (probably because ipv6 is not correctly configured anyway?)
I have checked if I have any errors in "journalctl -xe" but nothing's there. The "systemd-networkd" service is running fine.
I have not changed the default network settings inside the existing containers. They are still have the default config.
When I create a new LXD arch container with the latest image, the ipv4 network runs fine in that new container. Only existing ones that I upgrade with "Pacman -Syu" get corrupted.

The file "/etc/systemd/network/eth0.network" has the following content:

[Match]
Name=eth0

[Network]
DHCP=ipv4

And the IP configuration is like the following:

# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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
29: eth0@if30: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:3c:8f:4e brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fd42:9958:9943:7dd9:216:3eff:fe3c:8f4e/64 scope global dynamic mngtmpaddr
       valid_lft 3574sec preferred_lft 3574sec
    inet6 fe80::216:3eff:fe3c:8f4e/64 scope link
       valid_lft forever preferred_lft forever


I copied the output of the "pacman -Syu" command here. These packages were updated:
Packages (150) acl-2.2.53-2  arch-install-scripts-23-1  archlinux-keyring-20200108-1  argon2-20190702-2  attr-2.4.48-2  audit-2.8.5-6
               autoconf-2.69-7  automake-1.16.1-2  bash-5.0.011-2  binutils-2.34-1  bison-3.5.1-1  bzip2-1.0.8-3
               ca-certificates-20181109-3  ca-certificates-mozilla-3.50-1  ca-certificates-utils-20181109-3  coreutils-8.31-3
               cracklib-2.9.7-2  cryptsetup-2.3.0-1  curl-7.68.0-1  db-5.3.28-5  dbus-1.12.16-5  device-mapper-2.02.186-5
               dhcpcd-8.1.6-1  diffutils-3.7-3  e2fsprogs-1.45.5-1  expat-2.2.9-3  fakeroot-1.24-2  file-5.38-3  filesystem-2019.10-2
               findutils-4.7.0-2  flex-2.6.4-3  fontconfig-2:2.13.91+24+g75eadca-2  gawk-5.0.1-2  gc-8.0.4-3  gcc-9.2.1+20200130-2
               gcc-libs-9.2.1+20200130-2  gdbm-1.18.1-3  gettext-0.20.1-3  git-2.25.0-1  glib2-2.62.4-2  glibc-2.31-1  gmp-6.1.2-3
               gnupg-2.2.19-1  gnutls-3.6.12-1  go-2:1.13.7-1  gpgme-1.13.1-3  graphite-1:1.3.13-2  grep-3.4-1  groff-1.22.4-3
               gzip-1.10-3  harfbuzz-2.6.4-2  hwids-20200204-1  iana-etc-20200117-1  icu-65.1-2  inetutils-1.9.4-8  iproute2-5.5.0-1
               iptables-1:1.8.4-1  iputils-20190709-2  java-runtime-common-3-2  jre11-openjdk-headless-11.0.6.u10-1  json-c-0.13.1-3
               kbd-2.2.0-5  keyutils-1.6.1-3  kmod-26-3  krb5-1.17.1-1  less-551-3  libarchive-3.4.1-1  libassuan-2.5.3-2
               libcap-2.30-1  libcap-ng-0.7.10-1  libelf-0.177-2  libffi-3.2.1-4  libgcrypt-1.8.5-2  libgpg-error-1.37-1
               libidn2-2.3.0-1  libjpeg-turbo-2.0.4-1  libksba-1.3.5-2  libldap-2.4.48-2  libmnl-1.0.4-3  libmpc-1.1.0-2
               libnftnl-1.1.5-1  libnghttp2-1.39.2-2  libnl-3.5.0-2  libpcap-1.9.1-2  libpipeline-1.5.2-1  libpsl-0.21.0-2
               libsasl-2.1.27-2  libseccomp-2.4.1-3  libsecret-0.20.1-1  libssh2-1.9.0-2  libtasn1-4.16.0-1  libtiff-4.1.0-1
               libtirpc-1.2.5-1  libtool-2.4.6+42+gb88cebd5-10  libunistring-0.9.10-2  libusb-1.0.23-2  libutil-linux-2.35.1-1
               libxml2-2.9.10-1  licenses-20191011-2  linux-api-headers-5.4.17-1  logrotate-3.15.1-2  lz4-1:1.9.2-2  m4-1.4.18-3
               make-4.3-1  man-db-2.9.0-1  man-pages-5.05-1  mpfr-4.0.2-2  nano-4.8-1  ncurses-6.1-7  netctl-1.20-2  nettle-3.5.1-2
               npth-1.6-2  nspr-4.25-1  nss-3.50-1  openresolv-3.10.0-1  openssl-1.1.1.d-2  p11-kit-0.23.20-2  pacman-5.2.1-4
               pacman-mirrorlist-20200207-1  pam-1.3.1-2  pambase-20190105.1-2  patch-2.7.6-8  pcre-8.43-2  pcre2-10.34-3
               perl-5.30.1-1  perl-error-0.17029-1  perl-timedate-2.31-1  pinentry-1.1.0-5  pkgconf-1.6.3-3  popt-1.16-12
               procps-ng-3.3.15-2  psmisc-23.3-2  readline-8.0.001-2  sed-4.8-1  shadow-4.8.1-1  sqlite-3.31.1-1  sudo-1.8.31-1
               sysfsutils-2.1.0-11  systemd-244.2-2  systemd-libs-244.2-2  systemd-sysvcompat-244.2-2  tar-1.32-3  texinfo-6.7-2
               tzdata-2019c-3  util-linux-2.35.1-1  vi-1:070224-4  which-2.21-5  xz-5.2.4-2  zlib-1:1.2.11-4  zstd-1.4.4-1

Network service status:

# systemctl status systemd-networkd.service
* systemd-networkd.service - Network Service
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-02-11 23:15:54 UTC; 2s ago
TriggeredBy: * systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
   Main PID: 74 (systemd-network)
     Status: "Processing requests..."
      Tasks: 1 (limit: 154272)
     Memory: 1.4M
     CGroup: /system.slice/systemd-networkd.service
             `-74 /usr/lib/systemd/systemd-networkd

Feb 11 23:15:54 knowledge systemd[1]: Starting Network Service...
Feb 11 23:15:54 knowledge systemd-networkd[74]: eth0: Gained IPv6LL
Feb 11 23:15:54 knowledge systemd-networkd[74]: Enumeration completed
Feb 11 23:15:54 knowledge systemd[1]: Started Network Service.

Offline

#2 2020-02-11 23:27:17

loqs
Member
Registered: 2014-03-06
Posts: 19,089

Re: IPv4 is dead in LXD container after "pacman -Syu"

Offline

#3 2020-02-12 18:39:04

Amon Bune
Member
Registered: 2020-02-11
Posts: 3

Re: IPv4 is dead in LXD container after "pacman -Syu"

@loqs Thank you very much!

The problem is introduced by the systemd package version 244.1 which behaves wrong when the /sys folder is writable (rw mode) by setting it to readonly (ro mode) network works again like normal.

I could fix my specific problem by executing the following command:

lxc config set somecontainer raw.lxc "lxc.mount.auto=sys"

Offline

Board footer

Powered by FluxBB