ganeti-masterd: avoid SimpleConfigReader
authorGuido Trotter <ultrotter@google.com>
Tue, 14 Jul 2009 12:09:21 +0000 (14:09 +0200)
committerGuido Trotter <ultrotter@google.com>
Tue, 14 Jul 2009 12:13:01 +0000 (14:13 +0200)
SimpleStore is a lot less heavyweight than SimpleConfigReader, and to
just get the master name we can use that. This is the only usage of
SimpleConfigReader currently, but we're not going to delete the class,
as new usages will come in for ganeti-confd (in 2.1). Using it there,
though, will make the class even more heavy to load, so it makes sense
for this simple usage to be converted.

Signed-off-by: Guido Trotter <ultrotter@google.com>

daemons/ganeti-masterd

index 5a20e1f..25de2ca 100755 (executable)
@@ -517,7 +517,7 @@ def main():
     rpc.Init()
     try:
       # activate ip
-      master_node = ssconf.SimpleConfigReader().GetMasterNode()
+      master_node = ssconf.SimpleStore().GetMasterNode()
       if not rpc.RpcRunner.call_node_start_master(master_node, False):
         logging.error("Can't activate master IP address")