Commit d393737d authored by Guido Trotter's avatar Guido Trotter
Browse files

Merge branch 'next' into branch-2.1



* next:
  Remove SimpleConfigWriter.SetMasterNode
  _GenerateDiskTemplate: use base_index in the name
  ganeti-masterd: avoid SimpleConfigReader
  cmdlib: Fix typo in LUQueryClusterInfo

Conflicts:

	daemons/ganeti-masterd
	  RPC related conflict
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
parents f4a2f532 48c8887b
......@@ -524,7 +524,7 @@ def main():
rpc.Init()
try:
# activate ip
master_node = ssconf.SimpleConfigReader().GetMasterNode()
master_node = ssconf.SimpleStore().GetMasterNode()
result = rpc.RpcRunner.call_node_start_master(master_node, False, False)
msg = result.RemoteFailMsg()
if msg:
......
......@@ -2629,7 +2629,7 @@ class LUQueryClusterInfo(NoHooksLU):
"master": cluster.master_node,
"default_hypervisor": cluster.default_hypervisor,
"enabled_hypervisors": cluster.enabled_hypervisors,
"hvparams": dict([(hypervisor_name, cluster.hvparams[hypervisor])
"hvparams": dict([(hypervisor_name, cluster.hvparams[hypervisor_name])
for hypervisor_name in cluster.enabled_hypervisors]),
"beparams": cluster.beparams,
"nicparams": cluster.nicparams,
......@@ -4287,7 +4287,7 @@ def _GenerateDiskTemplate(lu, template_name,
if len(secondary_nodes) != 0:
raise errors.ProgrammerError("Wrong template configuration")
names = _GenerateUniqueNames(lu, [".disk%d" % i
names = _GenerateUniqueNames(lu, [".disk%d" % (base_index + i)
for i in range(disk_count)])
for idx, disk in enumerate(disk_info):
disk_index = idx + base_index
......@@ -4304,7 +4304,7 @@ def _GenerateDiskTemplate(lu, template_name,
[primary_node, remote_node] * len(disk_info), instance_name)
names = []
for lv_prefix in _GenerateUniqueNames(lu, [".disk%d" % i
for lv_prefix in _GenerateUniqueNames(lu, [".disk%d" % (base_index + i)
for i in range(disk_count)]):
names.append(lv_prefix + "_data")
names.append(lv_prefix + "_meta")
......
......@@ -94,12 +94,6 @@ class SimpleConfigWriter(SimpleConfigReader):
"""Simple class to write configuration file.
"""
def SetMasterNode(self, node):
"""Change master node.
"""
self._config_data["cluster"]["master_node"] = node
def Save(self):
"""Writes configuration file.
......
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