From d320324f24300fbd1c9c63de4384e0e9047093c1 Mon Sep 17 00:00:00 2001
From: Evan Broder <broder@mit.edu>
Date: Tue, 11 Aug 2009 23:01:07 -0400
Subject: [PATCH 1/1] In the invirt-janitor, ignore errors from the dd.

In the normal case, it's erroring out because of ENOSPC, but its
return code isn't useful enough to make sure that's what happened.

svn path=/trunk/packages/invirt-remote/; revision=2437
---
 host/usr/sbin/invirt-janitor |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/host/usr/sbin/invirt-janitor b/host/usr/sbin/invirt-janitor
index 75a637a..e631972 100755
--- a/host/usr/sbin/invirt-janitor
+++ b/host/usr/sbin/invirt-janitor
@@ -42,13 +42,15 @@ def cleanup():
         try:
             syslog.syslog(syslog.LOG_INFO, "Cleaning up LV '%s'" % lv_path)
 
-            subprocess.check_call(['/usr/bin/ionice',
-                                   '-c', '2',
-                                   '-n', '7',
-                                   '/bin/dd',
-                                   'if=/dev/zero',
-                                   'of=%s' % lv_path,
-                                   'bs=1M'])
+            # In a perfect world, this should be erroring out with
+            # ENOSPC, so we ignore errors
+            subprocess.call(['/usr/bin/ionice',
+                             '-c', '2',
+                             '-n', '7',
+                             '/bin/dd',
+                             'if=/dev/zero',
+                             'of=%s' % lv_path,
+                             'bs=1M'])
 
             # Ignore any errors here, because there's really just not
             # anything we can do.
-- 
1.7.9.5