Revision 3656b3af lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
4788 | 4788 |
|
4789 | 4789 |
""" |
4790 | 4790 |
_OP_REQP = ["instance_name"] |
4791 |
REQ_BGL = False |
|
4792 |
|
|
4793 |
def ExpandNames(self): |
|
4794 |
self.needed_locks = {} |
|
4795 |
# We need all nodes to be locked in order for RemoveExport to work, but we |
|
4796 |
# don't need to lock the instance itself, as nothing will happen to it (and |
|
4797 |
# we can remove exports also for a removed instance) |
|
4798 |
self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET |
|
4791 | 4799 |
|
4792 | 4800 |
def CheckPrereq(self): |
4793 | 4801 |
"""Check prerequisites. |
... | ... | |
4806 | 4814 |
fqdn_warn = True |
4807 | 4815 |
instance_name = self.op.instance_name |
4808 | 4816 |
|
4809 |
exportlist = rpc.call_export_list(self.cfg.GetNodeList())
|
|
4817 |
exportlist = rpc.call_export_list(self.acquired_locks[locking.LEVEL_NODE])
|
|
4810 | 4818 |
found = False |
4811 | 4819 |
for node in exportlist: |
4812 | 4820 |
if instance_name in exportlist[node]: |
Also available in: Unified diff