Commit 4342e89b authored by Alexander Schreiber's avatar Alexander Schreiber
Browse files

Remove --hypervisor-type from gnt-cluster.

We no longer use a single, cluster-wide hypervisor, but configure the
actual to be used hypervisor on the instance level.

Reviewed-by: imsnah
parent ea3a925f
...@@ -105,7 +105,7 @@ def _InitGanetiServerSetup(): ...@@ -105,7 +105,7 @@ def _InitGanetiServerSetup():
(result.cmd, result.exit_code, result.output)) (result.cmd, result.exit_code, result.output))
def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge, def InitCluster(cluster_name, mac_prefix, def_bridge,
master_netdev, file_storage_dir, master_netdev, file_storage_dir,
secondary_ip=None, secondary_ip=None,
vg_name=None, beparams=None, hvparams=None, vg_name=None, beparams=None, hvparams=None,
...@@ -116,12 +116,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge, ...@@ -116,12 +116,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge,
if config.ConfigWriter.IsCluster(): if config.ConfigWriter.IsCluster():
raise errors.OpPrereqError("Cluster is already initialised") raise errors.OpPrereqError("Cluster is already initialised")
if hypervisor_type == constants.HT_XEN_HVM:
if not os.path.exists(constants.VNC_PASSWORD_FILE):
raise errors.OpPrereqError("Please prepare the cluster VNC"
"password file %s" %
constants.VNC_PASSWORD_FILE)
hostname = utils.HostInfo() hostname = utils.HostInfo()
if hostname.ip.startswith("127."): if hostname.ip.startswith("127."):
...@@ -181,10 +175,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge, ...@@ -181,10 +175,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge,
if not re.match("^[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}$", mac_prefix): if not re.match("^[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}$", mac_prefix):
raise errors.OpPrereqError("Invalid mac prefix given '%s'" % mac_prefix) raise errors.OpPrereqError("Invalid mac prefix given '%s'" % mac_prefix)
if hypervisor_type not in constants.HYPER_TYPES:
raise errors.OpPrereqError("Invalid hypervisor type given '%s'" %
hypervisor_type)
result = utils.RunCmd(["ip", "link", "show", "dev", master_netdev]) result = utils.RunCmd(["ip", "link", "show", "dev", master_netdev])
if result.failed: if result.failed:
raise errors.OpPrereqError("Invalid master netdev given (%s): '%s'" % raise errors.OpPrereqError("Invalid master netdev given (%s): '%s'" %
...@@ -219,7 +209,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge, ...@@ -219,7 +209,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge,
volume_group_name=vg_name, volume_group_name=vg_name,
default_bridge=def_bridge, default_bridge=def_bridge,
tcpudp_port_pool=set(), tcpudp_port_pool=set(),
hypervisor=hypervisor_type,
master_node=hostname.name, master_node=hostname.name,
master_ip=clustername.ip, master_ip=clustername.ip,
master_netdev=master_netdev, master_netdev=master_netdev,
......
...@@ -100,7 +100,6 @@ def InitCluster(opts, args): ...@@ -100,7 +100,6 @@ def InitCluster(opts, args):
bootstrap.InitCluster(cluster_name=args[0], bootstrap.InitCluster(cluster_name=args[0],
secondary_ip=opts.secondary_ip, secondary_ip=opts.secondary_ip,
hypervisor_type=opts.hypervisor_type,
vg_name=vg_name, vg_name=vg_name,
mac_prefix=opts.mac_prefix, mac_prefix=opts.mac_prefix,
def_bridge=opts.def_bridge, def_bridge=opts.def_bridge,
...@@ -456,14 +455,6 @@ commands = { ...@@ -456,14 +455,6 @@ commands = {
" if given, the entire cluster must have secondary" " if given, the entire cluster must have secondary"
" addresses", " addresses",
metavar="ADDRESS", default=None), metavar="ADDRESS", default=None),
make_option("-t", "--hypervisor-type", dest="hypervisor_type",
help="Specify the hypervisor type "
"(xen-pvm, kvm, fake, xen-hvm)",
metavar="TYPE", choices=["xen-pvm",
"kvm",
"fake",
"xen-hvm"],
default="xen-pvm",),
make_option("-m", "--mac-prefix", dest="mac_prefix", make_option("-m", "--mac-prefix", dest="mac_prefix",
help="Specify the mac prefix for the instance IP" help="Specify the mac prefix for the instance IP"
" addresses, in the format XX:XX:XX", " addresses, in the format XX:XX:XX",
......
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