From 541741d3dea7d2aa971fb822417e35bfc9ed8d97 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 16 Jun 2009 13:27:29 +0100
Subject: [PATCH] Fix backend.{Start,Stop}Master

Commit c26a6bd21c17641f718369caed88ae16947fa774 changed GetMasterInfo
not to return a tuple anymore, but didn't update its two callers in
backend.py, which were trying to extract the values from the second
tuple element. This causes a stack trace in node-daemon.log.

Signed-off-by: Guido Trotter <ultrotter@google.com>
---
 lib/backend.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/backend.py b/lib/backend.py
index 4c1df6038..cb79c0a7f 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -191,7 +191,7 @@ def StartMaster(start_daemons):
 
   """
   # GetMasterInfo will raise an exception if not able to return data
-  master_netdev, master_ip, _ = GetMasterInfo()[1]
+  master_netdev, master_ip, _ = GetMasterInfo()
 
   payload = []
   if utils.TcpPing(master_ip, constants.DEFAULT_NODED_PORT):
@@ -245,7 +245,7 @@ def StopMaster(stop_daemons):
   # need to decide in which case we fail the RPC for this
 
   # GetMasterInfo will raise an exception if not able to return data
-  master_netdev, master_ip, _ = GetMasterInfo()[1]
+  master_netdev, master_ip, _ = GetMasterInfo()
 
   result = utils.RunCmd(["ip", "address", "del", "%s/32" % master_ip,
                          "dev", master_netdev])
-- 
GitLab