]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: ceph_objectstore_tool.py: Perform dump-import 19487/head
authorDavid Zafman <dzafman@redhat.com>
Sat, 9 Dec 2017 02:48:21 +0000 (18:48 -0800)
committerNathan Cutler <ncutler@suse.com>
Wed, 31 Jan 2018 22:41:28 +0000 (23:41 +0100)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit c4602c9ac8f7819abc89c8668fbdc4572341ac5e)

qa/standalone/special/ceph_objectstore_tool.py

index 554ba77ef00485fbbcb74dfce14193dcad25200d..63333bef20c92fca91e3341f90a51ab28915a45b 100755 (executable)
@@ -1749,6 +1749,13 @@ def main(argv):
             PGS = [f for f in os.listdir(dir) if os.path.isfile(os.path.join(dir, f))]
             for pg in PGS:
                 file = os.path.join(dir, pg)
+                # Make sure this doesn't crash
+                cmd = (CFSD_PREFIX + "--op dump-import --file {file}").format(osd=osd, file=file)
+                logging.debug(cmd)
+                ret = call(cmd, shell=True, stdout=nullfd)
+                if ret != 0:
+                    logging.error("Dump-import failed from {file} with {ret}".format(file=file, ret=ret))
+                    IMP_ERRORS += 1
                 # This should do nothing
                 cmd = (CFSD_PREFIX + "--op import --file {file} --dry-run").format(osd=osd, file=file)
                 logging.debug(cmd)