]> xenbits.xensource.com Git - osstest.git/commit
Debian: Wait for udev devices to settle in erase-other-disks
authorIan Campbell <ian.campbell@citrix.com>
Wed, 23 Sep 2015 15:48:36 +0000 (16:48 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 25 Sep 2015 11:27:44 +0000 (12:27 +0100)
commit4fc929076ff3a06d7b452d6ddb6744f5a439741b
tree1821d390858e4ad5a1037da68dbfe206b73a3d36
parent29fa7701968c884c396e5ed4cd707d960a6872d8
Debian: Wait for udev devices to settle in erase-other-disks

Otherwise we, apparently, have a race between the "test -b" + dd
against the sda1 device node being removed and end up creating a file
called /dev/sda1 containing 32K of zeroes, which will later render
mke2fs very confused.

For some reason we seem to reliably loose the race on Jessie i386 host
installs, but not on Wheezy or other arches on Jessie.

This was tricky to diagnose because the Debian installer main-menu
process appears to buffer the output of things it runs before logging
them to /var/log/syslog, which means the output of "set -x" and the
actual affect of the commands (e.g. in the kernel messages) can be
presented in very confusing orders. Hence this patch also adds
extensive use of logger(1) to record what it is actually doing at the
time it does it. These logs include the pid of the command too  since
main-menu only logs its own pid, not that of the subcommand which
gneerated the output.

Lastly this patch adds an explicit test that each device it touches is
actually still a block device afterwards.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm