Revision 1b7bfbb7 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
4672 | 4672 |
src_path = self.op.src_path |
4673 | 4673 |
|
4674 | 4674 |
if src_node is None: |
4675 |
exp_list = self.rpc.call_export_list(
|
|
4676 |
self.acquired_locks[locking.LEVEL_NODE])
|
|
4675 |
locked_nodes = self.acquired_locks[locking.LEVEL_NODE]
|
|
4676 |
exp_list = self.rpc.call_export_list(locked_nodes)
|
|
4677 | 4677 |
found = False |
4678 | 4678 |
for node in exp_list: |
4679 |
if not exp_list[node].failed and src_path in exp_list[node].data: |
|
4679 |
if exp_list[node].RemoteFailMsg(): |
|
4680 |
continue |
|
4681 |
if src_path in exp_list[node].payload: |
|
4680 | 4682 |
found = True |
4681 | 4683 |
self.op.src_node = src_node = node |
4682 | 4684 |
self.op.src_path = src_path = os.path.join(constants.EXPORT_DIR, |
... | ... | |
6361 | 6363 |
rpcresult = self.rpc.call_export_list(self.nodes) |
6362 | 6364 |
result = {} |
6363 | 6365 |
for node in rpcresult: |
6364 |
if rpcresult[node].failed:
|
|
6366 |
if rpcresult[node].RemoteFailMsg():
|
|
6365 | 6367 |
result[node] = False |
6366 | 6368 |
else: |
6367 |
result[node] = rpcresult[node].data
|
|
6369 |
result[node] = rpcresult[node].payload
|
|
6368 | 6370 |
|
6369 | 6371 |
return result |
6370 | 6372 |
|
... | ... | |
6517 | 6519 |
if nodelist: |
6518 | 6520 |
exportlist = self.rpc.call_export_list(nodelist) |
6519 | 6521 |
for node in exportlist: |
6520 |
if exportlist[node].failed:
|
|
6522 |
if exportlist[node].RemoteFailMsg():
|
|
6521 | 6523 |
continue |
6522 |
if instance.name in exportlist[node].data:
|
|
6524 |
if instance.name in exportlist[node].payload:
|
|
6523 | 6525 |
if not self.rpc.call_export_remove(node, instance.name): |
6524 | 6526 |
self.LogWarning("Could not remove older export for instance %s" |
6525 | 6527 |
" on node %s", instance.name, node) |
... | ... | |
6556 | 6558 |
fqdn_warn = True |
6557 | 6559 |
instance_name = self.op.instance_name |
6558 | 6560 |
|
6559 |
exportlist = self.rpc.call_export_list(self.acquired_locks[
|
|
6560 |
locking.LEVEL_NODE])
|
|
6561 |
locked_nodes = self.acquired_locks[locking.LEVEL_NODE]
|
|
6562 |
exportlist = self.rpc.call_export_list(locked_nodes)
|
|
6561 | 6563 |
found = False |
6562 | 6564 |
for node in exportlist: |
6563 |
if exportlist[node].failed: |
|
6564 |
self.LogWarning("Failed to query node %s, continuing" % node) |
|
6565 |
msg = exportlist[node].RemoteFailMsg() |
|
6566 |
if msg: |
|
6567 |
self.LogWarning("Failed to query node %s (continuing): %s", node, msg) |
|
6565 | 6568 |
continue |
6566 |
if instance_name in exportlist[node].data:
|
|
6569 |
if instance_name in exportlist[node].payload:
|
|
6567 | 6570 |
found = True |
6568 | 6571 |
result = self.rpc.call_export_remove(node, instance_name) |
6569 | 6572 |
if result.failed or not result.data: |
Also available in: Unified diff