From 4342e89b3ce7394f0ba95f99eff706dc392cc5ba Mon Sep 17 00:00:00 2001 From: Alexander Schreiber <als@google.com> Date: Mon, 20 Oct 2008 10:47:06 +0000 Subject: [PATCH] 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 --- lib/bootstrap.py | 13 +------------ scripts/gnt-cluster | 9 --------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/lib/bootstrap.py b/lib/bootstrap.py index 10fe728bf..74cead0b2 100644 --- a/lib/bootstrap.py +++ b/lib/bootstrap.py @@ -105,7 +105,7 @@ def _InitGanetiServerSetup(): (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, secondary_ip=None, vg_name=None, beparams=None, hvparams=None, @@ -116,12 +116,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge, if config.ConfigWriter.IsCluster(): 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() if hostname.ip.startswith("127."): @@ -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): 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]) if result.failed: raise errors.OpPrereqError("Invalid master netdev given (%s): '%s'" % @@ -219,7 +209,6 @@ def InitCluster(cluster_name, hypervisor_type, mac_prefix, def_bridge, volume_group_name=vg_name, default_bridge=def_bridge, tcpudp_port_pool=set(), - hypervisor=hypervisor_type, master_node=hostname.name, master_ip=clustername.ip, master_netdev=master_netdev, diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster index 1c3fca893..856d07a83 100755 --- a/scripts/gnt-cluster +++ b/scripts/gnt-cluster @@ -100,7 +100,6 @@ def InitCluster(opts, args): bootstrap.InitCluster(cluster_name=args[0], secondary_ip=opts.secondary_ip, - hypervisor_type=opts.hypervisor_type, vg_name=vg_name, mac_prefix=opts.mac_prefix, def_bridge=opts.def_bridge, @@ -456,14 +455,6 @@ commands = { " if given, the entire cluster must have secondary" " addresses", 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", help="Specify the mac prefix for the instance IP" " addresses, in the format XX:XX:XX", -- GitLab