Package: autopkgtest Version: 5.28 Severity: normal X-Debbugs-Cc: deb...@rocketjump.eu
Hi, issue is that setup-testbed will break networking config of a VM by writing a broken config file, e.g. /etc/network/interfaces/enp0s31f6\nenx482ae3598891 with the following contents: auto enp0s31f6 enx482ae3598891 iface enp0s31f6 enx482ae3598891 iface dhcp The reason is the following: I'm calling setup-testbed from within vmdb2, which will chroot into the filesystem before executing the command. As such, $root=/ and line 429 [0] will evaluate to true. In the next step, `cd /sys/class/net; ls -d e* 2>/dev/null` is run, which returns two network interfaces on my machine: enp0s31f6 and enx482ae3598891. And a few steps later the above broken ifupdown config file will be written out. There are several problems with the code: First, it assumes that if being run with $root=/ that it's already in a VM, whereas it can be running in a chroot. The second problem is that if `ls -d e*` returns more than one line the config it creates will be broken. In a step not completely clear to me network-manager then gets removed in line 620 [1]. I at least can't make out any package there that network-manager depends on. I was able to work around this (admittedly hilarious) bug by setting AUTOPKGTEST_IS_SETUP_COMMAND=1. Regards, Lee [0] https://salsa.debian.org/ci-team/autopkgtest/-/blob/master/setup-commands/setup-testbed?ref_type=heads#L429 [1] https://salsa.debian.org/ci-team/autopkgtest/-/blob/master/setup-commands/setup-testbed?ref_type=heads#L620 -- System Information: Debian Release: 12.6 APT prefers stable-updates APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 'proposed-updates'), (990, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-22-amd64 (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages autopkgtest depends on: ii apt-utils 2.6.1 ii libdpkg-perl 1.21.22 ii procps 2:4.0.2-3 ii python3 3.11.2-1+b1 ii python3-debian 0.1.49 Versions of packages autopkgtest recommends: ii autodep8 0.28 ii fakeroot 1.31-1.2 Versions of packages autopkgtest suggests: pn docker.io <none> ii fakemachine 0.0.4-1+b2 ii lxc 1:5.0.2-1+deb12u2 pn lxd <none> ii ovmf 2022.11-6+deb12u1 pn ovmf-ia32 <none> pn podman <none> ii python3-distro-info 1.5+deb12u1 ii qemu-efi-aarch64 2022.11-6+deb12u1 ii qemu-efi-arm 2022.11-6+deb12u1 ii qemu-system 1:7.2+dfsg-7+deb12u6 ii qemu-utils 1:7.2+dfsg-7+deb12u6 ii schroot 1.6.13-3+b2 ii util-linux 2.38.1-5+deb12u1 ii vmdb2 0.27+really.0.26-1 ii zerofree 1.1.1-1 -- no debconf information