]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
Debian: Fix /lib/udev/ifupdown-hotplug in guests from debootstrap
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 9 Apr 2019 16:52:58 +0000 (17:52 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 10 Apr 2019 14:19:22 +0000 (15:19 +0100)
The ifupdown-hotplug problem just described affects guests too.

Empirically, this occurs only with the guests from xen-tools.  In my
osstest stretch series development tests this resulted in occasional
failures of ts-guest-start.  The problem is not deterministic; and it
may be that it is a race between the guest's random dhcp retry and
osstest's timeout, or something.  The race affected both x86 and ARM.

I conjecture that it only affects xen-tools created guests because
those guests use sysvinit.  Presumably the other guests have systemd
which has some different ordering.  I conjecture that the sysvinit
boot arrangements were damaged by some changes made in stretch to
shared components (udev, probably) to support systemd.

An alternative explanation for seeing the failure only with xen-tools
created guests might be that all guests are affected, but only
xen-tools created guests are booted with a short timeout; whereas the
d-i created ones have a long timeout for firstboot at least.  I don't
believe this theory because all guests are restarted with
ts-guest-start and a short timeout.

So: in ts-debian-fixup, execute the sed rune to fix
/lib/udev/ifupdown-hotplug.  This then happens before first boot.

Debian guests installed via d-i are not affected by this patch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
ts-debian-fixup

index 7d9d0398b8a0a30822e375a2a6c3ba0724f9feeb..fef9836ecf7a0d972be32b2670f259aff38279bc 100755 (executable)
@@ -212,6 +212,8 @@ target_cmd_root($ho, <<END.debian_overlays_fixup_cmd($ho, $mountpoint));
 set -ex
 END
 
+target_cmd_root($ho, debian_dhcp_rofs_fix($ho, $mountpoint));
+
 console();
 filesystems();
 otherfixupcfg();