]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: display the command output on OSD creation failure
authorLoic Dachary <loic@dachary.org>
Wed, 1 Jan 2014 21:13:15 +0000 (22:13 +0100)
committerAlfredo Deza <alfredo@deza.pe>
Wed, 12 Feb 2014 21:17:12 +0000 (16:17 -0500)
The string form of a CalledProcessError instance does not include the
output datamember. Add it to the Error exception for debug purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit d09af0fa50f322c9e59765f3badd497f5ca184d4)

src/ceph-disk

index 6df02ab01e4e619775af48d5022bee95c64b3390..88caf24322fab9e27d913e79d655d7fbfd07727a 100755 (executable)
@@ -547,7 +547,7 @@ def allocate_osd_id(
                 ],
             )
     except subprocess.CalledProcessError as e:
-        raise Error('ceph osd create failed', e)
+        raise Error('ceph osd create failed', e, e.output)
     osd_id = must_be_one_line(osd_id)
     check_osd_id(osd_id)
     return osd_id