Revision b989b9d9 lib/bootstrap.py
b/lib/bootstrap.py | ||
---|---|---|
138 | 138 |
master_netdev, file_storage_dir, candidate_pool_size, |
139 | 139 |
secondary_ip=None, vg_name=None, beparams=None, |
140 | 140 |
nicparams=None, hvparams=None, enabled_hypervisors=None, |
141 |
modify_etc_hosts=True): |
|
141 |
modify_etc_hosts=True, modify_ssh_setup=True):
|
|
142 | 142 |
"""Initialise the cluster. |
143 | 143 |
|
144 | 144 |
@type candidate_pool_size: int |
... | ... | |
250 | 250 |
if modify_etc_hosts: |
251 | 251 |
utils.AddHostToEtcHosts(hostname.name) |
252 | 252 |
|
253 |
_InitSSHSetup() |
|
253 |
if modify_ssh_setup: |
|
254 |
_InitSSHSetup() |
|
254 | 255 |
|
255 | 256 |
now = time.time() |
256 | 257 |
|
... | ... | |
273 | 274 |
hvparams=hvparams, |
274 | 275 |
candidate_pool_size=candidate_pool_size, |
275 | 276 |
modify_etc_hosts=modify_etc_hosts, |
277 |
modify_ssh_setup=modify_ssh_setup, |
|
276 | 278 |
ctime=now, |
277 | 279 |
mtime=now, |
278 | 280 |
uuid=utils.NewUUID(), |
... | ... | |
335 | 337 |
begun in cmdlib.LUDestroyOpcode. |
336 | 338 |
|
337 | 339 |
""" |
340 |
cfg = config.ConfigWriter() |
|
341 |
modify_ssh_setup = cfg.GetClusterInfo().modify_ssh_setup |
|
338 | 342 |
result = rpc.RpcRunner.call_node_stop_master(master, True) |
339 | 343 |
msg = result.fail_msg |
340 | 344 |
if msg: |
341 | 345 |
logging.warning("Could not disable the master role: %s" % msg) |
342 |
result = rpc.RpcRunner.call_node_leave_cluster(master) |
|
346 |
result = rpc.RpcRunner.call_node_leave_cluster(master, modify_ssh_setup)
|
|
343 | 347 |
msg = result.fail_msg |
344 | 348 |
if msg: |
345 | 349 |
logging.warning("Could not shutdown the node daemon and cleanup" |
Also available in: Unified diff