X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/8eb148ae5f1189e390ea7bb1ff50de07bd8afc10..c8fcde472922e4ee664d904e0bf1a583f1d5040d:/lib/bootstrap.py diff --git a/lib/bootstrap.py b/lib/bootstrap.py index edee90d..d1cddfa 100644 --- a/lib/bootstrap.py +++ b/lib/bootstrap.py @@ -25,7 +25,6 @@ import os import os.path -import sha import re import logging import tempfile @@ -124,7 +123,8 @@ def _InitGanetiServerSetup(): def InitCluster(cluster_name, mac_prefix, def_bridge, master_netdev, file_storage_dir, candidate_pool_size, secondary_ip=None, vg_name=None, beparams=None, hvparams=None, - enabled_hypervisors=None, default_hypervisor=None): + enabled_hypervisors=None, default_hypervisor=None, + modify_etc_hosts=True): """Initialise the cluster. @type candidate_pool_size: int @@ -226,7 +226,9 @@ def InitCluster(cluster_name, mac_prefix, def_bridge, f.close() sshkey = sshline.split(" ")[1] - utils.AddHostToEtcHosts(hostname.name) + if modify_etc_hosts: + utils.AddHostToEtcHosts(hostname.name) + _InitSSHSetup() # init of cluster config file @@ -245,9 +247,10 @@ def InitCluster(cluster_name, mac_prefix, def_bridge, file_storage_dir=file_storage_dir, enabled_hypervisors=enabled_hypervisors, default_hypervisor=default_hypervisor, - beparams={constants.BEGR_DEFAULT: beparams}, + beparams={constants.PP_DEFAULT: beparams}, hvparams=hvparams, candidate_pool_size=candidate_pool_size, + modify_etc_hosts=modify_etc_hosts, ) master_node_config = objects.Node(name=hostname.name, primary_ip=hostname.ip,