From ae7e75954445f507dc8554e73d5ff20e6bb4294b Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 4 Sep 2015 10:35:21 -0700 Subject: [PATCH] ami: check that the disk GUID has been set --- oem/ami/test_ami.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/oem/ami/test_ami.sh b/oem/ami/test_ami.sh index 058e2344e1..0b233cdaa4 100755 --- a/oem/ami/test_ami.sh +++ b/oem/ami/test_ami.sh @@ -185,6 +185,20 @@ for host in ${ips[@]}; do done echo "OK" +echo "Checking disk GUID... " +for host in ${ips[@]}; do + if ! ssh -i "$key_file" -l core -o StrictHostKeyChecking=no "$host" \ + sudo sgdisk --print /dev/xvda | \ + grep "^Disk identifier" | \ + grep -v 00000000-0000-0000-0000-000000000001 + then + echo "disk guid unset on $host" >&2 + exit 1 + fi +done +echo "OK" + + echo -n "Cleaning up environment... " ec2-terminate-instances $instances > /dev/null while ! $ec2_cmd | grep INSTANCE | grep -q terminated