Revision 8a5d326f
b/lib/client/gnt_cluster.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2010, 2011, 2012, 2013 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2010, 2011, 2012, 2013, 2014 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
540 | 540 |
utils.CommaJoin(pathutils.ES_SEARCH_PATH)), |
541 | 541 |
("enabled disk templates", |
542 | 542 |
utils.CommaJoin(result["enabled_disk_templates"])), |
543 |
("instance communication network", |
|
544 |
result["instance_communication_network"]), |
|
543 | 545 |
]), |
544 | 546 |
|
545 | 547 |
("Default node parameters", |
b/lib/cmdlib/cluster.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
417 | 417 |
"hidden_os": cluster.hidden_os, |
418 | 418 |
"blacklisted_os": cluster.blacklisted_os, |
419 | 419 |
"enabled_disk_templates": cluster.enabled_disk_templates, |
420 |
"instance_communication_network": cluster.instance_communication_network, |
|
420 | 421 |
} |
421 | 422 |
|
422 | 423 |
return result |
b/lib/objects.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
1596 | 1596 |
"enabled_disk_templates", |
1597 | 1597 |
"candidate_certs", |
1598 | 1598 |
"max_running_jobs", |
1599 |
"instance_communication_network", |
|
1599 | 1600 |
] + _TIMESTAMPS + _UUID |
1600 | 1601 |
|
1601 | 1602 |
def UpgradeConfig(self): |
... | ... | |
1730 | 1731 |
if self.max_running_jobs is None: |
1731 | 1732 |
self.max_running_jobs = constants.LUXID_MAXIMAL_RUNNING_JOBS_DEFAULT |
1732 | 1733 |
|
1734 |
if self.instance_communication_network is None: |
|
1735 |
self.instance_communication_network = "" |
|
1736 |
|
|
1733 | 1737 |
@property |
1734 | 1738 |
def primary_hypervisor(self): |
1735 | 1739 |
"""The first hypervisor is the primary. |
b/src/Ganeti/Objects.hs | ||
---|---|---|
9 | 9 |
|
10 | 10 |
{- |
11 | 11 |
|
12 |
Copyright (C) 2011, 2012, 2013 Google Inc. |
|
12 |
Copyright (C) 2011, 2012, 2013, 2014 Google Inc.
|
|
13 | 13 |
|
14 | 14 |
This program is free software; you can redistribute it and/or modify |
15 | 15 |
it under the terms of the GNU General Public License as published by |
... | ... | |
670 | 670 |
|
671 | 671 |
-- * Cluster definitions |
672 | 672 |
$(buildObject "Cluster" "cluster" $ |
673 |
[ simpleField "rsahostkeypub" [t| String |] |
|
673 |
[ simpleField "rsahostkeypub" [t| String |]
|
|
674 | 674 |
, optionalField $ |
675 |
simpleField "dsahostkeypub" [t| String |] |
|
676 |
, simpleField "highest_used_port" [t| Int |] |
|
677 |
, simpleField "tcpudp_port_pool" [t| [Int] |] |
|
678 |
, simpleField "mac_prefix" [t| String |] |
|
675 |
simpleField "dsahostkeypub" [t| String |]
|
|
676 |
, simpleField "highest_used_port" [t| Int |]
|
|
677 |
, simpleField "tcpudp_port_pool" [t| [Int] |]
|
|
678 |
, simpleField "mac_prefix" [t| String |]
|
|
679 | 679 |
, optionalField $ |
680 |
simpleField "volume_group_name" [t| String |] |
|
681 |
, simpleField "reserved_lvs" [t| [String] |] |
|
680 |
simpleField "volume_group_name" [t| String |]
|
|
681 |
, simpleField "reserved_lvs" [t| [String] |]
|
|
682 | 682 |
, optionalField $ |
683 |
simpleField "drbd_usermode_helper" [t| String |] |
|
684 |
, simpleField "master_node" [t| String |] |
|
685 |
, simpleField "master_ip" [t| String |] |
|
686 |
, simpleField "master_netdev" [t| String |] |
|
687 |
, simpleField "master_netmask" [t| Int |] |
|
688 |
, simpleField "use_external_mip_script" [t| Bool |] |
|
689 |
, simpleField "cluster_name" [t| String |] |
|
690 |
, simpleField "file_storage_dir" [t| String |] |
|
691 |
, simpleField "shared_file_storage_dir" [t| String |] |
|
692 |
, simpleField "gluster_storage_dir" [t| String |] |
|
693 |
, simpleField "enabled_hypervisors" [t| [Hypervisor] |] |
|
694 |
, simpleField "hvparams" [t| ClusterHvParams |] |
|
695 |
, simpleField "os_hvp" [t| OsHvParams |] |
|
696 |
, simpleField "beparams" [t| ClusterBeParams |] |
|
697 |
, simpleField "osparams" [t| ClusterOsParams |] |
|
698 |
, simpleField "osparams_private_cluster" [t| ClusterOsParamsPrivate |] |
|
699 |
, simpleField "nicparams" [t| ClusterNicParams |] |
|
700 |
, simpleField "ndparams" [t| FilledNDParams |] |
|
701 |
, simpleField "diskparams" [t| DiskParams |] |
|
702 |
, simpleField "candidate_pool_size" [t| Int |] |
|
703 |
, simpleField "modify_etc_hosts" [t| Bool |] |
|
704 |
, simpleField "modify_ssh_setup" [t| Bool |] |
|
705 |
, simpleField "maintain_node_health" [t| Bool |] |
|
706 |
, simpleField "uid_pool" [t| UidPool |] |
|
707 |
, simpleField "default_iallocator" [t| String |] |
|
708 |
, simpleField "default_iallocator_params" [t| IAllocatorParams |] |
|
709 |
, simpleField "hidden_os" [t| [String] |] |
|
710 |
, simpleField "blacklisted_os" [t| [String] |] |
|
711 |
, simpleField "primary_ip_family" [t| IpFamily |] |
|
712 |
, simpleField "prealloc_wipe_disks" [t| Bool |] |
|
713 |
, simpleField "ipolicy" [t| FilledIPolicy |] |
|
714 |
, simpleField "enabled_disk_templates" [t| [DiskTemplate] |] |
|
715 |
, simpleField "candidate_certs" [t| CandidateCertificates |] |
|
716 |
, simpleField "max_running_jobs" [t| Int |] |
|
683 |
simpleField "drbd_usermode_helper" [t| String |] |
|
684 |
, simpleField "master_node" [t| String |] |
|
685 |
, simpleField "master_ip" [t| String |] |
|
686 |
, simpleField "master_netdev" [t| String |] |
|
687 |
, simpleField "master_netmask" [t| Int |] |
|
688 |
, simpleField "use_external_mip_script" [t| Bool |] |
|
689 |
, simpleField "cluster_name" [t| String |] |
|
690 |
, simpleField "file_storage_dir" [t| String |] |
|
691 |
, simpleField "shared_file_storage_dir" [t| String |] |
|
692 |
, simpleField "gluster_storage_dir" [t| String |] |
|
693 |
, simpleField "enabled_hypervisors" [t| [Hypervisor] |] |
|
694 |
, simpleField "hvparams" [t| ClusterHvParams |] |
|
695 |
, simpleField "os_hvp" [t| OsHvParams |] |
|
696 |
, simpleField "beparams" [t| ClusterBeParams |] |
|
697 |
, simpleField "osparams" [t| ClusterOsParams |] |
|
698 |
, simpleField "osparams_private_cluster" [t| ClusterOsParamsPrivate |] |
|
699 |
, simpleField "nicparams" [t| ClusterNicParams |] |
|
700 |
, simpleField "ndparams" [t| FilledNDParams |] |
|
701 |
, simpleField "diskparams" [t| DiskParams |] |
|
702 |
, simpleField "candidate_pool_size" [t| Int |] |
|
703 |
, simpleField "modify_etc_hosts" [t| Bool |] |
|
704 |
, simpleField "modify_ssh_setup" [t| Bool |] |
|
705 |
, simpleField "maintain_node_health" [t| Bool |] |
|
706 |
, simpleField "uid_pool" [t| UidPool |] |
|
707 |
, simpleField "default_iallocator" [t| String |] |
|
708 |
, simpleField "default_iallocator_params" [t| IAllocatorParams |] |
|
709 |
, simpleField "hidden_os" [t| [String] |] |
|
710 |
, simpleField "blacklisted_os" [t| [String] |] |
|
711 |
, simpleField "primary_ip_family" [t| IpFamily |] |
|
712 |
, simpleField "prealloc_wipe_disks" [t| Bool |] |
|
713 |
, simpleField "ipolicy" [t| FilledIPolicy |] |
|
714 |
, simpleField "enabled_disk_templates" [t| [DiskTemplate] |] |
|
715 |
, simpleField "candidate_certs" [t| CandidateCertificates |] |
|
716 |
, simpleField "max_running_jobs" [t| Int |] |
|
717 |
, simpleField "instance_communication_network" [t| String |] |
|
717 | 718 |
] |
718 | 719 |
++ timeStampFields |
719 | 720 |
++ uuidFields |
b/src/Ganeti/Query/Server.hs | ||
---|---|---|
4 | 4 |
|
5 | 5 |
{- |
6 | 6 |
|
7 |
Copyright (C) 2012, 2013 Google Inc. |
|
7 |
Copyright (C) 2012, 2013, 2014 Google Inc.
|
|
8 | 8 |
|
9 | 9 |
This program is free software; you can redistribute it and/or modify |
10 | 10 |
it under the terms of the GNU General Public License as published by |
... | ... | |
166 | 166 |
, ("hidden_os", showJSON $ clusterHiddenOs cluster) |
167 | 167 |
, ("blacklisted_os", showJSON $ clusterBlacklistedOs cluster) |
168 | 168 |
, ("enabled_disk_templates", showJSON diskTemplates) |
169 |
, ("instance_communication_network", |
|
170 |
showJSON (clusterInstanceCommunicationNetwork cluster)) |
|
169 | 171 |
] |
170 | 172 |
|
171 | 173 |
in case master of |
b/test/py/cfgupgrade_unittest.py | ||
---|---|---|
48 | 48 |
"default_iallocator_params": {}, |
49 | 49 |
"ndparams": {}, |
50 | 50 |
"candidate_certs": {}, |
51 |
"instance_communication_network": "", |
|
51 | 52 |
}, |
52 | 53 |
"instances": {}, |
53 | 54 |
"networks": {}, |
b/tools/cfgupgrade | ||
---|---|---|
152 | 152 |
cluster["default_iallocator_params"] = {} |
153 | 153 |
if not "candidate_certs" in cluster: |
154 | 154 |
cluster["candidate_certs"] = {} |
155 |
cluster["instance_communication_network"] = \ |
|
156 |
cluster.get("instance_communication_network", "") |
|
155 | 157 |
|
156 | 158 |
|
157 | 159 |
def UpgradeGroups(config_data): |
... | ... | |
410 | 412 |
if "osparams_private_cluster" in cluster: |
411 | 413 |
del cluster["osparams_private_cluster"] |
412 | 414 |
|
415 |
if "instance_communication_network" in cluster: |
|
416 |
del cluster["instance_communication_network"] |
|
417 |
|
|
413 | 418 |
|
414 | 419 |
def DowngradeInstances(config_data): |
415 | 420 |
instances = config_data.get("instances", None) |
416 | 421 |
if instances is None: |
417 | 422 |
raise Error("Cannot find the 'instances' key in the configuration") |
423 |
|
|
418 | 424 |
for (_, iobj) in instances.items(): |
419 | 425 |
if "osparams_private" in iobj: |
420 | 426 |
del iobj["osparams_private"] |
Also available in: Unified diff