[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 09/12] ts-guests-nbd-mirror: add checkaccessible test



If the NBD devices are not properly accessible on the client, bomb out
here rather than futilely starting a guest, and then timing out when
the guest fails to boot because it can't find its root fs.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 ts-guests-nbd-mirror |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror
index c0a021a..af200f4 100755
--- a/ts-guests-nbd-mirror
+++ b/ts-guests-nbd-mirror
@@ -116,7 +116,18 @@ sub shuffleconfigs () {
     }
 }
 
+sub checkaccessible () {
+    foreach my $v (@vols) {
+       my $finfo = target_cmd_output_root($cho, "file -Ls $v->{Path}");
+       chomp $finfo;
+       logm("file(1) on $v->{Path}: $finfo");
+       die "unexpected contents for $v->{Path}, nbd failed?"
+           unless $finfo =~ m/filesystem|swap/i;
+    }
+}
+
 findvols();
 configserver();
 configclient();
 shuffleconfigs();
+checkaccessible();
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.