Revision 3bcf2140
b/lib/bootstrap.py | ||
---|---|---|
749 | 749 |
os.path.isfile): |
750 | 750 |
default_iallocator = constants.IALLOC_HAIL |
751 | 751 |
|
752 |
candidate_certs = {} |
|
753 |
|
|
752 | 754 |
now = time.time() |
753 | 755 |
|
754 | 756 |
# init of cluster config file |
... | ... | |
790 | 792 |
hv_state_static=hv_state, |
791 | 793 |
disk_state_static=disk_state, |
792 | 794 |
enabled_disk_templates=enabled_disk_templates, |
795 |
candidate_certs=candidate_certs, |
|
793 | 796 |
) |
794 | 797 |
master_node_config = objects.Node(name=hostname.name, |
795 | 798 |
primary_ip=hostname.ip, |
... | ... | |
803 | 806 |
cfg = config.ConfigWriter(offline=True) |
804 | 807 |
ssh.WriteKnownHostsFile(cfg, pathutils.SSH_KNOWN_HOSTS_FILE) |
805 | 808 |
cfg.Update(cfg.GetClusterInfo(), logging.error) |
809 |
|
|
806 | 810 |
ssconf.WriteSsconfFiles(cfg.GetSsconfValues()) |
807 | 811 |
|
808 | 812 |
# set up the inter-node password and certificate |
b/lib/objects.py | ||
---|---|---|
1576 | 1576 |
"hv_state_static", |
1577 | 1577 |
"disk_state_static", |
1578 | 1578 |
"enabled_disk_templates", |
1579 |
"candidate_certs", |
|
1579 | 1580 |
] + _TIMESTAMPS + _UUID |
1580 | 1581 |
|
1581 | 1582 |
def UpgradeConfig(self): |
... | ... | |
1698 | 1699 |
raise errors.ConfigurationError(msg) |
1699 | 1700 |
self.ipolicy = FillIPolicy(constants.IPOLICY_DEFAULTS, self.ipolicy) |
1700 | 1701 |
|
1702 |
if self.candidate_certs is None: |
|
1703 |
self.candidate_certs = {} |
|
1704 |
|
|
1701 | 1705 |
@property |
1702 | 1706 |
def primary_hypervisor(self): |
1703 | 1707 |
"""The first hypervisor is the primary. |
b/src/Ganeti/Objects.hs | ||
---|---|---|
659 | 659 |
-- | The iallocator parameters type. |
660 | 660 |
type IAllocatorParams = Container JSValue |
661 | 661 |
|
662 |
-- | The master candidate client certificate digests |
|
663 |
type CandidateCertificates = Container String |
|
664 |
|
|
662 | 665 |
-- * Cluster definitions |
663 | 666 |
$(buildObject "Cluster" "cluster" $ |
664 | 667 |
[ simpleField "rsahostkeypub" [t| String |] |
... | ... | |
702 | 705 |
, simpleField "prealloc_wipe_disks" [t| Bool |] |
703 | 706 |
, simpleField "ipolicy" [t| FilledIPolicy |] |
704 | 707 |
, simpleField "enabled_disk_templates" [t| [DiskTemplate] |] |
708 |
, simpleField "candidate_certs" [t| CandidateCertificates |] |
|
705 | 709 |
] |
706 | 710 |
++ timeStampFields |
707 | 711 |
++ uuidFields |
b/test/py/cfgupgrade_unittest.py | ||
---|---|---|
45 | 45 |
"master_node": "node1-uuid", |
46 | 46 |
"ipolicy": None, |
47 | 47 |
"default_iallocator_params": {}, |
48 |
"ndparams": {} |
|
48 |
"ndparams": {}, |
|
49 |
"candidate_certs": {}, |
|
49 | 50 |
}, |
50 | 51 |
"instances": {}, |
51 | 52 |
"networks": {}, |
Also available in: Unified diff