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 <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
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(dst_node.name, instance, snap_disks)
if result.failed or not result.data:
self.LogWarning("Could not finalize export for instance %s on node %s",
instance.name, dst_node.name)
msg = result.RemoteFailMsg()
if msg:
self.LogWarning("Could not finalize export for instance %s"
" on node %s: %s", instance.name, dst_node.name, msg)
nodelist = self.cfg.GetNodeList()
nodelist.remove(dst_node.name)
......
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