* Add some more "udevadm settle" calls. Hopefully this fixes random

failures like this:

machine: running command: parted /dev/vda -- mkpart primary 1M 2048M
machine: exit status 0
machine: running command: parted /dev/vda -- set 1 lvm on
machine: exit status 1
machine: output: 
                                                                          
Warning: WARNING: the kernel failed to re-read the partition table on /dev/vda
(Device or resource busy).  As a result, it may not reflect all of your changes
until after reboot.
command `parted /dev/vda -- set 1 lvm on' did not succeed (exit code 1) at Machine.pm line 212, <GEN2> line 24.

svn path=/nixos/trunk/; revision=19328
This commit is contained in:
Eelco Dolstra 2010-01-10 15:22:09 +00:00
parent 1a0bb65901
commit 6cfe5e2746

View file

@ -261,11 +261,11 @@ in {
$machine->mustSucceed(
"parted /dev/vda mklabel msdos",
"parted /dev/vda -- mkpart primary 1M 2048M", # first PV
"udevadm settle",
"parted /dev/vda -- set 1 lvm on",
"parted /dev/vda -- mkpart primary 2048M -1s", # second PV
"parted /dev/vda -- set 2 lvm on",
"fdisk -l /dev/vda >&2",
"udevadm settle",
"parted /dev/vda -- set 2 lvm on",
"pvcreate /dev/vda1 /dev/vda2",
"vgcreate MyVolGroup /dev/vda1 /dev/vda2",
"lvcreate --size 1G --name swap MyVolGroup",