From ce7151ae94eaa93b937d5c1a7d04789e5e468128 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Wed, 30 Jul 2008 12:27:48 +0000
Subject: [PATCH] Fix gnt-cluster getmaster

This is special in the sense that it can run on any node. As such, we
just instantiate ssconf and read the data from it.

Reviewed-by: ultrotter
---
 scripts/gnt-cluster | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster
index caed00635..57c2dc6b0 100755
--- a/scripts/gnt-cluster
+++ b/scripts/gnt-cluster
@@ -124,9 +124,8 @@ def ShowClusterMaster(opts, args):
     opts - class with options as members
 
   """
-  op = opcodes.OpQueryClusterInfo()
-  result = SubmitOpCode(op)
-  print (result["master"])
+  sstore = ssconf.SimpleStore()
+  print sstore.GetMasterNode()
   return 0
 
 
-- 
GitLab