Commit 204f2086 authored by Guido Trotter's avatar Guido Trotter
Browse files

s/Chain(OpQueryExports)/rpc.call_export_list(...)/

Parallel opcodes are not (yet?) supported for chaining. Turns out
though that chaining is used only four times in the code, and twice it's
for querying exports. But what's the need to chain the full opcode, when
the simple call_export_list rpc is going to provide the same result?

Reviewed-by: iustinp
parent b91a34a5
......@@ -4587,8 +4587,7 @@ class LUExportInstance(LogicalUnit):
# if we proceed the backup would be removed because OpQueryExports
# substitutes an empty list with the full cluster node list.
if nodelist:
op = opcodes.OpQueryExports(nodes=nodelist)
exportlist = self.proc.ChainOpCode(op)
exportlist = rpc.call_export_list(nodelist)
for node in exportlist:
if instance.name in exportlist[node]:
if not rpc.call_export_remove(node, instance.name):
......@@ -4619,8 +4618,7 @@ class LURemoveExport(NoHooksLU):
fqdn_warn = True
instance_name = self.op.instance_name
op = opcodes.OpQueryExports(nodes=[])
exportlist = self.proc.ChainOpCode(op)
exportlist = rpc.call_export_list(self.cfg.GetNodeList())
found = False
for node in exportlist:
if instance_name in exportlist[node]:
......
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