Revision 35fbcd11 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
6516 | 6516 |
# on one-node clusters nodelist will be empty after the removal |
6517 | 6517 |
# if we proceed the backup would be removed because OpQueryExports |
6518 | 6518 |
# substitutes an empty list with the full cluster node list. |
6519 |
iname = instance.name |
|
6519 | 6520 |
if nodelist: |
6520 | 6521 |
exportlist = self.rpc.call_export_list(nodelist) |
6521 | 6522 |
for node in exportlist: |
6522 | 6523 |
if exportlist[node].RemoteFailMsg(): |
6523 | 6524 |
continue |
6524 |
if instance.name in exportlist[node].payload: |
|
6525 |
if not self.rpc.call_export_remove(node, instance.name): |
|
6525 |
if iname in exportlist[node].payload: |
|
6526 |
msg = self.rpc.call_export_remove(node, iname).RemoteFailMsg() |
|
6527 |
if msg: |
|
6526 | 6528 |
self.LogWarning("Could not remove older export for instance %s" |
6527 |
" on node %s", instance.name, node)
|
|
6529 |
" on node %s: %s", iname, node, msg)
|
|
6528 | 6530 |
|
6529 | 6531 |
|
6530 | 6532 |
class LURemoveExport(NoHooksLU): |
... | ... | |
6569 | 6571 |
if instance_name in exportlist[node].payload: |
6570 | 6572 |
found = True |
6571 | 6573 |
result = self.rpc.call_export_remove(node, instance_name) |
6572 |
if result.failed or not result.data: |
|
6574 |
msg = result.RemoteFailMsg() |
|
6575 |
if msg: |
|
6573 | 6576 |
logging.error("Could not remove export for instance %s" |
6574 |
" on node %s", instance_name, node)
|
|
6577 |
" on node %s: %s", instance_name, node, msg)
|
|
6575 | 6578 |
|
6576 | 6579 |
if fqdn_warn and not found: |
6577 | 6580 |
feedback_fn("Export not found. If trying to remove an export belonging" |
Also available in: Unified diff