Signed-off-by: Oleg Ponomarev <[email protected]>
---
 lib/cmdlib/node.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib/node.py b/lib/cmdlib/node.py
index c67c65d..f9fbce3 100644
--- a/lib/cmdlib/node.py
+++ b/lib/cmdlib/node.py
@@ -1565,6 +1565,7 @@ class LUNodeRemove(LogicalUnit):
     assert locking.BGL in self.owned_locks(locking.LEVEL_CLUSTER), \
       "Not owning BGL"
 
+    master_node = self.cfg.GetMasterNode()
     if modify_ssh_setup:
       # retrieve the list of potential master candidates before the node is
       # removed
@@ -1572,7 +1573,6 @@ class LUNodeRemove(LogicalUnit):
       potential_master_candidate = \
         self.op.node_name in potential_master_candidates
       master_candidate_uuids = self.cfg.GetMasterCandidateUuids()
-      master_node = self.cfg.GetMasterNode()
       result = self.rpc.call_node_ssh_key_remove(
         [master_node],
         self.node.uuid, self.op.node_name,
-- 
2.6.0.rc2.230.g3dd15c0

Reply via email to