Add more debug to image build 69/9869/1
authorJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
Fri, 12 Feb 2016 16:00:30 +0000 (17:00 +0100)
committerJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
Fri, 12 Feb 2016 16:04:00 +0000 (17:04 +0100)
Change-Id: Icfbed0433cb9cfb6f8f479fc69699d08ad49602b
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
ci/yardstick-verify
tools/yardstick-img-modify

index 97bcacb..630fed5 100755 (executable)
@@ -123,7 +123,11 @@ build_yardstick_image()
     echo
     echo "========== Build yardstick cloud image =========="
 
-    sudo $(which yardstick-img-modify) $(pwd)/tools/ubuntu-server-cloudimg-modify.sh
+    local cmd="sudo $(which yardstick-img-modify) $(pwd)/tools/ubuntu-server-cloudimg-modify.sh"
+
+    # Build the image. Retry once if the build fails.
+    $cmd || $cmd
+
     if [ ! -f $QCOW_IMAGE ]; then
         echo "Failed building QCOW image"
         exit 1
index 9459410..13d4360 100755 (executable)
@@ -81,7 +81,9 @@ setup() {
     kpartx -av $raw_imgfile
 
     # for trouble shooting
-    sleep 2; dmsetup ls
+    sleep 2
+    dmsetup ls
+    fdisk -l /dev/${loopdevice:0:5} || true
 
     mount /dev/mapper/$loopdevice $mountdir
     mount -t proc none $mountdir/proc
@@ -136,6 +138,8 @@ error_trap()
         exitcode=$rc
     fi
 
+    dmesg -T | tail -50
+
     cleanup
 
     echo "Image build failed with $exitcode"