Revision d367b66c
b/lib/bootstrap.py | ||
---|---|---|
41 | 41 |
from ganeti import hypervisor |
42 | 42 |
from ganeti import bdev |
43 | 43 |
from ganeti import netutils |
44 |
from ganeti import backend |
|
44 | 45 |
|
45 | 46 |
|
46 | 47 |
def _InitSSHSetup(): |
... | ... | |
325 | 326 |
hv_class = hypervisor.GetHypervisor(hv_name) |
326 | 327 |
hv_class.CheckParameterSyntax(hv_params) |
327 | 328 |
|
328 |
# set up the inter-node password and certificate, start noded |
|
329 |
_InitGanetiServerSetup(hostname.name) |
|
330 |
|
|
331 | 329 |
# set up ssh config and /etc/hosts |
332 | 330 |
sshline = utils.ReadFile(constants.SSH_HOST_RSA_PUB) |
333 | 331 |
sshkey = sshline.split(" ")[1] |
... | ... | |
385 | 383 |
offline=False, drained=False, |
386 | 384 |
) |
387 | 385 |
InitConfig(constants.CONFIG_VERSION, cluster_config, master_node_config) |
388 |
cfg = config.ConfigWriter() |
|
386 |
cfg = config.ConfigWriter(offline=True)
|
|
389 | 387 |
ssh.WriteKnownHostsFile(cfg, constants.SSH_KNOWN_HOSTS_FILE) |
390 | 388 |
cfg.Update(cfg.GetClusterInfo(), logging.error) |
389 |
backend.WriteSsconfFiles(cfg.GetSsconfValues()) |
|
390 |
|
|
391 |
|
|
392 |
# set up the inter-node password and certificate |
|
393 |
_InitGanetiServerSetup(hostname.name) |
|
391 | 394 |
|
392 | 395 |
# start the master ip |
393 | 396 |
# TODO: Review rpc call from bootstrap |
b/lib/config.py | ||
---|---|---|
31 | 31 |
|
32 | 32 |
""" |
33 | 33 |
|
34 |
# pylint: disable-msg=R0904 |
|
35 |
# R0904: Too many public methods |
|
36 |
|
|
34 | 37 |
import os |
35 | 38 |
import random |
36 | 39 |
import logging |
... | ... | |
1412 | 1415 |
} |
1413 | 1416 |
|
1414 | 1417 |
@locking.ssynchronized(_config_lock, shared=1) |
1418 |
def GetSsconfValues(self): |
|
1419 |
"""Wrapper using lock around _UnlockedGetSsconf(). |
|
1420 |
|
|
1421 |
""" |
|
1422 |
return self._UnlockedGetSsconfValues() |
|
1423 |
|
|
1424 |
@locking.ssynchronized(_config_lock, shared=1) |
|
1415 | 1425 |
def GetVGName(self): |
1416 | 1426 |
"""Return the volume group name. |
1417 | 1427 |
|
Also available in: Unified diff