wait_booted() times out on systems with broken sysvinit compat
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autopkgtest (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The wait_booted() function in lib/VirtSubproc.py uses `runlevel` to get the current SysV runlevel, and only considers the test bed booted if `runlevel` returns a valid number. This is fine in most cases, but causes the test bed to timeout if this SysVinit compatibility is broken for some reason. Since Ubuntu runs systemd, it would be better to also check e.g. if multi-user.target is active, since SysVinit programs/interfaces are only left around in systemd for compatibility.
I came across this in a PPA autopkgtest where privileged LXD containers broke systemd-
I plan on providing a patch for this.
Hi, thanks for reporting this bug. A couple of comments:
1. I am not sure I agree we should skip over a test that breaks very basic sysv compatibility, specifically by making the system never reach a valid (= numeric) runlevel. That's what wait_booted() checks before checking systemd stuff, if systemd is available (see the await-boot.sh script). In other words I think that a package that prevents runlevel from returning a runlevel should be considered to be compromising boot, so a test failure looks correct to me.
2. The aim for the autopkgtest package is to not diverge from Debian. Ubuntu delta in the devel release in temporary. This means that that changes you're proposed should land upstream [1]. I strongly doubt Debian will switch away from using runlevel there. The autopkgtest tooling has some "if Ubuntu ..." specific code, but I think we should the very basic parts like wait_booted() in common with Debian.
[1] https:/ /salsa. debian. org/ci- team/autopkgtes t/