]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
bonus points, catch remoto issue #3 183/head
authorAlfredo Deza <alfredo.deza@inktank.com>
Thu, 1 May 2014 12:12:16 +0000 (08:12 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Thu, 1 May 2014 12:12:16 +0000 (08:12 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/osd.py

index 2aea14e4f0333fd8f8e76bb46b6a8f75049c06ef..7fc405d83a3714144f7255084cdc064901819267 100644 (file)
@@ -124,10 +124,17 @@ def osd_status_check(conn, cluster):
         '--format=json',
     ]
 
-    out, err, code = process.check(
-        conn,
-        command,
-    )
+    try:
+        out, err, code = process.check(
+            conn,
+            command,
+        )
+    except TypeError:
+        # XXX This is a bug in remoto. If the other end disconnects with a timeout
+        # it will return a None, and here we are expecting a 3 item tuple, not a None
+        # so it will break with a TypeError. Once remoto fixes this, we no longer need
+        # this try/except.
+        return {}
 
     try:
         loaded_json = json.loads(''.join(out))