Commit 9b201a0d authored by Iustin Pop's avatar Iustin Pop
Browse files

Convert finalize_export rpc to new style results

This rpc doesn't have explicit failure modes, but once all RPCs are
converted and we can catch and convert expceptions to failure in noded,
we will have meaningfull error messages.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent ba55d062
......@@ -1879,7 +1879,7 @@ def FinalizeExport(instance, snap_disks):
shutil.rmtree(finaldestdir, True)
shutil.move(destdir, finaldestdir)
return True
return True, None
def ExportInfo(dest):
......@@ -6502,9 +6502,10 @@ class LUExportInstance(LogicalUnit):
" %s: %s", dev.logical_id[1], src_node, msg)
result = self.rpc.call_finalize_export(, instance, snap_disks)
if result.failed or not
self.LogWarning("Could not finalize export for instance %s on node %s",,
msg = result.RemoteFailMsg()
if msg:
self.LogWarning("Could not finalize export for instance %s"
" on node %s: %s",,, msg)
nodelist = self.cfg.GetNodeList()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment