Commit e00ea635 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Convert gnt-cluster

Replace ssconf with configuration.

Reviewed-by: iustinp
parent d23ef431
...@@ -127,8 +127,7 @@ def ShowClusterMaster(opts, args): ...@@ -127,8 +127,7 @@ def ShowClusterMaster(opts, args):
opts - class with options as members opts - class with options as members
""" """
sstore = ssconf.SimpleStore() print GetClient().QueryConfigValues(["master_node"])[0]
print sstore.GetMasterNode()
return 0 return 0
...@@ -172,6 +171,8 @@ def ClusterCopyFile(opts, args): ...@@ -172,6 +171,8 @@ def ClusterCopyFile(opts, args):
op = opcodes.OpQueryNodes(output_fields=["name"], names=opts.nodes) op = opcodes.OpQueryNodes(output_fields=["name"], names=opts.nodes)
results = [row[0] for row in SubmitOpCode(op) if row[0] != myname] results = [row[0] for row in SubmitOpCode(op) if row[0] != myname]
# TODO: Potential inconsistency between local node and master
srun = ssh.SshRunner(cfg) srun = ssh.SshRunner(cfg)
for node in results: for node in results:
if not srun.CopyFileToNode(node, filename): if not srun.CopyFileToNode(node, filename):
...@@ -198,8 +199,8 @@ def RunClusterCommand(opts, args): ...@@ -198,8 +199,8 @@ def RunClusterCommand(opts, args):
op = opcodes.OpQueryNodes(output_fields=["name"], names=opts.nodes) op = opcodes.OpQueryNodes(output_fields=["name"], names=opts.nodes)
nodes = [row[0] for row in SubmitOpCode(op)] nodes = [row[0] for row in SubmitOpCode(op)]
sstore = ssconf.SimpleStore() # TODO: Potential inconsistency between local node and master
master_node = sstore.GetMasterNode() master_node = cfg.GetMasterNode()
srun = ssh.SshRunner(cfg) srun = ssh.SshRunner(cfg)
# Make sure master node is at list end # Make sure master node is at list end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment